blob: d2217e0f34e77e2e4a7776a1934452090021875c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2005, 2009 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 implementation
*******************************************************************************/
package org.eclipse.epf.diagram.core.providers;
import org.eclipse.epf.diagram.core.actions.DelegateAction;
import org.eclipse.gmf.runtime.common.ui.util.IWorkbenchPartDescriptor;
import org.eclipse.jface.action.IAction;
import org.eclipse.ui.actions.ActionFactory;
/**
* Core diagram contribution item provider.
* It provides contributions generic to EPF diagram editors
* @author Shashidhar Kannoori
*
*/
public class DiagramContributionItemProvider
extends
org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContributionItemProvider {
@Override
protected IAction createAction(String actionId, IWorkbenchPartDescriptor partDescriptor) {
if(actionId.equals(ActionFactory.DELETE.getId())){
return new DelegateAction(partDescriptor.getPartPage());
}
return super.createAction(actionId, partDescriptor);
}
}