Community
Participate
Working Groups
Within the RSE system view, or table view, if a context menu item is contributed via org.eclipse.ui.menu and becomes a "CommandContributionItem", the RSE menu listener cannot deal with this type of menu items and does not show the tool tip of this icon within the status bar. This looks very inconsistent and not explainable to the user, and it blocks one of our product requirements.
CQID: WIND00222944
Created attachment 174075 [details] Patch adding the CommandContributionItem awareness
Patch committed to HEAD
I am concerned about using introspection here, and I have filed bug 319693 against Platform/UI to get proper API for retrieving the tooltip text from a CommandContributionItem. I would like to hear the Platform/UI team's response before relying on introspection here, before I release this change into the 3.2.1 stream. Moreover, from the attached patch the the introspection call for retrieving the "widget" seems unnecessary since the widget is already known to RSE as "event.widget" in widgetArmed(ArmEvent event) - see http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewMenuListener.java?root=DSDP_Project&view=markup
I'm releasing the change to 3.2.1 , and filed bug 323141 to use real API once it's available from the Platform.
I've noticed I get the following error in SystemViewMenuListener line 171 with this change: The method getData() is undefined for the type CommandContributionItem Is this expected?
You need Eclipse 3.7 M3 as target platform to make it build.
(In reply to comment #7) > You need Eclipse 3.7 M3 as target platform to make it build. Okay. Is there no way to make the code compile for earlier releases as well?
Sure, by using reflection instead. Martin O. made the change to use the 3.7 API, so I guess he had been OK with making 3.7 M3 the minimum for the required build target platform. It runs with older Eclipse versions nonetheless btw.
We cannot use the new API when we compile against old Eclipse. The code has a fallback for _running_ on old Eclipse but we need to _compile_ against new Eclipse. Advantage of using the new API is that we're protected from internal changes in the Platform.