Changes

Jump to: navigation, search

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

1 byte removed, 19:44, 8 March 2011
Add a Command (Print Students) to Your Project
Double click on the plugin.xml file of your project in the project explorer view, and then navigate to "Extentions" tab in the project overview window.<br/>
[[Image: RCPCommand1.jpg | 400px500px]]<br/>
<br/>
Click on "Add" button to add a new extension and add the extension point "org.eclipse.ui.commands" (do not select any template) and click on Finish buttton.<br/>
<br/>
Right click on the added extention point and select command from the New menu, to add a command to your commands.<br/>
[[Image: RCPCommand3.jpg | 400px500px]]<br/>
<br/>
select the command and in "Extention Element Details" section, set the id of the command as "cs.rcp.simpleRCP.commands.print". Also name the command "Print", and set the defaultHandler class to be "cs.ecl.rcp.simpleRCP.commands.PrintHandler. Save the file (Ctrl+S).
[[Image: RCPCommand4.jpg | 400px500px]]<br/>
<br/>
[[Image: RCPCommand5.jpg | 400px500px]]<br/>
<br/>
[[Image: RCPCommand6.jpg | 400px500px]]<br/>
<br/>
[[Image: RCPCommand7.jpg | 400px500px]]<br/>
<br/>
[[Image: RCPCommand8.jpg | 400px500px]]<br/>
<br/>
[[Image: RCPCommand9.jpg | 400px500px]]<br/>
<br/>
[[Image: RCPCommand10.jpg | 400px]]<br/>
1
edit

Navigation menu