Enable Popup based on Filetype [message #334073] |
Mon, 19 January 2009 05:20  |
Eclipse User |
|
|
|
Hello,
short version:
How can I enable a popup action based on a base-content-type?
Eclipse Ganymede
Version: 3.4.1
Build id: M20080911-1700
Updated to the most recent version P2 could find
long version:
My plugin uses a bunch of files that can be recognized by their file
extension. So far I only had an Editor and some other custom code that I
associated with these file extensions.
Now however, I created a popup menu entry in the Project Explorer menu
to perform an action on my files. I want this action to be enabled only
when only files of my type are selected.
Googling around I found out, that I could use "objectTypeId" as a name
in objectState to control the enablement. Thus, I created a file type to
be associated with my files and several subtypes. The base-type is
basically abstract, all the semantics are linked to the subtypes. I
converted the editor from file extensions to use the base-type - works
perfectly.
Then I set the enablement of my popup. This however does not work when I
use the base-type - I have to give the specific subtype for my entry to
be enabled.
Is this a limitation (or bug) in Eclipse or am I missing something?
Regards,
Damian Philipp
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03405 seconds