public class CompilationUnitChange extends TextFileChange
TextFileChange that operates on an ICompilationUnit in the workspace.FORCE_SAVE, KEEP_SAVE_STATE, LEAVE_DIRTY| Constructor and Description |
|---|
CompilationUnitChange(String name,
ICompilationUnit cunit)
Creates a new
CompilationUnitChange. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
commit, createUndoChange, dispose, getAffectedObjects, getFile, getSaveMode, initializeValidationData, isDocumentAcquired, isDocumentModified, isValid, needsSaving, performEdits, setSaveModeaddEdit, addTextEditChangeGroup, addTextEditGroup, getCurrentContent, getCurrentContent, getCurrentDocument, getEdit, getPreviewContent, getPreviewContent, getPreviewContent, getPreviewDocument, getPreviewEdit, getPreviewEdits, getTextEditChangeGroups, perform, setEdit, setKeepPreviewEditsaddChangeGroup, getChangeGroups, getKeepPreviewEdits, getName, getTextType, hasOneGroupCategory, setEnabled, setTextTypegetParent, isEnabled, setEnabledShallowpublic 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 onpublic Object getModifiedElement()
getModifiedElement in class TextFileChangepublic ICompilationUnit getCompilationUnit()
protected IDocument acquireDocument(IProgressMonitor pm) throws CoreException
acquireDocument in class TextFileChangeCoreExceptionprotected void releaseDocument(IDocument document, IProgressMonitor pm) throws CoreException
releaseDocument in class TextFileChangeCoreExceptionprotected Change createUndoChange(UndoEdit edit, ContentStamp stampToRestore)
createUndoChange in class TextFileChangepublic Object getAdapter(Class adapter)
getAdapter in interface IAdaptablegetAdapter in class Changepublic void setDescriptor(ChangeDescriptor descriptor)
descriptor - the descriptor to set, or null to set no descriptorpublic ChangeDescriptor getDescriptor()
getDescriptor in class Change
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.