org.eclipse.emf.henshin.interpreter.impl
Class LoggingApplicationMonitor

java.lang.Object
  extended by org.eclipse.emf.henshin.interpreter.impl.BasicApplicationMonitor
      extended by org.eclipse.emf.henshin.interpreter.impl.LoggingApplicationMonitor
All Implemented Interfaces:
ApplicationMonitor

public class LoggingApplicationMonitor
extends BasicApplicationMonitor

ApplicationMonitor implementation with logging capabilities.


Field Summary
protected  URI autoSaveURI
           
protected  PrintStream logStream
           
protected  int maxSteps
           
protected  boolean onlyFailures
           
protected  boolean onlyRuleApplications
           
protected  boolean onlySuccesses
           
protected  boolean onlyUnitApplications
           
protected  int step
           
 
Fields inherited from class org.eclipse.emf.henshin.interpreter.impl.BasicApplicationMonitor
canceled, undo
 
Constructor Summary
LoggingApplicationMonitor()
           
 
Method Summary
 void cancel()
          Cancel the current application (no undo).
 void cancelAndUndo()
          Cancel and undo the current application.
protected  void logStep(UnitApplication application, boolean success, String stepKind)
           
 void notifyExecute(UnitApplication application, boolean success)
          Notify this monitor that a unit application has been executed.
 void notifyRedo(UnitApplication application, boolean success)
          Notify this monitor that a unit application has been redone.
 void notifyUndo(UnitApplication application, boolean success)
          Notify this monitor that a unit application has been undone.
 void setAutoSaveURI(URI autoSaveURI)
           
 void setLogStream(PrintStream logStream)
           
 void setMaxSteps(int maxSteps)
           
 void setOnlyFailures(boolean onlyFailures)
           
 void setOnlyRuleApplications(boolean onlyRuleApplications)
           
 void setOnlySuccesses(boolean onlySuccesses)
           
 void setOnlyUnitApplications(boolean onlyUnitApplications)
           
 
Methods inherited from class org.eclipse.emf.henshin.interpreter.impl.BasicApplicationMonitor
isCanceled, isUndo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logStream

protected PrintStream logStream

onlyRuleApplications

protected boolean onlyRuleApplications

onlyUnitApplications

protected boolean onlyUnitApplications

onlySuccesses

protected boolean onlySuccesses

onlyFailures

protected boolean onlyFailures

autoSaveURI

protected URI autoSaveURI

step

protected int step

maxSteps

protected int maxSteps
Constructor Detail

LoggingApplicationMonitor

public LoggingApplicationMonitor()
Method Detail

cancel

public void cancel()
Description copied from interface: ApplicationMonitor
Cancel the current application (no undo).

Specified by:
cancel in interface ApplicationMonitor
Overrides:
cancel in class BasicApplicationMonitor

cancelAndUndo

public void cancelAndUndo()
Description copied from interface: ApplicationMonitor
Cancel and undo the current application.

Specified by:
cancelAndUndo in interface ApplicationMonitor
Overrides:
cancelAndUndo in class BasicApplicationMonitor

notifyExecute

public void notifyExecute(UnitApplication application,
                          boolean success)
Description copied from interface: ApplicationMonitor
Notify this monitor that a unit application has been executed.

Specified by:
notifyExecute in interface ApplicationMonitor
Overrides:
notifyExecute in class BasicApplicationMonitor
Parameters:
application - Executed unit application.
success - Whether the unit application was successful.

notifyUndo

public void notifyUndo(UnitApplication application,
                       boolean success)
Description copied from interface: ApplicationMonitor
Notify this monitor that a unit application has been undone.

Specified by:
notifyUndo in interface ApplicationMonitor
Overrides:
notifyUndo in class BasicApplicationMonitor
Parameters:
application - Undone unit application.

notifyRedo

public void notifyRedo(UnitApplication application,
                       boolean success)
Description copied from interface: ApplicationMonitor
Notify this monitor that a unit application has been redone.

Specified by:
notifyRedo in interface ApplicationMonitor
Overrides:
notifyRedo in class BasicApplicationMonitor
Parameters:
application - Redone unit application.
success - Whether the unit application was successfully redone.

logStep

protected void logStep(UnitApplication application,
                       boolean success,
                       String stepKind)

setLogStream

public void setLogStream(PrintStream logStream)

setOnlyRuleApplications

public void setOnlyRuleApplications(boolean onlyRuleApplications)

setOnlyUnitApplications

public void setOnlyUnitApplications(boolean onlyUnitApplications)

setOnlySuccesses

public void setOnlySuccesses(boolean onlySuccesses)

setOnlyFailures

public void setOnlyFailures(boolean onlyFailures)

setAutoSaveURI

public void setAutoSaveURI(URI autoSaveURI)

setMaxSteps

public void setMaxSteps(int maxSteps)