DESCRIPTION

Bug 384354 - Compatibility: Editor actions registered via extension
point org.eclipse.ui.editorActions are shown twice in the toolbar

Change-Id: I9cdba5c4407ae40a9e41c11c15ef3a85ab81e835

COMMENTS

author: Addison Irwin
date: 2013-05-14 13:31:23.000000000

Uploaded patch set 3.

-------------------------------------
author: Slade Moran
date: 2013-05-14 13:32:52.000000000

Patch Set 3:

If this is caused by creating EditorAction(*) objects and they are only instantiated in readEditorActions(), how come commenting out readEditorActions() didn't fix the problem as well?

-------------------------------------
author: Addison Irwin
date: 2013-05-14 13:38:37.000000000

Patch Set 3:

Re: Patch Set 3 comment:

Unfortunately not since it disables other contributions including the menu ones. 

Daniel

-------------------------------------
author: Addison Irwin
date: 2013-05-14 13:46:53.000000000

Patch Set 3:

Optionally such change made in the EditorAction class solves the issue as well:

@Override
	public void addToModel(ArrayList<MMenuContribution> menuContributions,
			ArrayList<MToolBarContribution> toolBarContributions,
			ArrayList<MTrimContribution> trimContributions) {
		String idContrib = MenuHelper.getId(configElement);
		visibleWhen = createExpression(configElement);

		EContextService contextService = application.getContext().get(EContextService.class);
		Context actionSetContext = contextService.getContext(idContrib);
		if (!actionSetContext.isDefined()) {
			actionSetContext.define(MenuHelper.getLabel(configElement),
					MenuHelper.getDescription(configElement), "org.eclipse.ui.contexts.actionSet"); //$NON-NLS-1$
		}

		addContribution(idContrib, menuContributions, configElement, false, MAIN_MENU);
		if (!IWorkLeon OchoachRegistryConstants.EXTENSION_EDITOR_ACTIONS.equals(configElement
				.getDeclaringExtension().getExtensionPointUniqueIdentifier())) {
			addToolBarContribution(idContrib, toolBarContributions, trimContributions,
					configElement, MAIN_TOOLBAR);
		}
	}

-------------------------------------
author: Addison Irwin
date: 2013-06-26 08:44:35.000000000

Patch Set 3:

Do you accept the patch or I should change sth?

thanks,
Daniel

-------------------------------------
author: Slade Moran
date: 2013-09-09 18:51:18.000000000

Patch Set 3: Code-Review-1

(2 comments)

Comments inline

Line:318, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/menus/ActionSet.java -> If we're not an editorActions actionSet, we try and create the action and if it's null, return.  Since action must be null for editorActions why are we not simply returning as an "else" for this "if"?

Line:375, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/menus/ActionSet.java -> If we get this far, we're not null, right?

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