Class CustomCompositeChange
- java.lang.Object
-
- org.eclipse.ltk.core.refactoring.Change
-
- org.eclipse.ltk.core.refactoring.CompositeChange
-
- com._1c.g5.v8.dt.lcore.refactoring.CustomCompositeChange
-
- All Implemented Interfaces:
IProjectAwareChange
,org.eclipse.core.runtime.IAdaptable
- Direct Known Subclasses:
FullTextSearchCustomCompositeChange
public class CustomCompositeChange extends org.eclipse.ltk.core.refactoring.CompositeChange implements IProjectAwareChange
SpecialCompositeChange
for refactoring. Contains all changes for one file asTextEditBasedChange
-
-
Constructor Summary
Constructors Constructor Description CustomCompositeChange(String name, org.eclipse.handly.model.ISourceFile sourceFile, org.eclipse.text.edits.TextEdit edit, boolean changeForbidden)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.ltk.core.refactoring.Change
getAllChange()
GetsChange
contains all all changes in file as one blockString
getProjectName()
Gets name of the affected projectString
getSortedName()
Special name for sorting.boolean
isEnabled()
boolean
isForbidden()
Gets status of perform opertationorg.eclipse.ltk.core.refactoring.Change
perform(org.eclipse.core.runtime.IProgressMonitor pm)
void
setEnabled(boolean enabled)
-
Methods inherited from class org.eclipse.ltk.core.refactoring.CompositeChange
add, addAll, clear, createUndoChange, dispose, getAffectedObjects, getChildren, getDescriptor, getModifiedElement, getName, getUndoUntilException, initializeValidationData, internalContinueOnCancel, internalHandleException, internalProcessOnCancel, isSynthetic, isValid, markAsSynthetic, merge, remove, toString
-
-
-
-
Constructor Detail
-
CustomCompositeChange
public CustomCompositeChange(String name, org.eclipse.handly.model.ISourceFile sourceFile, org.eclipse.text.edits.TextEdit edit, boolean changeForbidden)
Constructor- Parameters:
name
- name of the refactoring unit, can't benull
sourceFile
-ISourceFile
, can't benull
edit
- text edit contains all changes in file, can't benull
changeForbidden
-true
if changes is forbidden for perform,false
otherwise
-
-
Method Detail
-
getProjectName
public String getProjectName()
Description copied from interface:IProjectAwareChange
Gets name of the affected project- Specified by:
getProjectName
in interfaceIProjectAwareChange
- Returns:
- name of the affected project, can be
null
if there is no affected project
-
getSortedName
public String getSortedName()
Special name for sorting. This name is full path ofISourceFileExtension.getFile()
ifsourceFile
instance ofISourceFileExtension
, otherwise it is name of theChange
- Returns:
- name for sorting, never
null
-
getAllChange
public org.eclipse.ltk.core.refactoring.Change getAllChange()
GetsChange
contains all all changes in file as one block- Returns:
Change
, nevernull
-
perform
public org.eclipse.ltk.core.refactoring.Change perform(org.eclipse.core.runtime.IProgressMonitor pm) throws org.eclipse.core.runtime.CoreException
- Overrides:
perform
in classorg.eclipse.ltk.core.refactoring.CompositeChange
- Throws:
org.eclipse.core.runtime.CoreException
-
isForbidden
public boolean isForbidden()
Gets status of perform opertation- Returns:
true
if changes is forbidden for perform,false
otherwise
-
isEnabled
public boolean isEnabled()
- Overrides:
isEnabled
in classorg.eclipse.ltk.core.refactoring.Change
-
setEnabled
public void setEnabled(boolean enabled)
- Overrides:
setEnabled
in classorg.eclipse.ltk.core.refactoring.CompositeChange
-
-