Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-dev] JDT Core as a library / Eclipse CLI

Hi,

On Sun, Mar 11, 2018 at 1:47 PM, Sebastian Kürten <sebastian.kuerten@xxxxxxxxxxxx> wrote:
That task seems to be a bit more involved, since it requires the
ResourcesPlugin to be running. I could not get this working yet[2].
Maybe someone more experienced with the Eclipse plugin has an idea how
this could work. I appreciate any directions on this.

Unlike JDT formatter or compiler that can run as plain Java apps, I'm not sure you'll be able to get this code working without running it from inside an Eclipse Platform. But Eclipse Platform allows you to create "headless" applications that you can then package as standalone "product" and invoke by CLI to run whatever you want.
This requires to get familiar with PDE. Here are some entry points:
* Create a bundle and add to it an extension to org.eclipse.core.runtime.applications extension-point. The class you'll create is like the "main" of a Java app, it's where you should put your code.
* Create a .product which includes your bundle and its dependencies, configure your app as default and so on
* Export product as an archive
* Then run product with desired parameters.

Back to the top