[ad_1]
I’m building an Eclipse RCP product with Maven/Tycho and need to make it load a plugin_customization.ini
file with certain product preferences and cannot achieve this.
Launch arguments
I’ve added -pluginCustomization
to the launch arguments of the product. This works with a local path to the plugin_customization.ini
file. However, in the final product the plugin_customization.ini
file is contained in a bundle, but I cannot access that. A URI with the platform:/plugin/
suffix does not work.
config.ini
Adding the same as value of the eclipse.pluginCustomization
key to the generated config.ini
of the product has the same problem. It can access the local file, but not the one in a product bundle.
I couldn’t figure out any possibility to add the plugin_customization.ini
directly to the product outside of any bundle jar.
org.eclipse.core.runtime.products
extension
According to the docs you can pass a plugin_customization.ini
as value of the preferenceCustomization
property of a org.eclipse.core.runtime.products
extension in a product plugin. Also without success.
Instead of loading a plugin_customization.ini
I may add a bundle with an activator that sets the required preferences on startup. That seems to be some overkill, because there are the above means of setting preferences. However, that will be my last resort.
- Is it possible to add a file (
plugin_customization.ini
in this case) to an Eclipse product outside of a jar? How? - Does the
platform:/plugin/
URI in principle work with launch arguments or in aconfig.ini
or is there an alternative to access a file in a bundle? - What else can I try?
- Eclipse: 2022-03
- Maven: 3.6.3
- Platform: Ubuntu 20.04
[ad_2]