I am developing a plugin which its command will be displayed only at certain packages which are under a specific package foo.com.network.svc . I found visibleWhen keyword. But I could not use it very well. Thanks in advance.
views:
296answers:
1
A:
Yes, after a series of trial and error efforts, I managed to limit visibility of the plugin which adds a command on right click at package explorer. Limit is to show command only in a package fragment under specific path. Below is some part of my plugin.xml that affects visibility.
<visibleWhen>
<iterate>enter
<adapt type="org.eclipse.core.resources.IResource">
<test property="org.eclipse.core.resources.path"
value="/foo/com/bar/svc/*"/>
<not>
<test property="org.eclipse.core.resources.path"
value="/foo/com/bar/svc/*/*"/>
</not>
</adapt>
</iterate>
</visibleWhen>
Erhan
2009-07-31 11:58:07