Reputation: 336
I am trying to add a property page to a project. In the first step i use the template wizard for the creation of a property page. I changed the targetclass value from org.eclipse.core.resources.IFile to org.eclipse.core.resources.IProject. But then i start the plugin and click on single project item the property page are not shown.
I have tested the following hints, but nothing work for me:
I simplified my code to this plugin.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.ui.propertyPages">
<page
name="TEST Sample Page"
nameFilter="*.*"
class="testplugin.properties.SamplePropertyPage"
id="testplugin.properties.samplePropertyPage">
<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject">
<test property="org.eclipse.core.resources.projectNature"
value="org.eclipse.jdt.core.javanature"/>
</adapt>
</enabledWhen>
</page>
</extension>
</plugin>
Does anyone have a hint for me?
Thx. Ben
Upvotes: 0
Views: 1255
Reputation: 111217
Remove the nameFilter="*.*"
. This is only appropriate for trying to match particular file types, not projects.
You are also restricting the property page to only show on Java projects.
Upvotes: 1