| /* |
| * Copyright (c) 2007 Borland Software Corporation |
| * |
| * 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: |
| * Dmitry Stadnik (Borland) - initial API and implementation |
| */ |
| package org.eclipse.gmf.examples.taipan.port.diagram.part; |
| |
| import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramActionBarContributor; |
| import org.eclipse.jface.action.IMenuManager; |
| import org.eclipse.ui.IActionBars; |
| import org.eclipse.ui.IWorkbenchActionConstants; |
| import org.eclipse.ui.IWorkbenchPage; |
| |
| /** |
| * @generated |
| */ |
| public class TaiPanDiagramActionBarContributor extends DiagramActionBarContributor { |
| |
| /** |
| * @generated |
| */ |
| protected Class getEditorClass() { |
| return PortDiagramEditor.class; |
| } |
| |
| /** |
| * @generated |
| */ |
| protected String getEditorId() { |
| return PortDiagramEditor.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$ |
| } |
| } |