Class HandlyOutlinePage
- All Implemented Interfaces:
IContentAdapterProvider,ICommonOutlinePage,org.eclipse.jface.viewers.ISelectionProvider,org.eclipse.ui.part.IPage,org.eclipse.ui.part.IPageBookViewPage,org.eclipse.ui.views.contentoutline.IContentOutlinePage
- Direct Known Subclasses:
HandlyXtextOutlinePage
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.handly.ui.outline.CommonOutlinePage
CommonOutlinePage.OutlineTreeViewer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds collapse-all support.protected abstract voidRegisters the given element change listener with the underlying model.protected voidAdds link-with-editor support.protected voidHook to add contributions to this outline page.protected voidAdds sorting support.protected ObjectComputes the input element for the outline page's tree viewer.protected voidNotifies that this outline page is affected in some way by the given element change event.Returns the content adapter that defines a mapping between elements of a Handly-based model and the outline's content.protected abstract IInputElementProviderReturns the input element provider for this outline page.voidinit(org.eclipse.ui.IEditorPart editor) Initializes this outline page with its corresponding editor.protected abstract voidRemoves the given element change listener from the underlying model.Methods inherited from class org.eclipse.handly.ui.outline.CommonOutlinePage
addInputChangeListener, addOutlineContribution, addSelectionChangedListener, createControl, createTreeViewer, dispose, editorInputChanged, getContentProvider, getControl, getEditor, getLabelProvider, getSelection, getTreeViewer, init, initDecorationContext, isAutoExpandable, refresh, registerGlobalActions, removeInputChangeListener, removeOutlineContribution, removeSelectionChangedListener, setFocus, setSelection, shouldUseHashlookupMethods inherited from class org.eclipse.ui.part.Page
getSite, makeContributions, setActionBarsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.handly.ui.outline.ICommonOutlinePage
getLexicalSortPreference, getLinkWithEditorPreferenceMethods inherited from interface org.eclipse.ui.part.IPage
setActionBarsMethods inherited from interface org.eclipse.ui.part.IPageBookViewPage
getSite
-
Constructor Details
-
HandlyOutlinePage
public HandlyOutlinePage()
-
-
Method Details
-
init
public void init(org.eclipse.ui.IEditorPart editor) Description copied from interface:ICommonOutlinePageInitializes this outline page with its corresponding editor. This method should be called by the editor shortly after page construction. Specifically, it must be called before the page's control is created.- Specified by:
initin interfaceICommonOutlinePage- Overrides:
initin classCommonOutlinePage- Parameters:
editor- the editor which created this outline page (notnull)
-
getContentAdapter
Returns the content adapter that defines a mapping between elements of a Handly-based model and the outline's content.Default implementation returns a
NullContentAdapter. Subclasses may override.- Specified by:
getContentAdapterin interfaceIContentAdapterProvider- Returns:
- an
IContentAdapter(nevernull)
-
computeInput
Computes the input element for the outline page's tree viewer.This implementation uses the
input element providerto obtain anIElementcorresponding to the editor input and returns an outline element corresponding to theIElement, as determined by thecontent adapter.- Specified by:
computeInputin classCommonOutlinePage- Returns:
- the input element (may be
null)
-
getInputElementProvider
Returns the input element provider for this outline page.- Returns:
- the input element provider for this outline page
-
addOutlineContributions
protected void addOutlineContributions()Hook to add contributions to this outline page.Default implementation adds contributions that are common to a typical outline, including
collapse-all,link-with-editor, andsortingsupport. Subclasses may extend this method. -
addCollapseAllSupport
protected void addCollapseAllSupport()Adds collapse-all support.Default implementation adds a
CollapseAllActionContribution. Subclasses may override this method. In particular, if collapse-all support is not needed, this method may be overridden to do nothing. -
addLinkWithEditorSupport
protected void addLinkWithEditorSupport()Adds link-with-editor support.Default implementation adds a
LinkWithEditorActionContribution, and aLinkWithEditorContributionwith aSourceElementLinkingHelper. Subclasses may override this method. In particular, if link-with-editor support is not needed, this method may be overridden to do nothing. -
addSortingSupport
protected void addSortingSupport()Adds sorting support.Default implementation adds a
LexicalSortActionContributionand aLexicalSortContribution. Subclasses may override this method. In particular, if sorting support is not needed, this method may be overridden to do nothing. -
addElementChangeListener
Registers the given element change listener with the underlying model.- Parameters:
listener- nevernull
-
removeElementChangeListener
Removes the given element change listener from the underlying model.- Parameters:
listener- nevernull
-
elementChanged
Notifies that this outline page is affected in some way by the given element change event.Note: This method may be called in any thread. The event object (and the deltas within it) is valid only for the duration of the invocation of this method.
Default implementation schedules a full
refreshof this outline page's tree viewer in the UI thread.- Parameters:
event- nevernull
-