de.frag.umlplugin.history
Class NavigationHistory

java.lang.Object
  extended by de.frag.umlplugin.history.NavigationHistory

public class NavigationHistory
extends java.lang.Object

Navigation history.


Constructor Summary
NavigationHistory(int maxSize)
          Creates a new navigation history with the given maximum history size.
 
Method Summary
 boolean canStepBack()
          Checks whether a step back in the history is possible.
 boolean canStepForward()
          Checks whether a step forward in the history is possible.
 void clear()
          Clears this history.
 void navigatedTo(com.intellij.psi.PsiClass subjectClass, com.intellij.psi.PsiClass selectedClass, DependencyType dependencyType)
          Navigates to the given class and dependency type
 HistoryEntry stepBack()
          Steps back in the history and returns the corresponing history entry.
 HistoryEntry stepForward()
          Steps forward in the history and returns the corresponing history entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigationHistory

public NavigationHistory(int maxSize)
Creates a new navigation history with the given maximum history size.

Parameters:
maxSize - maximum history size
Method Detail

clear

public void clear()
Clears this history.


navigatedTo

public void navigatedTo(@NotNull
                        com.intellij.psi.PsiClass subjectClass,
                        @NotNull
                        com.intellij.psi.PsiClass selectedClass,
                        @NotNull
                        DependencyType dependencyType)
Navigates to the given class and dependency type

Parameters:
subjectClass - class to navigate from
selectedClass - class to navigate to
dependencyType - dependency type to navigate to

stepBack

@NotNull
public HistoryEntry stepBack()
Steps back in the history and returns the corresponing history entry.

Returns:
previous history entry

stepForward

@NotNull
public HistoryEntry stepForward()
Steps forward in the history and returns the corresponing history entry.

Returns:
next history entry

canStepBack

public boolean canStepBack()
Checks whether a step back in the history is possible.

Returns:
true, if a step back is possible; false, if the current position is already the first list position.

canStepForward

public boolean canStepForward()
Checks whether a step forward in the history is possible.

Returns:
true, if a step forward is possible; false, if the current position is already the last list position.