use of org.eclipse.jdt.internal.ui.text.correction.proposals.EditAnnotator in project flux by eclipse.
the class CUCorrectionProposal method getAdditionalProposalInfo.
@Override
public Object getAdditionalProposalInfo(IProgressMonitor monitor) {
StringBuffer buf = new StringBuffer();
try {
TextChange change = getTextChange();
change.setKeepPreviewEdits(true);
IDocument previewDocument = change.getPreviewDocument(monitor);
TextEdit rootEdit = change.getPreviewEdit(change.getEdit());
EditAnnotator ea = new EditAnnotator(buf, previewDocument);
rootEdit.accept(ea);
// Final pre-existing region
ea.unchangedUntil(previewDocument.getLength());
} catch (CoreException e) {
JavaPlugin.log(e);
}
return buf.toString();
}
use of org.eclipse.jdt.internal.ui.text.correction.proposals.EditAnnotator in project che by eclipse.
the class CUCorrectionProposal method getAdditionalProposalInfo.
@Override
public Object getAdditionalProposalInfo(IProgressMonitor monitor) {
StringBuffer buf = new StringBuffer();
try {
TextChange change = getTextChange();
change.setKeepPreviewEdits(true);
IDocument previewDocument = change.getPreviewDocument(monitor);
TextEdit rootEdit = change.getPreviewEdit(change.getEdit());
EditAnnotator ea = new EditAnnotator(buf, previewDocument);
rootEdit.accept(ea);
// Final pre-existing region
ea.unchangedUntil(previewDocument.getLength());
} catch (CoreException e) {
JavaPlugin.log(e);
}
return buf.toString();
}
Aggregations