Search in sources :

Example 1 with ChangePreviewViewerInput

use of org.eclipse.ltk.ui.refactoring.ChangePreviewViewerInput in project che by eclipse.

the class TextEditGroupNode method feedInput.

public ChangePreview feedInput(IChangePreviewViewer viewer, List categories) throws CoreException {
    InternalTextEditChangeNode element = getTextEditChangeNode();
    if (element != null) {
        Change change = element.getChange();
        if (change instanceof TextEditBasedChange) {
            IRegion range = getTextRange(this);
            ChangePreviewViewerInput input = null;
            if (range != null) {
                input = TextEditChangePreviewViewer.createInput(change, new TextEditBasedChangeGroup[] { fChangeGroup }, range);
            } else {
                input = TextEditChangePreviewViewer.createInput(change, fChangeGroup, 2);
            }
            return viewer.setInput(input);
        }
    } else {
        return viewer.setInput(null);
    }
    return null;
}
Also used : TextEditBasedChange(org.eclipse.ltk.core.refactoring.TextEditBasedChange) ChangePreviewViewerInput(org.eclipse.ltk.ui.refactoring.ChangePreviewViewerInput) TextEditBasedChange(org.eclipse.ltk.core.refactoring.TextEditBasedChange) Change(org.eclipse.ltk.core.refactoring.Change) IRegion(org.eclipse.jface.text.IRegion) TextEditBasedChangeGroup(org.eclipse.ltk.core.refactoring.TextEditBasedChangeGroup)

Aggregations

IRegion (org.eclipse.jface.text.IRegion)1 Change (org.eclipse.ltk.core.refactoring.Change)1 TextEditBasedChange (org.eclipse.ltk.core.refactoring.TextEditBasedChange)1 TextEditBasedChangeGroup (org.eclipse.ltk.core.refactoring.TextEditBasedChangeGroup)1 ChangePreviewViewerInput (org.eclipse.ltk.ui.refactoring.ChangePreviewViewerInput)1