[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Eclipse 3.3 commands and property testers

Christopher Hammack wrote:
<extension
     point="org.eclipse.core.expressions.propertyTesters">
  <propertyTester
        class="com.foo.menus.MenuPropertyTester"
        id="com.foo.menus.MenuPropertyTester"
        namespace="com.foo.menus"
        properties="test123"
        type="java.lang.Object">
  </propertyTester>
</extension>


Here is my handler: <handler class="com.foo.menus.MenuRetrievalHandler" commandId="com.foo.menus.bundleProductRetrieval"> <enabledWhen> <with variable="activeContexts"> <test property="com.foo.menus.test123"> </test> </with> </enabledWhen> </handler>



Your definitions look fine. Things I would try in order:

1) change the variable from activeContexts to activePart (I don't know that it makes a difference, but I'd try it anyway :-)

2) See if it's just a bundle activation delay, try adding an org.eclipse.ui.startup extension (and point it to a dummy class, not your plugin activator class). It might be it is not loading the property tester, although I thought it should default to true if it wasn't.

3) check your workspace logs for any errors ... <workspace>/.metadata/.log

4) If that doesn't work I would try downloading today's I build into a temp location (I20070417-0800) and testing it from that platform. There were a couple of bugs fixed with contexts and plugin loading in the last 2 weeks that wouldn't be in 3.3M6

PW