RCP Eclipse Application Development

This is my first time to develop an RCP application with Eclipse 3.8. My question may seem strange, but for me it really is confusing. Where can I put the code for my application? If I create the necessary classes for my application, where can I use their objects? In the Application.java class? I'm confused, and online tutorials focus only on the visual aspect and SWT, not how to encode.

+4
source share
2 answers

The RCP application for eclipse is basically an eclipse plugin.

I suggest starting with an RCP application based on a simple template (e.g. Hello World template). To create such an application, create a new plug-in project (New> Other> Plug-in Project), set the target platform in Eclipse 3.8, let the wizard generate an activator, check the boxes โ€œThis plugin will contribute to the user interfaceโ€ and โ€œI would like to create a rich client application: Yes "and select any of the available templates on the next page of the wizard.

Look at the generated classes. You are right in assuming that basically Application.java is the starting point of your application. However, note that the Eclipse plug-in is an OSGi package (-compliant), so there is also a plug-in / bundle activator. You should also keep in mind that one of the common configuration points is the plugin.xml tab and its extensions.

I suggest you familiarize yourself with some of the tutorials available (there are several that can help you get started without focusing on the graphic level, although it is important that you get used to, for example, SWT and the JFace API). I personally learned a lot from reading McAffer et al. Eclipse RCP book .

There is a blog post that lists some options for getting started with Eclipse RCP . (Disclaimer: shameless self-promotion)

Hope this helps.

+8
source

what I understood, the generated classes in the RCP project folder are only for managing the life cycle and appearance of the RCP application that it is.

For everything our application needs, we need to write separate classes.

For example, if you created a view (a class that implements the IViewPart interface), you need to add this view to the RCP application using the plugin.xml file.

The following is a brief description of these classes (which they basically do)

  • Application.java - the starting point of the application, similar to the main (-) method.
  • WorkbenchWindowAdvisor.java - for window size, title, menu, toolbar, status bar configuration and visibility.
  • WorkbenchAdvisor.java - Identifies the initial perspective and which WorkbenchWindowAdvisor to use.
  • Perspective.java - location of views and editors (for example, in Java Perspective, Debug Perspective in the Eclipse IDE)
  • ActionBarAdvisor.java - for creating actions, but it is recommended to use command frameworks (see page No. 292 of the Eclipse Rich Client Platform, second edition - by Jeff McAffer http://www.amazon.com/Eclipse-Rich-Client-Platform-Edition/dp / 0321603788 )
+3
source

All Articles