Class TextFileContentCompositeChange

  • All Implemented Interfaces:

    public class TextFileContentCompositeChange
    extends org.eclipse.ltk.core.refactoring.CompositeChange
    Special CompositeChange for union TextFileContentChange changes
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(org.eclipse.ltk.core.refactoring.Change change)
      Adds the given change to the list of children.
      org.eclipse.ltk.core.refactoring.Change getAllChange()
      Gets Change contains all changes in text content attribute as one block
      org.eclipse.ltk.core.refactoring.Change perform​(org.eclipse.core.runtime.IProgressMonitor pm)  
      • Methods inherited from class org.eclipse.ltk.core.refactoring.CompositeChange

        addAll, clear, createUndoChange, dispose, getAffectedObjects, getChildren, getDescriptor, getModifiedElement, getName, getUndoUntilException, initializeValidationData, internalContinueOnCancel, internalHandleException, internalProcessOnCancel, isSynthetic, isValid, markAsSynthetic, merge, remove, setEnabled, toString
      • Methods inherited from class org.eclipse.ltk.core.refactoring.Change

        getAdapter, getParent, isEnabled, setEnabledShallow
    • Constructor Detail

      • TextFileContentCompositeChange

        public TextFileContentCompositeChange​(String name,
                                              org.eclipse.core.resources.IFile file)
        Construct new instance of TextFileContentCompositeChange
        name - of the refactoring unit, cannot be null
        file - the text file to apply the change to, cannot be null
    • Method Detail

      • getAllChange

        public org.eclipse.ltk.core.refactoring.Change getAllChange()
        Gets Change contains all changes in text content attribute as one block
        Change contains all changes in text content attribute as one block, never null
      • add

        public void add​(org.eclipse.ltk.core.refactoring.Change change)
        Adds the given change to the list of children. The change to be added can be null. Adding a "null" change does nothing.

        Note that this change can union only TextFileContentChange children in otherwise exception will be throwed

        add in class org.eclipse.ltk.core.refactoring.CompositeChange
        change - the change to add, cannot be null
        IllegalArgumentException - if specified change not extends TextFileContentChange
      • perform

        public org.eclipse.ltk.core.refactoring.Change perform​(org.eclipse.core.runtime.IProgressMonitor pm)
                                                        throws org.eclipse.core.runtime.CoreException
        perform in class org.eclipse.ltk.core.refactoring.CompositeChange