org.topbraid.core.change
Class AbstractChangeEngine
java.lang.Object
org.topbraid.core.change.AbstractChangeEngine
- All Implemented Interfaces:
- org.eclipse.core.commands.operations.IUndoContext, IChangeEngine
- Direct Known Subclasses:
- TBCChangeEngine
public abstract class AbstractChangeEngine
- extends java.lang.Object
- implements org.eclipse.core.commands.operations.IUndoContext, IChangeEngine
A singleton managing the execution of ModelOperations.
All changes to the current OntModel need to be managed by this singleton.
- Author:
- Holger Knublauch
|
Method Summary |
void |
addChangeEngineListener(IChangeEngineListener listener)
|
void |
addRenamingChangeListener(IRenamingChangeListener listener)
|
void |
clearHistory()
|
void |
commitBufferingGraph(BufferingGraph g)
|
protected ChangeOperation |
createChangeOperation(IChange change)
|
void |
dispose()
|
abstract void |
execute(ChangeOperation operation,
org.eclipse.core.runtime.IProgressMonitor monitor,
java.lang.Runnable andThen)
|
protected void |
execute(ChangeOperation operation,
org.eclipse.core.runtime.IProgressMonitor monitor,
java.lang.Runnable andThen,
org.eclipse.core.runtime.IStatus[] result)
|
void |
execute(IChange change)
|
void |
execute(IChange change,
org.eclipse.core.runtime.IProgressMonitor monitor)
|
void |
execute(IChange change,
org.eclipse.core.runtime.IProgressMonitor monitor,
java.lang.Runnable andThen)
|
void |
execute(IChange change,
java.lang.Runnable andThen)
|
IInstanceCountProvider |
getInstanceCountProvider()
|
java.lang.String |
getLabel()
|
org.eclipse.core.commands.operations.IOperationHistory |
getOperationHistory()
|
ChangeOperation[] |
getOperations()
|
org.eclipse.core.commands.operations.IUndoContext |
getUndoContext()
|
boolean |
matches(org.eclipse.core.commands.operations.IUndoContext context)
|
protected void |
notifyListeners(ChangeOperation operation,
boolean undone)
|
protected void |
notifyRenamingChangeListeners(IRenamingChange change)
|
protected void |
postProcessOperation(ChangeOperation operation,
org.eclipse.core.runtime.IProgressMonitor monitor)
|
void |
recordTripleChange(TripleChangeRecord record)
|
void |
redo(ChangeOperation operation)
|
void |
removeChangeEngineListener(IChangeEngineListener listener)
|
void |
removeRenamingChangeListener(IRenamingChangeListener listener)
|
void |
reportGraphChange()
|
protected void |
runAndThen(ChangeOperation operation,
java.lang.Runnable andThen)
|
void |
setIgnoreMode(boolean ignore)
|
void |
undo(ChangeOperation operation)
|
protected void |
updateInferences(ChangeOperation operation,
org.eclipse.core.runtime.IProgressMonitor monitor)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currentOperation
protected ChangeOperation currentOperation
operationHistory
protected org.eclipse.core.commands.operations.IOperationHistory operationHistory
silentMode
protected boolean silentMode
AbstractChangeEngine
public AbstractChangeEngine()
addChangeEngineListener
public void addChangeEngineListener(IChangeEngineListener listener)
- Specified by:
addChangeEngineListener in interface IChangeEngine
addRenamingChangeListener
public void addRenamingChangeListener(IRenamingChangeListener listener)
- Specified by:
addRenamingChangeListener in interface IChangeEngine
clearHistory
public void clearHistory()
- Specified by:
clearHistory in interface IChangeEngine
createChangeOperation
protected ChangeOperation createChangeOperation(IChange change)
dispose
public void dispose()
- Specified by:
dispose in interface IChangeEngine
execute
public void execute(IChange change)
- Specified by:
execute in interface IChangeEngine
execute
public void execute(IChange change,
java.lang.Runnable andThen)
- Specified by:
execute in interface IChangeEngine
execute
public void execute(IChange change,
org.eclipse.core.runtime.IProgressMonitor monitor)
- Specified by:
execute in interface IChangeEngine
execute
public void execute(IChange change,
org.eclipse.core.runtime.IProgressMonitor monitor,
java.lang.Runnable andThen)
- Specified by:
execute in interface IChangeEngine
execute
public abstract void execute(ChangeOperation operation,
org.eclipse.core.runtime.IProgressMonitor monitor,
java.lang.Runnable andThen)
- Specified by:
execute in interface IChangeEngine
execute
protected void execute(ChangeOperation operation,
org.eclipse.core.runtime.IProgressMonitor monitor,
java.lang.Runnable andThen,
org.eclipse.core.runtime.IStatus[] result)
throws java.lang.reflect.InvocationTargetException
- Throws:
java.lang.reflect.InvocationTargetException
getInstanceCountProvider
public IInstanceCountProvider getInstanceCountProvider()
- Specified by:
getInstanceCountProvider in interface IChangeEngine
getLabel
public java.lang.String getLabel()
- Specified by:
getLabel in interface org.eclipse.core.commands.operations.IUndoContext
getOperationHistory
public org.eclipse.core.commands.operations.IOperationHistory getOperationHistory()
- Specified by:
getOperationHistory in interface IChangeEngine
getOperations
public ChangeOperation[] getOperations()
- Specified by:
getOperations in interface IChangeEngine
getUndoContext
public org.eclipse.core.commands.operations.IUndoContext getUndoContext()
- Specified by:
getUndoContext in interface IChangeEngine
matches
public boolean matches(org.eclipse.core.commands.operations.IUndoContext context)
- Specified by:
matches in interface org.eclipse.core.commands.operations.IUndoContext
notifyListeners
protected void notifyListeners(ChangeOperation operation,
boolean undone)
notifyRenamingChangeListeners
protected void notifyRenamingChangeListeners(IRenamingChange change)
postProcessOperation
protected void postProcessOperation(ChangeOperation operation,
org.eclipse.core.runtime.IProgressMonitor monitor)
reportGraphChange
public void reportGraphChange()
recordTripleChange
public void recordTripleChange(TripleChangeRecord record)
- Specified by:
recordTripleChange in interface IChangeEngine
redo
public void redo(ChangeOperation operation)
throws org.eclipse.core.commands.ExecutionException
- Specified by:
redo in interface IChangeEngine
- Throws:
org.eclipse.core.commands.ExecutionException
removeChangeEngineListener
public void removeChangeEngineListener(IChangeEngineListener listener)
- Specified by:
removeChangeEngineListener in interface IChangeEngine
removeRenamingChangeListener
public void removeRenamingChangeListener(IRenamingChangeListener listener)
- Specified by:
removeRenamingChangeListener in interface IChangeEngine
runAndThen
protected void runAndThen(ChangeOperation operation,
java.lang.Runnable andThen)
setIgnoreMode
public void setIgnoreMode(boolean ignore)
- Specified by:
setIgnoreMode in interface IChangeEngine
updateInferences
protected void updateInferences(ChangeOperation operation,
org.eclipse.core.runtime.IProgressMonitor monitor)
undo
public void undo(ChangeOperation operation)
throws org.eclipse.core.commands.ExecutionException
- Specified by:
undo in interface IChangeEngine
- Throws:
org.eclipse.core.commands.ExecutionException
commitBufferingGraph
public void commitBufferingGraph(BufferingGraph g)
- Specified by:
commitBufferingGraph in interface IChangeEngine