Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324871 - Incorrect help for command added as a menuContribution
Summary: Incorrect help for command added as a menuContribution
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Doc (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M3   Edit
Assignee: Deepak Azad CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-09 13:00 EDT by Deepak Azad CLA
Modified: 2010-09-21 00:21 EDT (History)
2 users (show)

See Also:


Attachments
screenshot (115.60 KB, image/bmp)
2010-09-09 13:10 EDT, Deepak Azad CLA
no flags Details
Suggested patch to jdt.doc.user (1002 bytes, patch)
2010-09-20 19:11 EDT, Chris Goldthorpe CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.