Using the eclipse plugin independent of eclipse

Is it possible to programmatically use the Eclipse plugin in my java code (so that it does not depend on eclipse)?

+5
source share
5 answers

Yes, if:

  • The plugin you want to use has no external dependencies => it is just a library plugin

  • The plugin you want to use and ALL of its dependencies are in your classpath

Not in all other cases. Since many plugins use at least the basic OSGI / Equinox concepts (have an activator), it will be quite difficult to use them in a standalone java application.

For example, SWT can be used outside the eclipse.

+1

eclipse. .jar. , .

0

, , , jar .

0

"" . , . OSGi - , .

, .

0

Eclipse - OSGi.

OSGi packages are JAR files that have additional information in META-INF that announces export and import. Sometimes they invoke OSGi API calls.

Many Eclipse plugins are dependent on other Eclipse related plugins.

If you use OSGi in your environment, you can easily reuse plugins that don't have Eclipse dependencies. If your application is not OSGi, you can simply reuse those that avoid the direct use of the OSGi API.

0
source

All Articles