I try to implement a property page for an eclipse plugin which is only visible when the selected file has a specific persistentProperty e.g. TYPE.
I create a file prorammatically in the project and add a persistentProperty with the following code:
file.setPersistentProperty(
new QualifiedName("", "TYPE"),
"Example");
In next step i configure the PropPage-Setting in the plugin.xml:
<page
adaptable="true"
class="propPage.FilePropertyPage"
id="propPage.FilePropertyPage"
name="FilePropertyPage">
<enabledWhen>
<adapt
type="org.eclipse.core.resources.IResource">
<test
property="org.eclipse.core.resources.persistentProperty"
value="TYPE">
</test>
</adapt>
</enabledWhen>
</page>
But i cant see my PropertyPage for the specific file.
The following code works fine for the PropertyPages for files with the extension .jsp :
<page
adaptable="true"
class="propPage.FilePropertyPage"
id="propPage.FilePropertyPage"
name="FilePropertyPage">
<enabledWhen>
<adapt
type="org.eclipse.core.resources.IResource">
<test
property="org.eclipse.core.resources.name"
value="*.jsp">
</test>
</adapt>
</enabledWhen>
</page>
When i read the PersistentProperty with the following code is works also fine:
...file.getPersistentProperty ...
Can anybody help me ?!
Thanks