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 JDT
Release 3.5

org.eclipse.jdt.core.refactoring
Class CompilationUnitChange

java.lang.Object
  extended by 

org.eclipse.ltk.core.refactoring.Change
      extended by 

org.eclipse.ltk.core.refactoring.TextEditBasedChange
          extended by 

org.eclipse.ltk.core.refactoring.TextChange
              extended by 

org.eclipse.ltk.core.refactoring.TextFileChange
                  extended by 
org.eclipse.jdt.core.refactoring.CompilationUnitChange
All Implemented Interfaces:
IAdaptable

public class CompilationUnitChange
extends TextFileChange

A TextFileChange that operates on an ICompilationUnit in the workspace.

Since:
1.3

Field Summary
 
Fields inherited from class org.eclipse.ltk.core.refactoring. TextFileChange
FORCE_SAVE, KEEP_SAVE_STATE, LEAVE_DIRTY
 
Constructor Summary
CompilationUnitChange ( String name, ICompilationUnit cunit)
          Creates a new CompilationUnitChange.
 
Method Summary
protected   IDocument acquireDocument ( IProgressMonitor pm)
          
protected   Change createUndoChange ( UndoEdit edit, ContentStamp stampToRestore)
          
  Object getAdapter ( Class adapter)
          
  ICompilationUnit getCompilationUnit ()
          Returns the compilation unit this change works on.
  ChangeDescriptor getDescriptor ()
          
  Object getModifiedElement ()
          
protected  void releaseDocument ( IDocument document, IProgressMonitor pm)
          
 void setDescriptor ( ChangeDescriptor descriptor)
          Sets the refactoring descriptor for this change.
 
Methods inherited from class org.eclipse.ltk.core.refactoring. TextFileChange
commit, createUndoChange, dispose, getAffectedObjects, getFile, getSaveMode, initializeValidationData, isDocumentAcquired, isDocumentModified, isValid, needsSaving, performEdits, setSaveMode
 
Methods inherited from class org.eclipse.ltk.core.refactoring. TextChange
addEdit, addTextEditChangeGroup, addTextEditGroup, getCurrentContent, getCurrentContent, getCurrentDocument, getEdit, getPreviewContent, getPreviewContent, getPreviewContent, getPreviewDocument, getPreviewEdit, getPreviewEdits, getTextEditChangeGroups, perform, setEdit, setKeepPreviewEdits
 
Methods inherited from class org.eclipse.ltk.core.refactoring. TextEditBasedChange
addChangeGroup, getChangeGroups, getKeepPreviewEdits, getName, getTextType, hasOneGroupCategory, setEnabled, setTextType
 
Methods inherited from class org.eclipse.ltk.core.refactoring. Change
getParent, isEnabled, setEnabledShallow
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompilationUnitChange

public CompilationUnitChange(
String name,
                             
ICompilationUnit cunit)
Creates a new CompilationUnitChange.

Parameters:
name - the change's name, mainly used to render the change in the UI
cunit - the compilation unit this change works on
Method Detail

getModifiedElement

public 
Object getModifiedElement()

Overrides:
getModifiedElement in class TextFileChange

getCompilationUnit

public 
ICompilationUnit getCompilationUnit()
Returns the compilation unit this change works on.

Returns:
the compilation unit this change works on

acquireDocument

protected 
IDocument acquireDocument(
IProgressMonitor pm)
                             throws 
CoreException

Overrides:
acquireDocument in class TextFileChange
Throws:
CoreException

releaseDocument

protected void releaseDocument(
IDocument document,
                               
IProgressMonitor pm)
                        throws 
CoreException

Overrides:
releaseDocument in class TextFileChange
Throws:
CoreException

createUndoChange

protected 
Change createUndoChange(
UndoEdit edit,
                                  
ContentStamp stampToRestore)

Overrides:
createUndoChange in class TextFileChange

getAdapter

public 
Object getAdapter(
Class adapter)

Specified by:
getAdapter in interface IAdaptable
Overrides:
getAdapter in class Change

setDescriptor

public void setDescriptor(
ChangeDescriptor descriptor)
Sets the refactoring descriptor for this change.

Parameters:
descriptor - the descriptor to set, or null to set no descriptor

getDescriptor

public 
ChangeDescriptor getDescriptor()

Overrides:
getDescriptor in class Change

Eclipse JDT
Release 3.5

Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

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