| Override definitions in plugin.xml [message #633851] |
Tue, 19 October 2010 11:35  |
andy Messages: 13 Registered: October 2010 |
Junior Member |
|
|
is it possible to override definitions in plugin.xml?
For example, I want the definition "org.eclipse.ui.examples.contributions.view.inView" to return true for some views I have added for which it is not turning true, so I have added:
<extension
point="org.eclipse.core.expressions.definitions">
<definition id="org.eclipse.ui.examples.contributions.view.inView">
<or>
<instanceof
value="com.acme.navigator.ContainerObject">
</instanceof>
<instanceof
value="com.acme.navigator.RootObject">
</instanceof>
<adapt type="org.eclipse.core.resources.IResource">
<test
property="org.eclipse.core.resources.projectNature"
value="com.acme.navigator.nature">
</test>
</adapt>
</or>
</definition>
</extension>
To the top of my eclipse plugins plugin.xml. It doesn't appear to be working, should it be?
|
|
|
|
| Re: Override definitions in plugin.xml [message #634008 is a reply to message #633851] |
Wed, 20 October 2010 05:14   |
andy Messages: 13 Registered: October 2010 |
Junior Member |
|
|
Edit: Thanks for the response paul, the below post was written having not read it. I will look in to that register now.
(I'm trying to change File -> Refresh so that 'Refresh' is enabled more often than it currently is - I have some views for which Refresh should work, but eclipse won't let me push it!)
So far I have tried
1. Adding a commandListener to to the command 'org.eclipse.ui.file.refresh' to setEnabled(true) whenever it changes.
This does not work, I assume the change is fired before <enabledWhen> is evaluated.
2. Override the "org.eclipse.ui.examples.contributions.view.inView" definition by adding my own "org.eclipse.ui.examples.contributions.view.inView" definition to my plugin.xml
This does not work, I assume that the attempt to override is being ignored.
I can't believe there is no way to modify the behaviour of the standard menu in eclipse, what am I missing here?
[Updated on: Wed, 20 October 2010 05:16] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01546 seconds