Changes

Jump to: navigation, search

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

355 bytes added, 19:49, 8 March 2011
Add a Command (Print Students) to Your Project
[[Image: RCPCommand3.jpg | 500px]]<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 | 500px]]<br/>
<br/>
Double click on the "defaultHandler" link to create the Handler class. The New Java Class window will open with the package name and class name set in it. Make sure that the class inherits from "org.eclipse.core.commands.AbstractHandler" by setting it as the Superclass. It should also implement the interface "org.eclipse.core.commands.IHandler".<br/>
[[Image: RCPCommand5.jpg | 500px]]<br/>
<br/>
1
edit

Navigation menu