de.frag.umlplugin.uml.command
Interface DiagramCommand

All Known Implementing Classes:
AbstractAddDependentClassesCommand, AbstractConnectCommand, AbstractDiagramCommand, AddClassCommand, AddDependentClassesCommand, AddExtendedClassesCommand, AddExtendingClassesCommand, AddFieldClassesCommand, AddUsedClassesCommand, AddUsingClassesCommand, ConnectClassesCommand, ConnectClassesExtendedCommand, ConnectClassesFieldCommand, ConnectClassesUsedCommand, ConnectSingleClassCommand, ConnectSingleClassExtendedCommand, ConnectSingleClassExtendingCommand, ConnectSingleClassFieldCommand, ConnectSingleClassUsedCommand, ConnectSingleClassUsingCommand, RemoveAllCreateEdgesCommand, RemoveAllUsageEdgesCommand, RemoveClassCommand, RemoveEdgeCommand

public interface DiagramCommand

Abstract command that executes some action on a diagram.


Method Summary
 boolean canExecute(UMLDiagram diagram)
          Checks whether this command can be executed ot not.
 org.jdom.Element createElement()
          Creates JDOM element that contains all data needed to restore this command.
 void execute(UMLDiagram diagram)
          Executes some action on a diagram.
 void renameClasses(ClassRenamer renamer)
          Renames all contained class names.
 

Method Detail

execute

void execute(@NotNull
             UMLDiagram diagram)
Executes some action on a diagram.

Parameters:
diagram - diagram

canExecute

boolean canExecute(@NotNull
                   UMLDiagram diagram)
Checks whether this command can be executed ot not.

Parameters:
diagram - diagram
Returns:
true, if command can be executed; false otherwise

createElement

@NotNull
org.jdom.Element createElement()
Creates JDOM element that contains all data needed to restore this command.

Returns:
created JDOM element

renameClasses

void renameClasses(@NotNull
                   ClassRenamer renamer)
Renames all contained class names.

Parameters:
renamer - renamer that will rename classes to keep class names in sync after refactorings were applied.