Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » RCP PropertyTester doesn't work
RCP PropertyTester doesn't work [message #990457] Wed, 12 December 2012 10:17
Eclipse UserFriend
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 10:18] by Moderator

Previous Topic:Retrieving the SourceProvider
Next Topic:When are menu contributions from plugin.xml added?
Goto Forum:
  


Current Time: Sun Jul 06 12:21:20 EDT 2025

Powered by FUDForum. Page generated in 0.04744 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top