Interface IApplicationEditingContext
-
public interface IApplicationEditingContext
The editing context for the Application Editors infrastructure.It allows to execute tasks and navigate through execution history, i.e. it allows to perform undo/redo actions. Also it provides an easy way to save or rollback(see
dispose()
) the editor state.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListener(IApplicationEditingContextListener listener)
Adds the listener.void
dispose()
Disposes the editing context.void
execute(IApplicationEditorTask task)
Executes the specified task.org.eclipse.core.commands.operations.IUndoContext
getUndoContext()
Returns the undo context.boolean
isDirty()
Returnstrue
if the editing context is dirty.void
removeListener(IApplicationEditingContextListener listener)
Removes the listener.void
save()
Saves the editing context.
-
-
-
Method Detail
-
execute
void execute(IApplicationEditorTask task)
Executes the specified task.- Parameters:
task
- the task, cannot benull
.
-
isDirty
boolean isDirty()
Returnstrue
if the editing context is dirty.- Returns:
true
if the editing context is dirty,false
- otherwise.
-
save
void save()
Saves the editing context.
-
dispose
void dispose()
Disposes the editing context.
-
getUndoContext
org.eclipse.core.commands.operations.IUndoContext getUndoContext()
Returns the undo context.- Returns:
- the undo context, never
null
.
-
addListener
void addListener(IApplicationEditingContextListener listener)
Adds the listener.- Parameters:
listener
- the listener to add, cannot benull
.- See Also:
IApplicationEditingContextListener
-
removeListener
void removeListener(IApplicationEditingContextListener listener)
Removes the listener.- Parameters:
listener
- the listener to remove, cannot benull
.- See Also:
IApplicationEditingContextListener
-
-