public abstract class CommonOutlinePage extends org.eclipse.ui.part.Page implements ICommonOutlinePage
ICommonOutlinePage.| Modifier and Type | Class and Description |
|---|---|
protected class |
CommonOutlinePage.OutlineTreeViewer
A tree viewer for the
CommonOutlinePage. |
| Constructor and Description |
|---|
CommonOutlinePage() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInputChangeListener(IOutlineInputChangeListener listener)
Adds the given input change listener.
|
void |
addOutlineContribution(IOutlineContribution contribution)
Adds the given outline contribution.
|
void |
addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener) |
protected abstract java.lang.Object |
computeInput()
Computes the input element for the outline page's tree viewer.
|
void |
createControl(org.eclipse.swt.widgets.Composite parent) |
protected CommonOutlinePage.OutlineTreeViewer |
createTreeViewer(org.eclipse.swt.widgets.Composite parent)
Creates a tree viewer for this outline page.
|
void |
dispose() |
protected void |
editorInputChanged()
Notifies that the outline page's editor input has changed.
|
protected abstract org.eclipse.jface.viewers.ITreeContentProvider |
getContentProvider()
Returns the content provider that is to be used by the outline page's
tree viewer.
|
org.eclipse.swt.widgets.Control |
getControl() |
org.eclipse.ui.IEditorPart |
getEditor()
Returns the editor which created this outline page.
|
protected abstract org.eclipse.jface.viewers.IBaseLabelProvider |
getLabelProvider()
Returns the label provider that is to be used by the outline page's
tree viewer.
|
org.eclipse.jface.viewers.ISelection |
getSelection() |
org.eclipse.jface.viewers.TreeViewer |
getTreeViewer()
Returns the tree viewer of this outline page.
|
void |
init(org.eclipse.ui.IEditorPart editor)
Initializes this outline page with its corresponding editor.
|
void |
init(org.eclipse.ui.part.IPageSite pageSite) |
protected void |
initDecorationContext(org.eclipse.jface.viewers.DecorationContext context)
Hook to initialize decoration context.
|
protected boolean |
isAutoExpandable(org.eclipse.swt.widgets.TreeItem item)
Returns whether the given tree item is auto-expandable.
|
void |
refresh()
Completely refreshes this outline page's tree viewer,
preserving expanded tree paths where possible.
|
protected void |
registerGlobalActions()
Hook to register global action handlers.
|
void |
removeInputChangeListener(IOutlineInputChangeListener listener)
Removes the given input change listener.
|
void |
removeOutlineContribution(IOutlineContribution contribution)
Removes the given outline contribution.
|
void |
removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener) |
void |
setFocus() |
void |
setSelection(org.eclipse.jface.viewers.ISelection selection) |
protected boolean |
shouldUseHashlookup()
Returns whether the outline page's tree viewer should use hash lookup.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLexicalSortPreference, getLinkWithEditorPreferencepublic final org.eclipse.jface.viewers.TreeViewer getTreeViewer()
ICommonOutlinePagegetTreeViewer in interface ICommonOutlinePagenull if it has not been created yetpublic void init(org.eclipse.ui.IEditorPart editor)
ICommonOutlinePageinit in interface ICommonOutlinePageeditor - the editor which created this outline page
(not null)public final org.eclipse.ui.IEditorPart getEditor()
ICommonOutlinePagegetEditor in interface ICommonOutlinePagenull if it has not been set yetpublic void addOutlineContribution(IOutlineContribution contribution)
ICommonOutlinePageaddOutlineContribution in interface ICommonOutlinePagecontribution - not nullpublic void removeOutlineContribution(IOutlineContribution contribution)
ICommonOutlinePageremoveOutlineContribution in interface ICommonOutlinePagecontribution - not nullpublic void addInputChangeListener(IOutlineInputChangeListener listener)
ICommonOutlinePageaddInputChangeListener in interface ICommonOutlinePagelistener - not nullpublic void removeInputChangeListener(IOutlineInputChangeListener listener)
ICommonOutlinePageremoveInputChangeListener in interface ICommonOutlinePagelistener - not nullpublic void init(org.eclipse.ui.part.IPageSite pageSite)
init in interface org.eclipse.ui.part.IPageBookViewPageinit in class org.eclipse.ui.part.Pagepublic final org.eclipse.swt.widgets.Control getControl()
getControl in interface org.eclipse.ui.part.IPagegetControl in class org.eclipse.ui.part.Pagepublic void createControl(org.eclipse.swt.widgets.Composite parent)
createControl in interface org.eclipse.ui.part.IPagecreateControl in class org.eclipse.ui.part.Pagepublic void setFocus()
setFocus in interface org.eclipse.ui.part.IPagesetFocus in class org.eclipse.ui.part.Pagepublic void dispose()
dispose in interface org.eclipse.ui.part.IPagedispose in class org.eclipse.ui.part.Pagepublic org.eclipse.jface.viewers.ISelection getSelection()
getSelection in interface org.eclipse.jface.viewers.ISelectionProviderpublic void setSelection(org.eclipse.jface.viewers.ISelection selection)
setSelection in interface org.eclipse.jface.viewers.ISelectionProviderpublic void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
addSelectionChangedListener in interface org.eclipse.jface.viewers.ISelectionProviderpublic void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
removeSelectionChangedListener in interface org.eclipse.jface.viewers.ISelectionProviderpublic void refresh()
protected boolean shouldUseHashlookup()
Default implementation returns true.
Subclasses may override.
StructuredViewer.setUseHashlookup(boolean)protected abstract org.eclipse.jface.viewers.ITreeContentProvider getContentProvider()
null)protected abstract org.eclipse.jface.viewers.IBaseLabelProvider getLabelProvider()
null)protected abstract java.lang.Object computeInput()
null)protected CommonOutlinePage.OutlineTreeViewer createTreeViewer(org.eclipse.swt.widgets.Composite parent)
parent - the parent composite (never null)null)protected void editorInputChanged()
Default implementation computes and sets the
new input for the outline page's tree viewer. Subclasses may extend.
protected boolean isAutoExpandable(org.eclipse.swt.widgets.TreeItem item)
expandXXX methods.
If it returns false, the item is to be collapsed,
rather than expanded.
Default implementation returns true for the root item
and false for all other items. Subclasses may override.
item - the tree item (never null)true if the given item is auto-expandable;
false otherwiseprotected void registerGlobalActions()
If the editor which created this outline page is a text editor,
default implementation registers global action handlers for the
following text editor actions:
UNDO,
REDO,
NEXT,
PREVIOUS.
protected void initDecorationContext(org.eclipse.jface.viewers.DecorationContext context)
If this outline page implements IContentAdapterProvider,
default implementation registers this outline page in the given context
under the name IContentAdapterProvider.class.getName().
context - the decoration context (never null)Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0