Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Unable to fire propertyTester
Unable to fire propertyTester [message #1046797] Mon, 22 April 2013 11:34
Pavan D is currently offline Pavan DFriend
Messages: 7
Registered: February 2011
Junior Member
I am trying to add a new entry into the context menu in our application. I want it to get enabled when a certain condition is met. I have looked up for PropertyTesters and tried to give it a shot. This is what I have come up with.


<extension point="org.eclipse.ui.menus">
   <menuContribution locationURI="popup:org.eclipse.ui.popup.any?after=group.immunity">
            <command commandId="MultipleERPContext.commands.sampleCommand" id="com.rac.samplecmd">
                <visibleWhen>  
                <and>                  
                        <test
                            forcePluginActivation="true"
                            property="com.rac.kernel.MyTCComponent.isERPConfigured">
                        </test>
                    </and>             
                </visibleWhen>
            </command>
    </menuContribution>
      </extension>


    <extension point="org.eclipse.core.expressions.propertyTesters">        
        <propertyTester
            class="testers.ERPTester"
            id="com.tcs.rac.testers.ERPTester"
            namespace="com.rac.kernel.MyTCComponent"
            properties="isERPConfigured"
            type="com.teamcenter.rac.kernel.TCComponent">
        </propertyTester>

    </extension>



public class ERPTester extends PropertyTester 
{
    @Override
    public boolean test(Object arg0, String arg1, Object[] arg2, Object arg3) 
    {
        System.out.println("Reached the method test");
        return true;
    }

}


Everything seems to be fine...but somehow, that menu entry is not coming up at all. Moreover, I am not able to see my 'test' method getting hit.

Requesting you to share your thoughts on it.

thanks, Pavan.

[Updated on: Mon, 22 April 2013 11:35]

Report message to a moderator

Previous Topic:How-to Extend the Eclipse Search Wizard
Next Topic:Streaming live video in a ViewPart
Goto Forum:
  


Current Time: Fri Apr 26 01:13:49 GMT 2024

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

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

Back to the top