I am trying to create a property page using plugin.xml. I want this property page to appear only when you right click -> properties of folders only.
I used this code:
<extension
point="org.eclipse.ui.propertyPages">
<page
class="my.properties.page.class"
id="my.properties.page.id"
name="My Properties Page">
<enabledWhen>
<instanceof value="org.eclipse.core.resources.IFolder"/>
</enabledWhen>
</page>
</extension>
This works when I open the properties from Navigator. But when opening it from Project Explorer, I can't see the properties page!
From Navigator:
From Project Explorer:
How can I make my properties page to be shown using Project explorer too?
Use:
<adapt type="org.eclipse.core.resources.IFolder" />
instead of instanceof
.
Most objects in views are not actually instances of files and folders. Instead they are some UI object which can be 'adapted' to a file or folder, the adapt
element deals with this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With