Display actions when a project has a certain file [message #326087] |
Fri, 07 March 2008 03:59  |
Eclipse User |
|
|
|
Hi,
I was able to show/hide menus when a project has this certain nature.
(posting it in case someone will find this useful)
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
adaptable="true"
id="menu"
objectClass="org.eclipse.core.resources.IProject">
<action
class="action.MyAction"
enablesFor="1"
id="action.MyAction"
label="My Action"
menubarPath="submenu/contents">
<enablement>
<objectState name="projectNature"
value="org.eclipse.jdt.core.javanature"/>
</enablement>
</action>
</objectContribution>
</extension>
I'd like to add another condition to display the menus, like if the
project has a pom file. I've read about propertyTester extension points
but i'm not sure how to and still reading about it. Aside from
propertyTester, is there other way of adding the condition?
Thanks
|
|
|
|
Powered by
FUDForum. Page generated in 0.02920 seconds