Now we will see how to get started practically. You have eclipse IDE installed in your system but you are not able to create RCP applications...why?
The reason is eclipse SDK is not installed in your system. If you go to Window > open perspective > other then all the perspectives in your System will be displayed but, by default it will be the java perspective for running java applications. But in order to run RCP applications you can do two things. Either you can download "Eclipse for RCP and RAP developers" from the eclipse community downloads or you can use your existing IDE to dowload the PDE.For that go to Help>Install new Software and a screen like this will be displayed.FYI I am using Eclipse 3.6 ie HELIOS.Now click on the drop down box and the relevant sites will be shown. Now choose PDE, Eclipse plug-in developer resources from the Helios update site. You can install any software depending on your needs. If you want the PHP perspective then you can download the PDT SDK. Same with C/C++.
Creating your first RCP application
Go to File> New >Project. A Wizard will be displayed like this.Choose Plug-in Project from the list. Press Next to proceed to the next step. Now the next wizard is the Content Wizard.
Now write a suitable project name in the Project name text box. I have named my project as my.own.project . Select the default settings. Now in this wizard as you can see there is a question “would you like to create a Rich Client application”. It’s your choice. Choose Yes if you want to create an RCP application or no if you want to create a plug-in. If you select yes then a wizard containing four default RCP templates will be displayed.
You can choose any of the four templates. Select RCP application with a view template and press next
Add branding and press finish. After pressing the finish button your project is created in the workspace. You can view the entire contents of your project in the Package explorer view. Now In the package explorer check for the MANIFEST.MF file inside the META-INF folder. Open the file to view the MANIFEST editor.
In the package explorer there is a file Plug-in.xml. As we know it keeps all the details about extensions and the extension points. Click this file to view the extensions used in your applications. You can add more extensions by clicking on the add button and importing the required extension points. There is tab called dependencies. Here you can add the required plug-ins that will be used by your plug-in to extend the functionality of your plug-in. Now it’s time to run your “RCP application with a view”. On the overview tab there is a link called “Launch an Eclipse Application”. Click this link and your RCP application is ready.







No comments:
Post a Comment