Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323141 - [context-menu] Cleanup introspection code for command contribution items
Summary: [context-menu] Cleanup introspection code for command contribution items
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.3   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 3.3 M3   Edit
Assignee: Martin Oberhuber CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on: 276185 319618
Blocks:
  Show dependency tree
 
Reported: 2010-08-19 09:39 EDT by Martin Oberhuber CLA
Modified: 2010-11-16 07:57 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2010-08-19 09:39:04 EDT
+++ This bug was initially created as a clone of Bug #319618 +++

Eclipse Platform bug 276185 promises adding API to Eclipse 3.7 which should make the introspection code in RSE unnecessary. Once that API is available, an API call should be used if possible. The introspection code should remain as fallback for older Eclipse Platform, in case the method is not available.

As per bug 319618 comment 4, the usage of "widget" should also be reviewed.
Comment 1 Martin Oberhuber CLA 2010-11-09 08:00:48 EST
RSE 3.3m3 and newer is now using Platform API if running on Eclipse 3.7m3 or newer.

Note that the new API only returns the tooltip text WITHOUT computed accelerator, whereas the old introspection code returned the accelerator as well. Example:

  OLD: Refresh information of selected resource (F5)
  NEW: Refresh information of selected resource 

  OLD: Show Properties of Selection (Alt+Enter)
  NEW: Show Properties of Selection

I think the new solution is better in line with the tool tip returned for older menu contributions that are not done via the o.e.ui.menus extension point - none of those had returned an accelerator.