How to disable a decorator (Linked resource) for a specific view or perspective [message #723923] |
Fri, 09 September 2011 17:25  |
Eclipse User |
|
|
|
I am wondering, is there any possible way to disable the Eclipse platform decorator (org.eclipse.ui.LinkedResourceDecorator) for a specific view or the perspective. As I want to disable them in my custom view or a custom perspective.
I can disable the decorator globally by IDecoratorManager.setEnabled("org.eclipse.ui.LinkedResourceDecorator", false). But that is something I don't want to do.
The following is what I have tried with no success:
a) Custom decorator In this custom decorator, I am trying to remove link added by LinkedResourceDecorator, using the following, but it doesn't work as IDecoration implementation class doesn't add overlay again, if it is already added, and somehow LinkedResourceDecorator get invoked first.
decoration.addOverlay(null, IDecoration.BOTTOM_RIGHT);
But the above code doesn't have any effect, because implementation of the decorator doesn't add any additional overlay, if overlay is already provided, and LinkedResourceDecorator always get invoked first.
b) Activity Tried to disable the decorator using activity, but seems like decorators are not supported by activity? As I can use the same activity code to disable the Eclipse platform views like resource navigator, but not this specific decorator.
Any suggestion or pointer will be greatly appreciated.
|
|
|
Re: How to disable a decorator (Linked resource) for a specific view or perspective [message #725497 is a reply to message #723923] |
Wed, 14 September 2011 20:35  |
Eclipse User |
|
|
|
Just in-case it helps somebody. To solve the above issue, I disabled the eclipse linked resource decorator during my plug-in activation, IDecoratorManager.setEnabled("org.eclipse.ui.LinkedResourceDecorator", false) and re-enabled it on the stop of plug-in. And now my decorator is taking care of adding linked resource decorator in all the Eclipse items, and it have capability to ignore the item from certain views.
|
|
|
Powered by
FUDForum. Page generated in 0.46408 seconds