Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to disable a decorator (Linked resource) for a specific view or perspective
icon5.gif  How to disable a decorator (Linked resource) for a specific view or perspective [message #723923] Fri, 09 September 2011 21:25 Go to next message
Hemant Singh is currently offline Hemant SinghFriend
Messages: 24
Registered: January 2010
Junior Member
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] Thu, 15 September 2011 00:35 Go to previous message
Hemant Singh is currently offline Hemant SinghFriend
Messages: 24
Registered: January 2010
Junior Member
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.
Previous Topic:require editor-save when activating import wizard
Next Topic:How could we shield selection using right-click
Goto Forum:
  


Current Time: Fri Apr 19 05:08:52 GMT 2024

Powered by FUDForum. Page generated in 0.02126 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top