DESCRIPTION

Bug 463280 - Setting a manual mnemonic in the titel of a HandledMenuItem
with & is ignored

Signed-off-by: Kinley Gomez xxx@xxx.xxx

COMMENTS

author: Kinley Gomez
date: 2015-03-27 15:07:57.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2015-03-27 15:09:17.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/5205/

-------------------------------------
author: Brenden Conley
date: 2015-03-27 15:29:00.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/5205/ : SUCCESS

-------------------------------------
author: Teagan Marsh
date: 2015-03-31 20:04:09.000000000

Patch Set 1:

Thanks Christoph.  Would it be possible for you to make a test in ModelReconcilerMenuItemTest similar to testMenuItem_Mnemonics()?  Also, ShowInMenu#fillMenu() does an explicit length==1 test

-------------------------------------
author: Kinley Gomez
date: 2015-04-01 08:34:01.000000000

Patch Set 1:

I'll be glad to give it a shot. Is there documentation on setting up and running the e4 tests? Do you have a repostiory for the extra dependencies (org.hamcrest and org.mockito)?

-------------------------------------
author: Kinley Gomez
date: 2015-04-01 08:55:29.000000000

Patch Set 1:

Cancle that. I found an article by Lars explaining the test setup.

-------------------------------------
author: Zaid Mosley
date: 2015-04-01 09:06:59.000000000

Patch Set 1:

If me description is missing something, let me know.

-------------------------------------
author: Kinley Gomez
date: 2015-04-01 09:15:47.000000000

Patch Set 1:

Sorry, I'm stuck. I can set up the application model for the test.

MApplication application = createApplication();
MWindow window = createWindow(application);
MMenu menu = MenuFactoryImpl.eINSTANCE.createMenu();
window.setMainMenu(menu);

MMenuItem menuItem = MenuFactoryImpl.eINSTANCE.createDirectMenuItem();
menu.getChildren().add(menuItem);
// Set manual mnemonic in label
menuItem.setLabel("Hello &World");
// Set empty string as mnemonic in property
menuItem.setMnemonics("");

But I don't know how to proceed from here. Since the bug happens during rendering, I would need a way to (1) trigger the rendering of the MMenuItem and then (2) check the mnemonic on the created SWT MenuItem.

-------------------------------------
