Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.ltk.core.refactoring
Class UndoTextFileChange  view UndoTextFileChange download UndoTextFileChange.java

java.lang.Object
  extended byorg.eclipse.ltk.core.refactoring.Change
      extended byorg.eclipse.ltk.core.refactoring.UndoTextFileChange
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable

public class UndoTextFileChange
extends Change

A change to perform the reverse change of a TextFileChange.

This class is not intended to be instantiated by clients. It is usually created by a TextFileChange object.

The class should be subclassed by clients also subclassing TextFileChange to provide a proper undo change object.

Since:
3.0

Field Summary
private  ContentStamp fContentStampToRestore
           
private  boolean fDirty
           
private  org.eclipse.core.resources.IFile fFile
           
private  java.lang.String fName
           
private  int fSaveMode
           
private  org.eclipse.text.edits.UndoEdit fUndo
           
private  org.eclipse.ltk.internal.core.refactoring.BufferValidationState fValidationState
           
 
Fields inherited from class org.eclipse.ltk.core.refactoring.Change
 
Constructor Summary
protected UndoTextFileChange(java.lang.String name, org.eclipse.core.resources.IFile file, org.eclipse.text.edits.UndoEdit undo, ContentStamp stamp, int saveMode)
          Create a new undo text file change object.
 
Method Summary
protected  Change createUndoChange(org.eclipse.text.edits.UndoEdit edit, ContentStamp stampToRestore)
          Hook to create an undo change for the given undo edit.
 void dispose()
          null
 java.lang.Object getModifiedElement()
          null
 java.lang.String getName()
          null
 int getSaveMode()
          Returns the change's save mode.
 void initializeValidationData(org.eclipse.core.runtime.IProgressMonitor pm)
          null
 RefactoringStatus isValid(org.eclipse.core.runtime.IProgressMonitor pm)
          null
private  boolean needsSaving()
           
 Change perform(org.eclipse.core.runtime.IProgressMonitor pm)
          null
 
Methods inherited from class org.eclipse.ltk.core.refactoring.Change
getAdapter, getParent, isEnabled, setEnabled, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fName

private java.lang.String fName

fUndo

private org.eclipse.text.edits.UndoEdit fUndo

fFile

private org.eclipse.core.resources.IFile fFile

fContentStampToRestore

private ContentStamp fContentStampToRestore

fSaveMode

private int fSaveMode

fDirty

private boolean fDirty

fValidationState

private org.eclipse.ltk.internal.core.refactoring.BufferValidationState fValidationState
Constructor Detail

UndoTextFileChange

protected UndoTextFileChange(java.lang.String name,
                             org.eclipse.core.resources.IFile file,
                             org.eclipse.text.edits.UndoEdit undo,
                             ContentStamp stamp,
                             int saveMode)
Create a new undo text file change object.

Method Detail

getSaveMode

public int getSaveMode()
Returns the change's save mode.


getName

public java.lang.String getName()
null

Specified by:
getName in class Change

createUndoChange

protected Change createUndoChange(org.eclipse.text.edits.UndoEdit edit,
                                  ContentStamp stampToRestore)
                           throws org.eclipse.core.runtime.CoreException
Hook to create an undo change for the given undo edit. This hook gets called while performing the change to construct the corresponding undo change object.

Subclasses may override it to create a different undo change.


getModifiedElement

public java.lang.Object getModifiedElement()
null

Specified by:
getModifiedElement in class Change

initializeValidationData

public void initializeValidationData(org.eclipse.core.runtime.IProgressMonitor pm)
null

Specified by:
initializeValidationData in class Change

isValid

public RefactoringStatus isValid(org.eclipse.core.runtime.IProgressMonitor pm)
                          throws org.eclipse.core.runtime.CoreException
null

Specified by:
isValid in class Change

perform

public Change perform(org.eclipse.core.runtime.IProgressMonitor pm)
               throws org.eclipse.core.runtime.CoreException
null

Specified by:
perform in class Change

dispose

public void dispose()
null

Overrides:
dispose in class Change

needsSaving

private boolean needsSaving()