Tuesday, November 27, 2012

Minimal eclipse-like application

For some of my applications I need to create a minimal eclipse like application. Something that uses a workspace, has preferences, help, p2, logger and the look and feel of eclipse. Yet I do not want JDT or any other programming language support. The question is: how would a minimal setup for such an application look like?

Source code for this tutorial is available on googlecode as a single zip archive, as a Team Project Set or you can checkout the SVN projects directly.

Step 1: create a plug-in and a feature

As products generally should be feature based we first create an empty plug-in project named com.example.product.bundle and a feature com.example.product.feature that contains this project. Simple as that.

Step 2: create the product

Create a new Product Configuration named Example.product in your product plug-in.


On the Overview tab create a new Product Definition. Select a nice Product Name and a unique Product ID. To use the same application as eclipse select org.eclipse.ui.ide.workbench.


Afterwards define your product to be feature based. Switch to the Dependencies tab and add
  • org.eclipse.e4.rcp
  • org.eclipse.platform
  • com.example.product.feature
Hit Add Required to resolve additionally needed features. When you add features manually they usually are referenced by name and version number. You should get rid of the version information by selecting such features and removing the version string that can be found under Properties.... To depend on specific versions for your build use target definitions.


 Save your product and test it by selecting Launch an Eclipse Application on the Overview tab. From there you can also use the export wizard to package your application.

2 comments:

  1. Hi Christian,

    It works!

    I've tried many times in the past to create a basic IDE without success. For me there has always been bits of java functionality that I could not get rid of.

    This is a great spring board.

    Thanks for the post.

    Steve

    ReplyDelete