RCP PropertyTester doesn't work [message #990457] |
Wed, 12 December 2012 15:17 |
Bartosz Popiela Messages: 21 Registered: March 2012 |
Junior Member |
|
|
I'm developing some Eclipse RCP 3.5.1 application and trying to add my custom command to popup in MyNavigatorView for paths in workspace matching some pattern, for example "MyProject/MyDir1/*". As I know, IVariableResolver support isn't implemented in Eclipse RCP 3.5. Is there any other elegant way to do such thing?
I also tried to add custom property tester, but it doesn't work.
Here is my plugin.xml:
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:MyNavigatorView.popupMenu">
<command commandId="my.command.id" label="my command label"
style="push" >
<visibleWhen>
<with variable="activeMenuSelection">
<iterate ifEmpty="false">
<adapt type="org.eclipse.core.resources.IFolder">
<!-- <test property="org.eclipse.core.resources.name" value="MyDirectory" /> --> <!-- such property tester works ! -->
<test property="my.plugin.dirtype" value="MyDirectory" />
</adapt>
</iterate>
</with>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.commands">
<command description="Do something with a model element" id="my.command.id"
name="Do Something">
</command>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="my.plugin.AddFormHandler"
commandId="my.command.id">
</handler>
</extension>
<extension point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
class="my.plugin.DirTypePropertyTester"
id="my.plugin.dirTypePropertyTester"
namespace="my.plugin"
properties="dirtype"
type="org.eclipse.core.resources.IResource">
</propertyTester>
</extension>
my.plugin.DirTypePropertyTester class extends org.eclipse.core.expressions.PropertyTester, but test method isn't called.
Any ideas what is wrong?
[Updated on: Wed, 12 December 2012 15:18] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03137 seconds