|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
editorListener.handlers.EditorListener
public class EditorListener
This singleton class is part of an extensible observer pattern providing a concrete class for all listening capabilities of this plug-in. Possible functionality to add: - Reporting of all open windows. Note: Eclipse will not allow the same resource to be opened by the same editor in the same workbench multiple times. This does not apply across perspectives or windows in the same instance.
Method Summary | |
---|---|
void |
changeFocus(org.eclipse.jface.text.IDocument doc)
Method to be called by dispatches when a document is brought into focus. |
void |
documentClosed(org.eclipse.jface.text.IDocument doc)
Method to be called by dispatches when a document is closed. |
void |
documentOpen(org.eclipse.jface.text.IDocument doc)
Method to be called by dispatches when a document is opened. |
static org.eclipse.ui.IWorkbenchPart |
getActiveJavaEditor()
Attempts to get the currently the active JavaEditor. |
static EditorListener |
getInstance()
Singleton instantiation. |
AcceptableFileTypeHandler |
getTypeHandler()
|
static org.eclipse.ui.IWorkbenchPart |
getWorkbenchPart(org.eclipse.jface.text.IDocument doc,
boolean restore)
A static method to get the workbench part from a document. |
void |
setTypeHandler(AcceptableFileTypeHandler typeHandler)
|
void |
updateCurrentDocument(org.eclipse.jface.text.IDocument doc)
Method to be called by dispatches when a document is modified. |
Methods inherited from class java.util.Observable |
---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static EditorListener getInstance()
public void documentOpen(org.eclipse.jface.text.IDocument doc)
doc
- the documentpublic void documentClosed(org.eclipse.jface.text.IDocument doc)
doc
- the documentpublic void changeFocus(org.eclipse.jface.text.IDocument doc)
doc
- the documentpublic void updateCurrentDocument(org.eclipse.jface.text.IDocument doc)
doc
- the documentpublic static org.eclipse.ui.IWorkbenchPart getWorkbenchPart(org.eclipse.jface.text.IDocument doc, boolean restore)
doc
- the document
public static org.eclipse.ui.IWorkbenchPart getActiveJavaEditor()
null
.public AcceptableFileTypeHandler getTypeHandler()
public void setTypeHandler(AcceptableFileTypeHandler typeHandler)
typeHandler
- set the file type handler. This can be used to provide
non-Java listening abilities.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |