|
Eclipse JDT Release 3.7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ltk.core.refactoring.Change
org.eclipse.ltk.core.refactoring.TextEditBasedChange
org.eclipse.ltk.core.refactoring.TextChange
org.eclipse.ltk.core.refactoring.TextFileChange
org.eclipse.jdt.core.refactoring.CompilationUnitChange
public class CompilationUnitChange
A TextFileChange
that operates on an ICompilationUnit
in the workspace.
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 |
---|
public CompilationUnitChange(String name, ICompilationUnit cunit)
CompilationUnitChange
.
name
- the change's name, mainly used to render the change in the UIcunit
- the compilation unit this change works onMethod Detail |
---|
public Object getModifiedElement()
getModifiedElement
in class TextFileChange
public ICompilationUnit getCompilationUnit()
protected IDocument acquireDocument(IProgressMonitor pm) throws CoreException
acquireDocument
in class TextFileChange
CoreException
protected void releaseDocument(IDocument document, IProgressMonitor pm) throws CoreException
releaseDocument
in class TextFileChange
CoreException
protected Change createUndoChange(UndoEdit edit, ContentStamp stampToRestore)
createUndoChange
in class TextFileChange
public Object getAdapter(Class adapter)
getAdapter
in interface IAdaptable
getAdapter
in class Change
public void setDescriptor(ChangeDescriptor descriptor)
descriptor
- the descriptor to set, or null
to set no descriptorpublic ChangeDescriptor getDescriptor()
getDescriptor
in class Change
|
Eclipse JDT Release 3.7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) 2000, 2011 IBM Corporation and others. All rights reserved.