blob: 4070d59da9f7dede140139402edc970ede39347d [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.stem.model.ui.editor;
import org.eclipse.gef.ContextMenuProvider;
import org.eclipse.gef.EditPartViewer;
import org.eclipse.gef.ui.actions.ActionRegistry;
import org.eclipse.gef.ui.actions.GEFActionConstants;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.ui.actions.ActionFactory;
class ModelDiagramEditorContextMenuProvider extends ContextMenuProvider {
private ActionRegistry registry;
public ModelDiagramEditorContextMenuProvider(EditPartViewer viewer,
ActionRegistry registry) {
super(viewer);
this.registry = registry;
}
public void buildContextMenu(IMenuManager menu) {
GEFActionConstants.addStandardActionGroups(menu);
menu.appendToGroup(GEFActionConstants.GROUP_EDIT,
registry.getAction(ActionFactory.DELETE.getId()));
}
}