blob: 5f5f8bb183347556825f8ccb7d6bbcbcab57a0bf [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
* IBM Corporation, BfR, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* IBM Corporation - initial API and implementation and new features
* Bundesinstitut für Risikobewertung - Pajek Graph interface, new Veterinary Models
*******************************************************************************/
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()));
}
}