Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: ccb2ec18b22be4dae0e48d9ac8d14e09e02f284c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*****************************************************************************
 * Copyright (c) 2009-2011 CEA LIST.
 *
 *    
 * 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:
 *  Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
 *
 *****************************************************************************/
package org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gef.requests.GroupRequest;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ViewComponentEditPolicy;

/**
 * this editpolicy is used to prevent deletion from the diagram
 *
 */
public class NoDeleteFromDiagramEditPolicy extends ViewComponentEditPolicy {
	@Override
	protected Command getDeleteCommand(GroupRequest request) {
		return UnexecutableCommand.INSTANCE;
	}
}

Back to the top