RCP based on plugins or features? - eclipse

I have an RCP application based on plugins because I started this app from a simple Mail example.
I am now wondering what is the difference between an RCP application based on features compare to one based on plugins ?
For information, my RCP will maybe require some advanced features such as headless build, or self update. May be this can impact on the choice of using plugins or features as basis?

Since features are just a collection of plugins (aka, a "packaging" process), you should be able to do in a PDE headless build what you can do with the PDE GUI.
The PDE build page does mention:
Building plug-ins, fragments or features consists of the 3 stages: fetch, generate scripts and build that are described bellow.
You could have some issue for modified plugin, but building features or a final product should work.

Very useful tutorial from ibm for memory leaks in rcp:
http://www.ibm.com/developerworks/library/j-rcp2/index.html

Related

Use Eclipse Classic to develop Eclipse RCP application

I've been using Eclipse Classic for developing applications in Java installing plugins as I need. Now I'm thinking to develop an application using Eclipse RCP UI. I've read some tutorials online but they suggest to use Eclipse for RCP/RAP developers.
I've looked at this Eclipse Packages Compare page but I haven't quite figured out why I can't use Eclipse Classic to develop Eclipse RCP applications.
What plugins do I have to install to use Eclipse Classic for Eclipse RCP application development?
There is very little (practical) difference between those two packages. Classic (AKA, Eclipse SDK) includes more source code for the Eclipse bundles themselves, such as JDT and PDE, which can actually be useful when developing your own plugins and RCP apps); RCP/RAP obviously includes RAP, which is critical if you need it but pointless if you don't. RCP also includes EGit (again, nice if you need it) and the XML Tools.
I often start with the SDK (Classic) package and add stuff as I need it. There has even been talk of dropping the RCP package altogether, although it still hangs around.
What plugins do I have to install to use Eclipse Classic for Eclipse RCP application development?
Trust me, you're much better off unziping Eclipse for RCP/RAP developers in a different directory, and using that to develop your RCP application.
You're lucky that adding Eclipse plug-ins to your Eclipse Classic hasn't destroyed your Java development environment.

Test Framework for Eclipse RCP Application

I am new to Eclipse RCP and I'm looking for an open source framework to test my RCP application (especially the GUI). I want to run this tests as unit tests.
Can you suggest some good frameworks with which you made good experiences?
The eclipse platform builds come with an Junit Plug-in test framework that allows JUnit tests written as plugins to run in the context of an Eclipse or RCP app. The JUnit plugin tests could then use SWTBot as well as the standard platform API (open windows, show views, etc).
See http://www.eclipse.org/articles/Article-PDE-Automation/automation.html to get started.
See also Automating unit tests (junit) for Eclipse Plugin development
You may want to try SWTBot. It is made explicitly for the SWT UI. It is in incubation still but under active development.
I had a presentation on EclipseCon '11 about this subject: 10 Techniques to Test a Plug-in.
You coud try WindowTester Pro - this used to be a commercial product, but after Google bought it it open sourced it and now it it is free, it is good actually
http://code.google.com/javadevtools/wintester/html/index.html

Continuous integration & eclipse plugin development

I am developing a set of eclipse plugins, and I have several JUnit plugin tests that actually start another instance of eclipse, create a mock workspace and a mock project and runs various operations on them. I want to put that on continuous integration and I am at loss as to where to start. I am using Hudson, would there be any plugins that makes that easier? Can those tests launch eclipse in headless mode or something on the CI server? Pointers would be much appreciated.
I think the best solution for building Eclipse-based software currently is Tycho - it is based on Maven and uses your standard Eclipse files (like manifest, target platform, product definition). I got started with it using an intro from this blog: http://mattiasholmqvist.se/2010/02/building-with-tycho-part-1-osgi-bundles/, and it worked really well. We also use Hudson, and since Tycho is Maven-based, Hudson integration was trivial and worked simply by calling Maven, which Hudson supports out of the box.
As far as I know, Buckminster tries to solve these problems: you can create descriptors, and then Buckminster can execute your tasks.
For Hudson there is a Buckminster module, that helps executing the Buckminster builds.
maybe this helps you to avoid plugin tests? ;) i like to avoid them... by using mock objects...
http://blog.srvme.de/2010/12/10/mock-eclipse-ifile/

What are the differences between plug-ins, features, and products in Eclipse RCP?

What are the differences? What gets used for which purpose?
As the RCP tutorial details
Plugins are the smallest deployable and installable software components of Eclipse.
Each plugin can define extension-points which define possibilities for functionality contributions (code and non-code) by other plugins. Non-code functionality contributions can, for example, provide help content.
The basis for this architecture is the runtime environment Equinox of Eclipse which is the reference implementation of OSGI. See OSGi development - Tutorial for details.
The Plugin concept of Eclipse is the same as the bundle concept of OSGI. Generally speaking a OSGI bundle equals a Plugin and vice-versa.
The Feature Tutorial mentions
A feature project is basically a list of plugins and other features which can be understood as a logical separate unit.
Eclipse uses feature projects for the updates manager and for the build process. You can also supply a software license with a feature
Finally, a product is a stand-alone program built with the Eclipse platform. A product may optionally be packaged and delivered as one or more features, which are simply groupings of plug-ins that are managed as a single entity by the Eclipse update mechanisms.
So:
plugins can be grouped into features which can be packaged as one executable unit called product.

RCP update site for multiple platforms

I've got an RCP application built for several platforms. The target with delta pack is set OK, Product Export Wizard works OK, PDE ant build works OK. But the Update Site project creates the updates only for the single platform - the one I use for development actually (win32). I expect the update site to include all the dependencies from all platforms required by the listed features.. Any ideas what could go wrong and where to look?
you should take a look at tycho.
it is a mavne plugin that can generates headless product and update-sites
tycho is a eclipse project by now