Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 035cfbfda702b50d2c4582f2f1d5a21cf852c2e3 (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
31
32
33
34
35
36
/*****************************************************************************
 * Copyright (c) 2009 ATOS ORIGIN.
 *
 *
 * 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
 *
 *  Tristan Faure (ATOS ORIGIN) tristan.faure@atosorigin.com - Initial API and implementation
 *
 *****************************************************************************/
package org.eclipse.papyrus.infra.ui.extension.commands;

import org.eclipse.emf.ecore.EObject;

public interface ICreationCondition {

	/**
	 * This method returns true if the diagram creation is allowed
	 *
	 * @param selectedElement
	 *            the element where the diagram is provided
	 * @return true if the diagram can be created
	 */
	boolean create(EObject selectedElement);

	/**
	 * set the command ID in order to take account the environment in order to
	 * create a diagram
	 *
	 * @param commandID
	 */
	public void setCommand(String commandID);

}

Back to the top