| [news.eclipse.platform] Re: How to access an editor's SourceViewer and AnnotationModel |
TextEditor activeEd = (TextEditor)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
TextFileDocumentProvider tfdp = (TextFileDocumentProvider)activeEd.getDocumentProvider();
Document doc = (Document)tfdp.getDocument(Object obj);
AnnotationModel am = (AnnotationModel)tfdp.getAnnotationModel(Object obj);
The problem I have is I don't know what Object it wants and the documentation is not helpful in this area.