Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » how do I add a listener to the default java editor
how do I add a listener to the default java editor [message #9885] Wed, 30 April 2003 11:57
Eclipse UserFriend
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
Previous Topic:Content assist in txt files
Next Topic:Property Page + Classpath ordering problem
Goto Forum:
  


Current Time: Sat Jun 07 13:10:55 EDT 2025

Powered by FUDForum. Page generated in 0.04456 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top