Reputation: 300
I have a plugin which contributes a label decorator to org.ui.eclipse.decorators
.
I want this label decorator now to be inactive by default, which is achieved quite straight forward by setting its state
-attribute to false
.
Now to the point of my question: Is it possible to change the state of this decorator programmatically from another plugin? The User can check and uncheck this decorator from the global preferences, but can this also be achieved by another plugin?
Thanks in advance!
Upvotes: 2
Views: 226
Reputation: 111142
You can enable (or disable) a decorator using:
IDecoratorManager manager = PlatformUI.getWorkbench().getDecoratorManager();
manager.setEnabled("decorator id", true);
Upvotes: 3