Class CustomSourceFileChange

  • All Implemented Interfaces:
    org.eclipse.core.runtime.IAdaptable
    Direct Known Subclasses:
    FullTextSearchSourceFileChange

    public class CustomSourceFileChange
    extends org.eclipse.handly.refactoring.SourceFileChange
    Implementation of SourceFileChange with additional property "changeForbidden". This property tells about forbidden or not perform change
    • Constructor Summary

      Constructors 
      Constructor Description
      CustomSourceFileChange​(String name, org.eclipse.handly.model.ISourceFile sourceFile, boolean changeForbidden)
      Creates a change that initially contains only an empty root edit.
      CustomSourceFileChange​(String name, org.eclipse.handly.model.ISourceFile sourceFile, org.eclipse.text.edits.TextEdit edit, boolean changeForbidden)
      Creates a change with the given edit tree.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEnabled()  
      boolean isForbidden()
      Gets status of perform opertation
      void setEnabled​(boolean enabled)  
      • Methods inherited from class org.eclipse.handly.refactoring.SourceFileChange

        addEdit, addEdits, addGroupedEdits, addGroupedEdits, getAffectedObjects, getBase, getCurrentContent, getCurrentContent, getEdit, getModifiedElement, getPreviewContent, getPreviewContent, getPreviewDocument, getPreviewEdit, getPreviewEdits, getSaveMode, initializeValidationData, isValid, perform, setBase, setKeepPreviewEdits, setSaveMode
      • Methods inherited from class org.eclipse.ltk.core.refactoring.TextEditBasedChange

        addChangeGroup, addTextEditGroup, getChangeGroups, getKeepPreviewEdits, getName, getTextType, hasOneGroupCategory, setTextType
      • Methods inherited from class org.eclipse.ltk.core.refactoring.Change

        dispose, getAdapter, getDescriptor, getParent, setEnabledShallow
    • Constructor Detail

      • CustomSourceFileChange

        public CustomSourceFileChange​(String name,
                                      org.eclipse.handly.model.ISourceFile sourceFile,
                                      org.eclipse.text.edits.TextEdit edit,
                                      boolean changeForbidden)
        Creates a change with the given edit tree. The structure of the tree may be modified later.
        Parameters:
        name - the change's name, mainly used to render the change in the UI, can't be null
        sourceFile - the source file this change works on, can't be null
        edit - the root of the change's edit tree, can't be null
        changeForbidden - true if changes is forbidden for perform, false otherwise
      • CustomSourceFileChange

        public CustomSourceFileChange​(String name,
                                      org.eclipse.handly.model.ISourceFile sourceFile,
                                      boolean changeForbidden)
        Creates a change that initially contains only an empty root edit.
        Parameters:
        name - the change's name, mainly used to render the change in the UI, can't be null
        sourceFile - the source file this change works on, can't be null
        changeForbidden - true if changes is forbidden for perform, false otherwise
    • Method Detail

      • 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.TextEditBasedChange