I*m trying to uninstall a feature from eclipse using p2 operations.
What I'm doing to achieve this:
OperationFactory of = new OperationFactory();
ProfileChangeOperation operation;
//toInstall = List<IVersionedId> only containing the feature
operation = of.createUninstallOperation(toInstall, repos, monitor);
After that, I'm running the operation.
The feature will be successfully uninstalled, but plugins that are part of this feature, which are no dependencies of other features / plugins will remain installed. This is unwanted behaviour.
I already tried to add
org.eclipse.equinox.p2.ui.sdk.scheduler/gcOnStartup=true
to my product properties.
I also tried to run
eclipse.exe -application org.eclipse.equinox.p2.garbagecollector.application -profile DefaultProfile
No effect.
I added
-profileProperties org.eclipse.update.install.features=true
to my program arguments. No effect.
Additionally I tried to implement GC programatically, which had no effect either.
Any idea how to fix this? P2 installs features including all dependant plugins. I expected it to behave the same on uninstall operations.
The problem only occured if buildig with tycho. I managed to fix this by adding org.eclipse.update.configurator
with start level 4 and Auto-Start = false to my product start levels.
Additionaly, I added org.eclipse.update.reconcile
with the value false to the properties in my product configuration.
By using this special combination of settings, uninstalled plugins won't show up anymore.