Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create an Eclipse RCP application re-using some "Eclipse IDE plugins"?

How can I create a RCP application, which looks exactly like the Eclipse IDE with all menus, views, dialogs...?

Here is one example: http://richclientplatform.blogspot.com/2007/12/oil-and-gas-industry-using-eclipse.html

I followed Lars Vogel's tutorial to create a simple RCP application: http://www.vogella.de/articles/EclipseRCP/article.html.

... what are the next steps?

like image 309
Max Avatar asked Aug 25 '10 01:08

Max


People also ask

What is Eclipse RCP workbench?

The Eclipse workbench is a powerful UI framework for IDEs and also other applications. It provides many services for a highly integrated and extensible user interfaces.

What are Eclipse plugins?

Plugin , which is an abstract class that provides generic facilities for managing plug-ins. An Eclipse installation includes a plugins folder where individual plug-ins are deployed. Each plug-in is installed in its own folder under the plugins folder. A plug-in is described in an XML manifest file, called plugin.


1 Answers

The ide bundle provides you with classes and extension points that allow you to use the workspace metaphor but it does not include the extensions that add all the functionality that you would see in the Eclipse IDE.

Since each bundle in an RCP app application adds menu, views, and dialogs the way to get your application to look like the IDE is to include all of the bundle that come with the IDE.

Usually you start with a pretty bare application like something tutorials that Vogel (who I find puts out good tutorials) puts out describe. Then when you find something that you want to add you research which bundle provides it and you add that bundle. As you do this your application will grow in functionality without picking up functionality your user does not need.

EDIT: Let me walk you through creating a simple RCP application.

  • Create a new Project by going to File -> New -> Project
  • Select Plug-in Project
  • Set the Project name to com.mydomain.rcp
  • Click Next
  • Under Rich Client Application select Yes
  • Click Next
  • Select RCP Mail Template
  • Click Finish

You now have an RCP app with some functionality. Next we will run it:

  • Select Run -> Run Configurations...
  • Select Eclipse Application on the left
  • Right click and select New
  • Look for Program to Run/Run a Product. Select com.mydomain.rcp.product
  • Click on the Plug-ins tab
  • Find Launch with at the top and select plug-ins selected below only
  • Click Deselect All on the right
  • In you list of plug-ins select com.mydomain.rcp
  • At the bottom de-select Add new workspace plug-ins to this launch configuration automatically
  • On the right click on Add Required Plug-ins
  • On the bottom click on Run

The application should be running the sample mail application. Go ahead and close it down. Now let's add a plugin so we can get the Search menu to show up like it does in the Eclipse IDE.

  • In your com.mydomain.rcp project open up your plugin.xml file
  • Click on the Dependencies tab
  • Under Required Plug-ins click Add...
  • Type in org.eclipse.search
  • Select org.eclipse.search (not the source one)
  • Click OK
  • Save the plugin.xml file
  • From the menu select Run -> Run Configurations...
  • Click on the Plug-ins tab
  • On the right click on Add Required Plug-ins
  • On the bottom click on Run

You should now see the Search menu with the File Search option just like the IDE has. You will not see the Java Search or the Plug-in Search though because we did not add the appropriate JDT or PDE plugins containing those additions. Hopefully this gives you an idea how to add new plugins.

like image 152
rancidfishbreath Avatar answered Sep 29 '22 00:09

rancidfishbreath