There are 2 code examples for org.eclipse.jface.text.source.ISourceViewer.

The API names are highlighted below. You can use suckoo button to vote the code example(s) you like. The best code example will be ranked first next time. Thanks a lot for your feedback.

Project Name: CodeAnalyzer Package: de.fzi.cloneanalyzer.viewer

Source Code: CloneEditor.java (Click to view .java file)

Method Code:
vote
like

public void setAnnotationModel(IAnnotationModel model){
  ISourceViewer sv=getSourceViewer();
  sv.setDocument(sv.getDocument(),model);
}
 

Project Name: csvedit.plugin Package: org.fhsolution.eclipse.plugins.csvedit.editors.text

Source Code: CSVTextSourceViewerConfiguration.java (Click to view .java file)

Method Code:
vote
like

@Override public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer){
  PresentationReconciler reconciler=new PresentationReconciler();
  DefaultDamagerRepairer dr=new DefaultDamagerRepairer(new CSVTokenScanner(m_delimiter));
  reconciler.setDamager(dr,IDocument.DEFAULT_CONTENT_TYPE);
  reconciler.setRepairer(dr,IDocument.DEFAULT_CONTENT_TYPE);
  return reconciler;
}