Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.commands.operations
Class LinearUndoEnforcer

java.lang.Object
  extended by 

org.eclipse.core.commands.operations.LinearUndoViolationDetector
      extended by 
org.eclipse.core.commands.operations.LinearUndoEnforcer
All Implemented Interfaces:
IOperationApprover

public final class LinearUndoEnforcer
extends LinearUndoViolationDetector

An operation approver that enforces a strict linear undo. It does not allow the undo or redo of any operation that is not the latest available operation in all of its undo contexts. This class may be instantiated by clients.

Since:
3.1

Constructor Summary
LinearUndoEnforcer ()
          Create an instance of LinearUndoEnforcer.
 
Method Summary
protected   IStatus allowLinearRedoViolation ( IUndoableOperation operation, IUndoContext context, IOperationHistory history, IAdaptable uiInfo)
          Return a status indicating whether a linear redo violation is allowable.
protected   IStatus allowLinearUndoViolation ( IUndoableOperation operation, IUndoContext context, IOperationHistory history, IAdaptable uiInfo)
          Return a status indicating whether a linear undo violation is allowable.
 
Methods inherited from class org.eclipse.core.commands.operations. LinearUndoViolationDetector
proceedRedoing, proceedUndoing
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearUndoEnforcer

public LinearUndoEnforcer()
Create an instance of LinearUndoEnforcer.

Method Detail

allowLinearRedoViolation

protected 
IStatus allowLinearRedoViolation(
IUndoableOperation operation,
                                           
IUndoContext context,
                                           
IOperationHistory history,
                                           
IAdaptable uiInfo)
Description copied from class: LinearUndoViolationDetector
Return a status indicating whether a linear redo violation is allowable. A linear redo violation is defined as a request to redo a particular operation even if it is not the most recently added operation to the redo history.

Specified by:
allowLinearRedoViolation in class LinearUndoViolationDetector
Parameters:
operation - the operation for which a linear redo violation has been detected.
context - the undo context in which the linear redo violation exists
history - the operation history containing the operation
uiInfo - the IAdaptable (or null) provided by the caller in order to supply UI information for prompting the user if necessary. When this parameter is not null, it should minimally contain an adapter for the org.eclipse.swt.widgets.Shell.class.
Returns:
the IStatus describing whether the redo violation is allowed. The redo will not proceed if the status severity is not OK, and the caller requesting the redo will be returned the status that caused the rejection. Specific status severities will not be interpreted by the history.

allowLinearUndoViolation

protected 
IStatus allowLinearUndoViolation(
IUndoableOperation operation,
                                           
IUndoContext context,
                                           
IOperationHistory history,
                                           
IAdaptable uiInfo)
Description copied from class: LinearUndoViolationDetector
Return a status indicating whether a linear undo violation is allowable. A linear undo violation is defined as a request to undo a particular operation even if it is not the most recently added operation to the undo history.

Specified by:
allowLinearUndoViolation in class LinearUndoViolationDetector
Parameters:
operation - the operation for which a linear undo violation has been detected.
context - the undo context in which the linear undo violation exists
history - the operation history containing the operation
uiInfo - the IAdaptable (or null) provided by the caller in order to supply UI information for prompting the user if necessary. When this parameter is not null, it should minimally contain an adapter for the org.eclipse.swt.widgets.Shell.class.
Returns:
the IStatus describing whether the undo violation is allowed. The undo will not proceed if the status severity is not OK, and the caller requesting the undo will be returned the status that caused the rejection. Specific status severities will not be interpreted by the history.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire