Interface IEditingContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListener(IEditingContextListener listener)
Adds the specifiedlistener
.void
dispose()
Disposes the context.<T> T
executeReadonlyTask(IBmTask<T> task, org.eclipse.core.runtime.IProgressMonitor monitor)
Executes the specified read-onlytask
.Object
getUnderlyingContext()
Returns the underlying low-level context (BM/EMF/etc).org.eclipse.core.commands.operations.IUndoContext
getUndoContext()
Returns theIUndoContext
to support the undo/redo operations.void
initialize(String ownerDescription)
Initializes the context with the specified description.boolean
isDirty()
Returnstrue
if the context is dirty,false
- otherwise.boolean
isDisposed()
Returnstrue
if the context is disposed,false
- otherwise.void
removeListener(IEditingContextListener listener)
Removes the specifiedlistener
.void
save()
Saves the context.
-
-
-
Method Detail
-
initialize
void initialize(String ownerDescription)
Initializes the context with the specified description.- Parameters:
ownerDescription
- the description of the context owner, e.g. the editor name, cannot benull
.
-
getUnderlyingContext
Object getUnderlyingContext()
Returns the underlying low-level context (BM/EMF/etc).- Returns:
- the underlying low-level context or
null
if the context is not initialized or already disposed.
-
isDirty
boolean isDirty()
Returnstrue
if the context is dirty,false
- otherwise.- Returns:
true
if the context is dirty,false
- otherwise.
-
save
void save()
Saves the context.
-
getUndoContext
org.eclipse.core.commands.operations.IUndoContext getUndoContext()
Returns theIUndoContext
to support the undo/redo operations.- Returns:
- the
IUndoContext
to support the undo/redo operations ornull
if the context is not initialized or already disposed.
-
dispose
void dispose()
Disposes the context.
-
isDisposed
boolean isDisposed()
Returnstrue
if the context is disposed,false
- otherwise.- Returns:
true
if the context is disposed,false
- otherwise.
-
addListener
void addListener(IEditingContextListener listener)
Adds the specifiedlistener
.- Parameters:
listener
- the listener to add, cannot benull
.
-
removeListener
void removeListener(IEditingContextListener listener)
Removes the specifiedlistener
.- Parameters:
listener
- the listener to remove, cannot benull
.
-
executeReadonlyTask
<T> T executeReadonlyTask(IBmTask<T> task, org.eclipse.core.runtime.IProgressMonitor monitor)
Executes the specified read-onlytask
.- Type Parameters:
T
- the type of the task result.- Parameters:
task
- the BM task to execute, cannot benull
.monitor
- the progress monitor, cannot benull
.- Returns:
- the result returned by
IBmTask.execute(IBmTransaction, IProgressMonitor)
method.
-
-