use of com.archimatetool.model.IAdapter in project archi by archimatetool.
the class AbstractECorePropertySection method executeCommand.
/**
* Execuate a command on the selected objects' CommandStack
* @param cmd
*/
protected void executeCommand(Command command) {
fIsExecutingCommand = true;
EObject eObject = getFirstSelectedObject();
if (eObject != null && eObject instanceof IAdapter) {
CommandStack commandStack = (CommandStack) ((IAdapter) eObject).getAdapter(CommandStack.class);
if (commandStack != null) {
commandStack.execute(command);
}
}
fIsExecutingCommand = false;
}
Aggregations