use of com.archimatetool.editor.model.commands.NonNotifyingCompoundCommand in project archi by archimatetool.
the class RenameCommandHandler method getCompoundCommand.
/**
* Get, and if need be create, a CompoundCommand to which to add the object to be renamed command
*/
private static CompoundCommand getCompoundCommand(IAdapter object, Hashtable<CommandStack, CompoundCommand> commandMap) {
// Get the Command Stack registered to the object
CommandStack stack = (CommandStack) object.getAdapter(CommandStack.class);
if (stack == null) {
// $NON-NLS-1$
System.err.println("CommandStack was null in getCompoundCommand");
return null;
}
// Now get or create a Compound Command
CompoundCommand compoundCommand = commandMap.get(stack);
if (compoundCommand == null) {
compoundCommand = new NonNotifyingCompoundCommand(Messages.RenameCommandHandler_0);
commandMap.put(stack, compoundCommand);
}
return compoundCommand;
}
Aggregations