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

Bug 324871

Summary: Incorrect help for command added as a menuContribution
Product: [Eclipse Project] JDT Reporter: Deepak Azad <deepakazad>
Component: DocAssignee: Deepak Azad <deepakazad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cgold, daniel_megert
Version: 3.7   
Target Milestone: 3.7 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
screenshot
none
Suggested patch to jdt.doc.user none

Description Deepak Azad CLA 2010-09-09 13:00:38 EDT
I found this while fixing bug 324857. 

Steps
- Expand Navigate menu
- Hover over 'Open from Clipboard'
- Press F1 => help opens (see the attached screenshot)

Problem in the screenshot
- 'About Java Editor' and 'Search for Java Editor' lines are incorrect, they should be 'About Open from Clipboard' and 'Search for Open from Clipboard'

'Open from Clipboard' is added as a menuContribution (the helpContextId is picked up correctly and the correct description and links are shown in help, these are marked in the attached screenshot as well)
 <extension 
         point="org.eclipse.ui.menus">
       <menuContribution
            locationURI="menu:navigate?endof=open.ext">
        <command
              commandId="org.eclipse.jdt.debug.ui.command.OpenFromClipboard"
              helpContextId="org.eclipse.jdt.debug.ui.open_from_clipboard_action_context"
              label="%OpenFromClipboardAction.label"
              tooltip="%OpenFromClipboardAction.tooltip"
              style="push">
        </command>
       </menuContribution>
   </extension>

Note: To reproduce this bug, you might have to apply the patch from bug 324857 as it is not in a build at this time.
Comment 1 Deepak Azad CLA 2010-09-09 13:10:35 EDT
Created attachment 178534 [details]
screenshot
Comment 2 Chris Goldthorpe CLA 2010-09-20 19:11:54 EDT
Created attachment 179290 [details]
Suggested patch to jdt.doc.user

This patch adds a title attribute to this context. If there is no title attribute the title will be derived from whichever view/editor had focus at the time the menu was selected.
Comment 3 Chris Goldthorpe CLA 2010-09-20 19:13:04 EDT
Reassigning back to JDT to review the patch
Comment 4 Deepak Azad CLA 2010-09-21 00:21:30 EDT
oops.. mea culpa. Thanks for the patch Chris!

Fixed in HEAD.