It's my first time to develop an RCP application with Eclipse 3.8.
My question may seem weird but it is really confusing for me. Where can I put the code for my application? If I create the needed classes for my app where can I use their objects? In the Application.java
class? I'm confused, and Internet tutorials focus only on the visual aspect and SWT, not on how to code.
An eclipse RCP application is basically an eclipse plugin.
I suggest starting off with an RCP application based on a simple template (e.g., the Hello World template). To create such an application, create a new plug-in project (New > Other > Plug-in Project), set the target platform to Eclipse 3.8, let the Wizard generate an Activator, tick the checkboxes "This plug-in will make contributions to the UI" and "Would you like to create a rich client application: Yes", and choose any of the available templates on the next wizard page.
Have a good look at the generated classes. You're right in assuming that basically Application.java
is the starting point of your application. However, note that an Eclipse plug-in is an OSGi(-compliant) bundle, so there's also the plug-in/bundle activator. Something to also keep in mind is that one of the general configuration points is the plugin.xml
and its extensions tab.
I suggest that you have a good look at some of the tutorials available (there are a few which help you get started without just focusing on the graphics level, although it is important that you get yourself accustomed to, e.g., the SWT and JFace APIs). I personally gained a lot from reading McAffer et al.s Eclipse RCP book.
There is a blog post which lists a number of options to get started with the Eclipse RCP. (Disclaimer: Shameless self-promotion)
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With