It depends on how you plan to use this plugin and the main question: is there a case where your dependencies in the user interface will not be available, i.e. Is there a package configuration without SWT and RCP packets?
No user interfaces available
In this case, you will need to extract the headless part of your plugin into a new plugin, which then registers a mute entry point. Part of the plugin's user interface will depend on the new plugin and simply delegate the user interface requests to the corresponding API in the headless part.
To provide a headless application, you should take a look at the org.eclipse.equinox.app.IApplication
interface and the org.eclipse.equinox.applications
extension point, respectively. When you have defined the application, you launch it by simply calling:
eclipse -application <app-id> <app-param>
More information can be found in the Eclipse Help .
Accessible user interface
The simplest case. You need to specify only the access point without a head, and everything will work as before.
However, my experience shows that sooner or later a case arises when a plug-in needs to be divided, and depending on its complexity, it can cause more problems than it would if it had been unchained earlier.
source share