propertyTester not called (limiting context menu visibility)

Tell us what you think about our book and report any errata. Sample chapters are available at

(Note: Previous Editions were called "Eclipse: Building Commercial Quality Plugins")

Moderators: Eric Clayberg, Dan Rubel

propertyTester not called (limiting context menu visibility)

Postby Bewa » Tue Apr 07, 2009 5:15 am

Hallo everyone,

I have been reprogramming the code from the book and I am currently stuck in chapter 6.
I have my view (which is basicly the favorites view with a different name), the add- and show-commands are working, but the context menu makes me some troubles.

Limiting the visibility of the context menu works when I just check wether the selected element is an instance of IResource or IJavaElement, but when also using the propertyTester, it is not shown.
When my view is not open, it is visible, but only until I open the view or execute the add-command. After that, my menu item does not appear ever again and the propertyTester is never called (I added a System.out.println() to its method).

I have checked for misspellings over and over, tried alternative spellings and things like that, but I could not get it working.
Messing with the namespace (removing the namespace from the property-attribute of the test-node leaving just the name of the property) caused the menu item to be shown while eclipse reported a lot of related errors, so I guess the problem must be in the second code snippet.

Can you help me? Any help would be appreciated!

Here the snippets from the plugin.xml:
Code: Select all
               label="Test Cases">

Code: Select all
            properties="isInPool, notInPool"
Posts: 1
Joined: Mon Apr 06, 2009 9:48 pm

Return to Book: Eclipse Plug-Ins (3rd Edition)

Who is online

Users browsing this forum: No registered users and 1 guest