Auto-Expand Eclipse Plugin Banner

The My Eclipse plugin must be executed and deployed as a flat directory (it uses the JNI, and parts of the JNI need access to some files provided by the plugin). Is it possible to configure a plugin that will be automatically deployed if it is installed as a jar? Or is my only option is to ask the user to unzip its contents in the Eclipse dropins folder?

If it is not possible to deploy the plugin banner automatically, is it possible to create an update site configured to install the plugin in the folder of folders and deploy it?

+1
source share
3 answers

If you pack your plugins as a function, you can specify this behavior in the Feature manifest editor .

+2
source

The most common way to do this is to use org.osgi.framework.Bundle.getEntry(String) and then org.eclipse.core.runtime.FileLocator.toFileURL(URL) . getEntry("/jni_lib/") will return a URL pointing to the folder, and FileLocator will expand the requested binding URL to the local drive if necessary. This works if you use functions or not, if plugins are exported to disk or not, etc.

@vanaprogeja suggested the second most common option and needs functions to work (which is perfectly acceptable)

+2
source

You can check the unpack option when creating the Feature project for your plugin project.

+1
source

Source: https://habr.com/ru/post/1390086/


All Articles