/******************************************************************************* * Copyright (c) 2006-2012 * Software Technology Group, Dresden University of Technology * DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026 * * 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: * Software Technology Group - TU Dresden, Germany; * DevBoost GmbH - Berlin, Germany * - initial API and implementation ******************************************************************************/ package org.reuseware.coconut.compositionprogram.diagram.part; import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramActionBarContributor; import org.eclipse.jface.action.GroupMarker; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuManager; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IWorkbenchActionConstants; import org.eclipse.ui.IWorkbenchPage; /** * @generated */ public class CompositionprogramDiagramActionBarContributor extends DiagramActionBarContributor { /** * @generated */ protected Class getEditorClass() { return CompositionprogramDiagramEditor.class; } /** * @generated */ protected String getEditorId() { return CompositionprogramDiagramEditor.ID; } /** * @generated */ public void init(IActionBars bars, IWorkbenchPage page) { super.init(bars, page); // print preview IMenuManager fileMenu = bars.getMenuManager().findMenuUsingPath( IWorkbenchActionConstants.M_FILE); assert fileMenu != null; fileMenu.remove("pageSetupAction"); //$NON-NLS-1$ IMenuManager editMenu = bars.getMenuManager().findMenuUsingPath( IWorkbenchActionConstants.M_EDIT); assert editMenu != null; if (editMenu.find("validationGroup") == null) { //$NON-NLS-1$ editMenu.add(new GroupMarker("validationGroup")); //$NON-NLS-1$ } IAction validateAction = new ValidateAction(page); editMenu.appendToGroup("validationGroup", validateAction); //$NON-NLS-1$ } }