Interface IEditingContext

  • All Superinterfaces:
    IModelApi

    public interface IEditingContext
    extends IModelApi
    The IModelApi interface extension that supports editors workflow.
    • 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 be null.
      • 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()
        Returns true 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 the IUndoContext to support the undo/redo operations.
        Returns:
        the IUndoContext to support the undo/redo operations or null if the context is not initialized or already disposed.
      • dispose

        void dispose()
        Disposes the context.
      • isDisposed

        boolean isDisposed()
        Returns true if the context is disposed, false - otherwise.
        Returns:
        true if the context is disposed, false - otherwise.
      • addListener

        void addListener​(IEditingContextListener listener)
        Adds the specified listener.
        Parameters:
        listener - the listener to add, cannot be null.
      • removeListener

        void removeListener​(IEditingContextListener listener)
        Removes the specified listener.
        Parameters:
        listener - the listener to remove, cannot be null.
      • executeReadonlyTask

        <T> T executeReadonlyTask​(IBmTask<T> task,
                                  org.eclipse.core.runtime.IProgressMonitor monitor)
        Executes the specified read-only task.
        Type Parameters:
        T - the type of the task result.
        Parameters:
        task - the BM task to execute, cannot be null.
        monitor - the progress monitor, cannot be null.
        Returns:
        the result returned by IBmTask.execute(IBmTransaction, IProgressMonitor) method.