[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] how do I add a listener to the default java editor
|
- From: rpenner@xxxxxxxxxxx (Reagan Penner)
- Date: Tue, 29 Apr 2003 21:23:58 +0000 (UTC)
- Newsgroups: eclipse.tools
- Organization: http://www.eclipse.org
- User-agent: NewsPortal 0.23
Hello, I am trying to watch for changes occuring in my default java editor
and am having some trouble figuring out how to add a listener and what
type of listener to add. I have the following code which will give me the
handle to the current active
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor. Where abouts
can I hook into an IEditorPart to be notified of text level changes?
IEditorPart e = TemplatePlugin.getActiveEditor();
IContentOutlinePage outlinePage = (IContentOutlinePage)
e.getAdapter(IContentOutlinePage.class);
if (outlinePage != null) {
// editor wishes to contribute outlinePage to content outline view
System.out.println("the current selection is:
"+outlinePage.getSelection());
}
thanks in advance ........ Reagan