Search code examples
eclipseeclipse-pluginheadless

What are the requirements and use cases to have an eclipse headless application?


I would like to know what generic requirements are there to have Eclipse headless application. Also what are the different generic use cases which will be helpful to have headless application.

Regards

Anand


Solution

  • The question is the same as; why would you want to have a commandline version of a program over one with a GUI?

    In my experience, if the RCP is supposed to be run on unix/linux OS then those users will typically want to be able to use it in headless mode. Also if you can see a usecase where you'd want to script the use of your program.

    To retrofit headless mode to an existing RCP can be very difficult, since you ideally want a very strict Model-view-controller separation to allow for the same functionality to be performed regardless if the action came from clicking in a GUI or sending in an argument on commandline.

    When I was doing this, we created three eclipse projects, one with the core business functionality, one with the headless functions, and one with the GUI components. The project that handled headless functionality was rather small (~200 lines). But we had been programming the core parts from day one with this requirement in mind.

    We had issues with some dependencies to Eclipse UI components (such as the workbench) that we could not get rid of in the headless version, but I hear this is better in Eclipse version 4.