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

Bug 318071

Summary: "Go to Language Definition" should be available along more paths
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTDTAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 0.7   
Target Milestone: 0.7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
proposed implementation part 1
none
Implementation part 2 none

Description Stephan Herrmann CLA 2010-06-26 04:17:47 EDT
When the compiler reports an OT/J specific problem the Problems view
has a context menu action "Go to Language Definition".

This action should be available along more paths:
 - from the problem marker in the left gutter
 - from the hover of the problem, if possible
   (perhaps as another button next to "Configure Problem Severity")
Comment 1 Stephan Herrmann CLA 2010-06-27 18:16:22 EDT
Created attachment 172862 [details]
proposed implementation part 1

This patch implements part 1, i.e., the action in the gutter's context menu.

The structure is a bit more involved than expected because:
 - the otdt.ui plug-in which holds the current UpdateRulerAction should not 
   depend on otdt.ui.help
 - installing a new UpdateRulerAction from otdt.ui.help wasn't effective 
   if this plugin wasn't activated when contributions were initialized
   (see EditorPluginAction.editorChanged() -> isOkToCreateDelegate()).

Therefore, I created a new extension point in otdt.ui allowing otdt.ui.help
to register an extender that hooks into the existing UpdateRulerAction.

The rest of the implementation is mostly straight-forward.
Comment 2 Stephan Herrmann CLA 2010-06-27 19:22:34 EDT
Created attachment 172864 [details]
Implementation part 2

This little team class adds a "Go to Language Definition" button to the
toolbar of a java problem hover, if the problem is indeed OT/J related.
Comment 3 Stephan Herrmann CLA 2010-06-27 19:27:58 EDT
Implementation has been committed as r537 - r541.
Comment 4 Stephan Herrmann CLA 2010-07-02 13:20:08 EDT
Verified using build 201007011455.