|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.OpenAndLinkWithEditorHelper
public abstract class OpenAndLinkWithEditorHelper
Helper for opening editors on the viewer's selection and link the selection with the editor.
Constructor Summary | |
---|---|
OpenAndLinkWithEditorHelper(StructuredViewer viewer)
Creates a new helper for the given viewer. |
Method Summary | |
---|---|
protected abstract void |
activate(ISelection selection)
Tells to activate the editor that is open on the given selection. |
void |
dispose()
Disposes this helper. |
protected abstract void |
linkToEditor(ISelection selection)
Tells to link the given selection to the editor that is open on the given selection but does nothing if no matching editor can be found. |
protected abstract void |
open(ISelection selection,
boolean activate)
Tells to open an editor for the given selection. |
void |
setLinkWithEditor(boolean enabled)
Sets whether editor that corresponds to the viewer's selection should be brought to front. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OpenAndLinkWithEditorHelper(StructuredViewer viewer)
viewer
- the viewerMethod Detail |
---|
public void setLinkWithEditor(boolean enabled)
enabled
- true
to enable, false
to disablepublic void dispose()
Clients only need to call this method if their viewer has a longer life-cycle than this helper.
protected abstract void activate(ISelection selection)
Note: The implementation must not open a new editor.
selection
- the viewer's selectionprotected abstract void open(ISelection selection, boolean activate)
selection
- the viewer's selectionactivate
- true
if the editor should be activated, false
otherwiseprotected abstract void linkToEditor(ISelection selection)
The common implementation brings that editor to front but more advanced implementations may also select the given selection inside the editor.
Note: The implementation must not open a new editor.
selection
- the viewer's selection
|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.