Search in sources :

Example 6 with TextEditBasedChangeGroup

use of org.eclipse.ltk.core.refactoring.TextEditBasedChangeGroup in project che by eclipse.

the class TextEditChangeNode method createChildNodes.

protected ChildNode[] createChildNodes() {
    TextEditBasedChange change = getTextEditBasedChange();
    if (change instanceof MultiStateTextFileChange) {
        // no edit preview & edit disabling possible in the MultiStateTextFileChange (edits must be applied in sequence)
        return new ChildNode[0];
    }
    TextEditBasedChangeGroup[] groups = getSortedChangeGroups(change);
    ChildNode[] result = new ChildNode[groups.length];
    for (int i = 0; i < groups.length; i++) {
        result[i] = new TextEditGroupNode(this, groups[i]);
    }
    return result;
}
Also used : MultiStateTextFileChange(org.eclipse.ltk.core.refactoring.MultiStateTextFileChange) TextEditBasedChange(org.eclipse.ltk.core.refactoring.TextEditBasedChange) TextEditGroupNode(org.eclipse.ltk.internal.ui.refactoring.TextEditGroupNode) TextEditBasedChangeGroup(org.eclipse.ltk.core.refactoring.TextEditBasedChangeGroup)

Aggregations

TextEditBasedChangeGroup (org.eclipse.ltk.core.refactoring.TextEditBasedChangeGroup)6 TextEditBasedChange (org.eclipse.ltk.core.refactoring.TextEditBasedChange)4 ArrayList (java.util.ArrayList)3 List (java.util.List)2 Change (org.eclipse.ltk.core.refactoring.Change)2 MultiStateTextFileChange (org.eclipse.ltk.core.refactoring.MultiStateTextFileChange)2 Comparator (java.util.Comparator)1 HashMap (java.util.HashMap)1 ChangePreview (org.eclipse.che.ide.ext.java.shared.dto.refactoring.ChangePreview)1 AssertionFailedException (org.eclipse.core.runtime.AssertionFailedException)1 CoreException (org.eclipse.core.runtime.CoreException)1 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)1 ICompilationUnit (org.eclipse.jdt.core.ICompilationUnit)1 IJavaElement (org.eclipse.jdt.core.IJavaElement)1 JavaModelException (org.eclipse.jdt.core.JavaModelException)1 IRegion (org.eclipse.jface.text.IRegion)1 TextEditGroupNode (org.eclipse.ltk.internal.ui.refactoring.TextEditGroupNode)1 ChangePreviewViewerInput (org.eclipse.ltk.ui.refactoring.ChangePreviewViewerInput)1