Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353029 - [Commands] regression: menu contribution command bound to org.eclipse.ui.file.import does not use label provided, instead displays wizard name
Summary: [Commands] regression: menu contribution command bound to org.eclipse.ui.file...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.2 M6   Edit
Assignee: Paul Webster CLA
QA Contact: Paul Webster CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-25 14:45 EDT by Eddie Galvez CLA
Modified: 2013-09-03 14:16 EDT (History)
4 users (show)

See Also:


Attachments
source project demonstrating issue (5.56 KB, application/x-download)
2011-08-02 11:20 EDT, Eddie Galvez CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eddie Galvez CLA 2011-07-25 14:45:01 EDT
Build Identifier: 3.7.0

In 3.6, a menuContribution of a command whose commandId was "org.eclipse.ui.file.import" would show up in the menu bar as an option whose text was taken from the command's label (for example, "My Command...")

Since 3.7, our menu command now reads "My Command", which is the name of the WIZARD (as bound using the command parameter importWizardId). As you can imagine, we can't change the wizard's name to have the ellipsis, but we'd like them back in the menu text.

Reproducible: Always

Steps to Reproduce:
See details
Comment 1 Oleg Besedin CLA 2011-07-26 10:27:30 EDT
Could you provide code that reproduces the problem?
Comment 2 Eddie Galvez CLA 2011-08-02 11:20:57 EDT
Created attachment 200728 [details]
source project demonstrating issue
Comment 3 Eddie Galvez CLA 2011-08-02 11:21:14 EDT
Attached, a project that contributes an import wizard and a menu contribution to the File menu.

Launched against and in Eclipse 3.6, you see the menu contribution's label and icon
Launched against and in Eclipse 3.7, you see the wizard's label (and the import icon coming from somewhere)

As I stated, this regression I believe is important, because this use case shows how you cannot thus end up with a menu contribution to a wizard with a label applicable to a menu entry ("..." to signify a dialog will appear), but having the proper label (no "...") in the wizard selection dialog!
Comment 4 Dani Megert CLA 2011-08-03 02:53:52 EDT
Maybe caused by fix for bug 327690?
Comment 5 Eddie Galvez CLA 2011-08-18 10:43:58 EDT
any possibility to schedule this for 3.7.2? is there a possible workaround to get the contribution to appear with a label we want in the menu bar? (even if it's a programmatic "hack" at plug-in start)
Comment 6 Paul Webster CLA 2011-08-19 12:02:51 EDT
I can get this fixed for 3.8, but won't be able to look at it in time for 3.7.2.  If someone contributes a patch, we can consider it for 3.7.2, though.

PW
Comment 7 Eddie Galvez CLA 2012-03-12 10:19:05 EDT
We can live with just waiting for 3.8 (it's cosmetic, just has us miss a "..." we used to have in the menu label)
Comment 8 Paul Webster CLA 2012-03-12 15:03:54 EDT
I've released a fix for 3.8 and 4.2

PW
Comment 9 Dani Megert CLA 2012-03-13 05:17:25 EDT
(In reply to comment #8)
> I've released a fix for 3.8 and 4.2
> 
> PW

The fix "works" but in general strings should not be concatenated in the code. There might be languages which use a different terminology than "...".
Comment 10 Paul Webster CLA 2012-03-13 06:07:28 EDT
This is low risk enough that we can fix it correctly for tomorrow.

PW
Comment 11 Paul Webster CLA 2012-03-13 15:24:32 EDT
Released to 4.2 and 3.8
PW
Comment 12 Dani Megert CLA 2012-03-14 04:59:20 EDT
Verified through code review.
Comment 13 Uwe Peuker CLA 2013-09-03 09:07:05 EDT
The bug seems to be resurrected in Eclipse 4.3.

The label and the icon of the contribution item in a view menu or view toolbar will be overwritten by the assigned (newWizardId, importWizardId, exportWizardId) wizard.

This affects not only the default label of the command but also the label and icon defined in the view menu contribution (if there is any).
Comment 14 Uwe Peuker CLA 2013-09-03 09:43:23 EDT
To my previous comment.
The application is an Eclipse 4.3 RCP application using the compatibiliy layer.
Comment 15 Dani Megert CLA 2013-09-03 11:34:39 EDT
(In reply to Uwe Peuker from comment #13)
> The bug seems to be resurrected in Eclipse 4.3.
> 
> The label and the icon of the contribution item in a view menu or view
> toolbar will be overwritten by the assigned (newWizardId, importWizardId,
> exportWizardId) wizard.
> 
> This affects not only the default label of the command but also the label
> and icon defined in the view menu contribution (if there is any).

I suggest you open a new bug with exact steps/example.
Comment 16 Uwe Peuker CLA 2013-09-03 14:16:01 EDT
(In reply to Dani Megert from comment #15)
> I suggest you open a new bug with exact steps/example.

Done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=416461