how do I add a listener to the default java editor [message #9885] |
Wed, 30 April 2003 11:57 |
Eclipse User |
|
|
|
Originally posted by: rpenner.cs.usask.ca
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
|
|
|
Powered by
FUDForum. Page generated in 0.04456 seconds