Open main menu

CDOT Wiki β

Changes

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

685 bytes added, 12:07, 9 March 2011
Define Views in The Application
=== Define Views in The Application ===
In this part of the tutorial we are going to add a view to our application. We have to create a view and add it to the perspective and make it visible.<br/>
==== Create Views====
Click on the Extensions tab in the plugin.xml window in the project and add a new Extension Point as "org.eclipse.ui.views".
<br/>
[[Image: RCPView3.jpg | 700px]]<br/>
<br/>
Right click on the newly added Extension Point and choose: New > View.<br/>
Then in the details section give the view a Name("StudentView"), id ("cs.ecl.rcp.simpleRCP.StudentView")and a class ("cs.ecl.rcp.simplercp.StudentView").<br/>
[[Image: RCPView4.jpg | 700px]]<br/>
<br/>
Double click on the class link and the New Java Class window will open. Notice that the StudentView class is a subclass of "org.eclipse.ui.part.ViewPart" class.<br/>
[[Image: RCPView1.jpg | 700px]]<br/>
<br/>
[[Image: RCPView2.jpg | 700px]]<br/>
<br/>[[Image: RCPView3.jpg | 700px]]<br/><br/>[[Image: RCPView4.jpg | 700px]]<br/>
<br/>
[[Image: RCPView5.jpg | 700px]]<br/>
[[Image: RCPView7.jpg | 700px]]<br/>
==== Create Views====
==== Add view(s) to perspective via code ====
==== Run your app with view(s)====
1
edit