de.frag.umlplugin.uml.command
Class ConnectClassesUsedCommand

java.lang.Object
  extended by de.frag.umlplugin.uml.command.AbstractDiagramCommand
      extended by de.frag.umlplugin.uml.command.AbstractConnectCommand
          extended by de.frag.umlplugin.uml.command.ConnectClassesUsedCommand
All Implemented Interfaces:
DiagramCommand

public class ConnectClassesUsedCommand
extends AbstractConnectCommand

Adds connections between all class nodes in a diagram that use each other.


Field Summary
 
Fields inherited from class de.frag.umlplugin.uml.command.AbstractDiagramCommand
COMMAND_CLASS, COMMAND_ELEMENT_NAME, PSI_CLASS, SOURCE_CLASS, TARGET_CLASS, USAGE_TYPE
 
Constructor Summary
ConnectClassesUsedCommand()
           
 
Method Summary
 boolean canExecute(UMLDiagram diagram)
          Checks whether this command can be executed ot not.
 void execute(UMLDiagram diagram)
          Executes some action on a diagram.
 void renameClasses(ClassRenamer renamer)
          Renames all contained class names.
 java.lang.String toString()
          Creates a string representation of this command.
 
Methods inherited from class de.frag.umlplugin.uml.command.AbstractConnectCommand
addEdges
 
Methods inherited from class de.frag.umlplugin.uml.command.AbstractDiagramCommand
addAdditionalInfo, createElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectClassesUsedCommand

public ConnectClassesUsedCommand()
Method Detail

execute

public void execute(@NotNull
                    UMLDiagram diagram)
Description copied from interface: DiagramCommand
Executes some action on a diagram.

Parameters:
diagram - diagram

canExecute

public boolean canExecute(@NotNull
                          UMLDiagram diagram)
Description copied from interface: DiagramCommand
Checks whether this command can be executed ot not.

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

renameClasses

public 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.

toString

@NotNull
public java.lang.String toString()
Creates a string representation of this command.

Overrides:
toString in class java.lang.Object
Returns:
created string representation