/** | |
* <copyright> | |
* | |
* Copyright (c) 2013 itemis 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/org/documents/epl-2.0/EPL-2.0.html | |
* | |
* Contributors: | |
* itemis - Initial API and implementation | |
* | |
* </copyright> | |
*/ | |
package org.eclipse.sphinx.examples.hummingbird20.diagram.gmf.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 Hummingbird20DiagramActionBarContributor extends DiagramActionBarContributor { | |
/** | |
* @generated | |
*/ | |
@Override | |
protected Class getEditorClass() { | |
return Hummingbird20DiagramEditor.class; | |
} | |
/** | |
* @generated | |
*/ | |
@Override | |
protected String getEditorId() { | |
return Hummingbird20DiagramEditor.ID; | |
} | |
/** | |
* @generated | |
*/ | |
@Override | |
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$ | |
} | |
} |