Class ProjectCompositeChange

  • All Implemented Interfaces:
    org.eclipse.core.runtime.IAdaptable

    public class ProjectCompositeChange
    extends org.eclipse.ltk.core.refactoring.CompositeChange
    Composite Change for union all changes affected the same project
    • Constructor Summary

      Constructors 
      Constructor Description
      ProjectCompositeChange​(String projectName, org.eclipse.ltk.core.refactoring.Change[] changes, boolean changeForbidden)
      Constructor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.eclipse.ltk.core.refactoring.Change[] getProjectChange​(Collection<org.eclipse.ltk.core.refactoring.Change> changes)
      Creates ProjectCompositeChange by the changes.
      String getProjectName()
      Gets the name of refactoring project
      boolean isEnabled()  
      boolean isForbidden()
      Gets status of perform opertation
      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, perform, remove, toString
      • Methods inherited from class org.eclipse.ltk.core.refactoring.Change

        getAdapter, getParent, setEnabledShallow
    • Constructor Detail

      • ProjectCompositeChange

        public ProjectCompositeChange​(String projectName,
                                      org.eclipse.ltk.core.refactoring.Change[] changes,
                                      boolean changeForbidden)
        Constructor
        Parameters:
        projectName - name of the refactoring project, can't be null
        changes - Changes affect the same project, can't be null
        changeForbidden - true if changes is forbidden for perform, false otherwise
    • Method Detail

      • getProjectChange

        public static org.eclipse.ltk.core.refactoring.Change[] getProjectChange​(Collection<org.eclipse.ltk.core.refactoring.Change> changes)
        Creates ProjectCompositeChange by the changes. This methods groups Changes by its affected project. If all changes affect the same project empty array will be returned
        Parameters:
        changes - collection of the Changes, can't be null
        Returns:
        array of ProjectCompositeChange or empty array if all changes affect to the same project, never null
      • getProjectName

        public String getProjectName()
        Gets the name of refactoring project
        Returns:
        name of the refactoring project, can't be null
      • 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 class org.eclipse.ltk.core.refactoring.Change
      • setEnabled

        public void setEnabled​(boolean enabled)
        Overrides:
        setEnabled in class org.eclipse.ltk.core.refactoring.CompositeChange