Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323141

Summary: [context-menu] Cleanup introspection code for command contribution items
Product: [Tools] Target Management Reporter: Martin Oberhuber <mober.at+eclipse>
Component: RSEAssignee: Martin Oberhuber <mober.at+eclipse>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: enhancement    
Priority: P3 CC: uwe.st
Version: 3.3   
Target Milestone: 3.3 M3   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on: 276185, 319618    
Bug Blocks:    

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.