Changes

Jump to: navigation, search

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

309 bytes added, 00:14, 9 March 2011
"Add Student" Command
==== "Add Student" Command ====
For implementing the "AddStudent" command, we are highly depended on the use of Editor view, so after adding the command Handler class and add the command to the menuContribution extension point, we will leave this part of tutorial and will come back to it for the implementation of the execute method in the handler class. However this will not be the only code, related to the "AddStudent" command. The reason is, we are going to use the editor view to create a new student. So basically, when user clicks on the "Add Student" on the top bar, the editor view will open up and enables user to enter the information for a new student and there will be a "Save" button to save the student, Then the table viewer will show the updated data, and the editor view will close.<br/>
Here is what user can see by clicking on the "Add Student" button:<br/>
[[Image: RCPCommandAddRun.jpg | 700px]]<br/>
<br/>
Add the "AddStudent" command to the commands extension point the same way you added the Print command, and create its Handler class.<br/>
[[Image: RCPCommand13.jpg | 700px]]<br/>
<br/>
 
Add the command you just created to the menuContribution you have in the extension point (the same one you added Print command to). <br/>
[[Image: RCPCommand14.jpg | 700px]]<br/>
<br/>
1
edit

Navigation menu