CoreException when using property tester to hide action in popup menu [message #327415] |
Fri, 18 April 2008 02:53  |
Eclipse User |
|
|
|
In my plugin.xml, i used objectContribution/enablement/test to make an
action of a popup menu visible if the selection is a Project and contains
certain file.
Created a property tester that checks if it contains the file.
plugin.xml
<extension point="org...popupMenus">
<objectContribution
adaptable="true"
objectClass="org.eclipse.core.resources.IProject"
<enablement>
<test property="x.y.z.hasFile" />
</enablement>
<action...
</extension>
<extension point="org...propertyTesters" >
<propertyTester id="x.y.z.MyTester"
type="org.eclipse.core.resources.IProject"
namespace="x.y.z"
properties="hasFile"
class="x.y.z.MyTester"
</propertyTester>
</extension>
MyTester.java
public boolean test(...) {
// do something and return boolean
}
However, I got CoreException "No property tester contributes a property
hasFile to type class org.eclipse.core.internal.resources.Project"
What's wrong with what I did?
My guess is in my plugin.xml, I defined IProject type. But as you can see
in the exception "...No property tester... to type class org...Project"
I've been searching a lot of related threads here but none seems to be the
same as what I have encountered..
Any help will be appreciated, thanks.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05169 seconds