Open main menu

CDOT Wiki β

Teams Winter 2011/team1/RCP/Define and use commands

Revision as of 19:24, 8 March 2011 by Ladanzahir (talk | contribs) (Define And Use Commands)

Define And Use Commands

In order to be able to take advantages of user invoked operations and menus in the RCP application we create Commands and add them to menus. For this purpose we will demonstrate here how to create a "Print Students" command, which prints the student's info in the console and then add that command to the top bar menu. Then later, we demonstrate how to implement other commands like "Add Student", "Delete Student" and "Exit" to the top bar.

Add a Command (Print Students) to Your Project

 

 

 

 

 

 

400px

 

 

 

 

 

 

 

 

 

Implement The Command Handler

Use The Command in The Menu

Add Other Necessary Commands to The Application

"Exit" Command

"Delete Student" Command

"Add Student" Command

Define Views in The Application

Create Views

Add view(s) to perspective via code

Run your app with view(s)