public abstract class FilteringOutlinePopup extends OutlinePopup
Modifier and Type | Class and Description |
---|---|
protected class |
FilteringOutlinePopup.ElementMatcher
Pattern-based element matcher.
|
protected class |
FilteringOutlinePopup.FilteringOutlineTreeViewer
Overrides
canExpand method to allow expanding any tree item when the pattern-based
filter is active. |
protected static interface |
FilteringOutlinePopup.IMatcher<T>
Determines a true or false for a given object.
|
protected static class |
FilteringOutlinePopup.StringMatcher
Pattern-based string matcher.
|
OutlinePopup.OutlineTreeViewer
Constructor and Description |
---|
FilteringOutlinePopup() |
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.swt.widgets.Text |
createFilterText(org.eclipse.swt.widgets.Composite parent)
Creates the text control to be used for entering the filter pattern.
|
protected FilteringOutlinePopup.IMatcher<java.lang.Object> |
createPatternMatcher(java.lang.String pattern)
Returns a new pattern matcher based on the given pattern.
|
protected org.eclipse.swt.widgets.Control |
createTitleControl(org.eclipse.swt.widgets.Composite parent) |
protected org.eclipse.swt.widgets.Control |
createTitleMenuArea(org.eclipse.swt.widgets.Composite parent) |
protected org.eclipse.jface.viewers.TreeViewer |
createTreeViewer(org.eclipse.swt.widgets.Composite parent)
Creates a tree viewer for this outline popup.
|
protected org.eclipse.swt.widgets.Text |
getFilterText()
Returns the filter text control of this outline popup.
|
protected java.lang.Object |
getFocalElement()
Returns the current focal element for this outline popup.
|
protected org.eclipse.swt.widgets.Control |
getFocusControl() |
protected FilteringOutlinePopup.IMatcher<java.lang.Object> |
getPatternMatcher()
Returns the current pattern matcher for this outline popup.
|
void |
init(IOutlinePopupHost host,
org.eclipse.jface.bindings.keys.KeyStroke invokingKeyStroke)
Initializes this outline popup with the given host and, optionally,
invoking keystroke.
|
protected void |
patternMatcherUpdated()
Notifies that the pattern matcher has been updated.
|
protected void |
selectFirstMatch()
Selects the first element that matches the current filter pattern.
|
protected void |
setTabOrder(org.eclipse.swt.widgets.Composite composite) |
protected void |
updatePatternMatcher(java.lang.String pattern)
Updates the current pattern matcher to match the given pattern, then
calls
patternMatcherUpdated() to refresh the tree viewer. |
changeOutlineMode, computeInitialSelection, computeInput, createDialogArea, getContentProvider, getCorrespondingElement, getDefaultLocation, getDialogSettings, getHost, getInitialSelection, getInvokingKeyListener, getInvokingKeyStroke, getLabelProvider, getSelectedElement, getTreeViewer, gotoSelectedElement, initDecorationContext, isAutoExpandable, revealInHost, shouldUseHashlookup, updateInfoText
adjustBounds, applyBackgroundColor, applyForegroundColor, close, configureShell, createContents, createInfoTextArea, fillDialogMenu, getBackground, getBackgroundColorExclusions, getDefaultSize, getForeground, getForegroundColorExclusions, getInitialLocation, getInitialSize, getPersistBounds, getPersistLocation, getPersistSize, hasInfoArea, hasTitleArea, open, saveDialogBounds, setInfoText, setTitleText, showDialogMenu
canHandleShellCloseEvent, constrainShellSize, create, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, initializeBounds, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
public void init(IOutlinePopupHost host, org.eclipse.jface.bindings.keys.KeyStroke invokingKeyStroke)
OutlinePopup
open
the outline popup.
This method may be extended by subclasses. Subclasses must call the superclass implementation.
init
in class OutlinePopup
host
- the host of this outline popup (not null
)invokingKeyStroke
- the keystroke for invoking this outline popup,
or null
if noneprotected final org.eclipse.swt.widgets.Text getFilterText()
null
if it has not been created yetprotected final FilteringOutlinePopup.IMatcher<java.lang.Object> getPatternMatcher()
null
if noneprotected org.eclipse.swt.widgets.Control getFocusControl()
getFocusControl
in class OutlinePopup
protected void setTabOrder(org.eclipse.swt.widgets.Composite composite)
setTabOrder
in class OutlinePopup
protected org.eclipse.jface.viewers.TreeViewer createTreeViewer(org.eclipse.swt.widgets.Composite parent)
OutlinePopup
createTreeViewer
in class OutlinePopup
parent
- the parent composite (never null
)null
)protected org.eclipse.swt.widgets.Control createTitleMenuArea(org.eclipse.swt.widgets.Composite parent)
createTitleMenuArea
in class org.eclipse.jface.dialogs.PopupDialog
protected org.eclipse.swt.widgets.Control createTitleControl(org.eclipse.swt.widgets.Composite parent)
createTitleControl
in class org.eclipse.jface.dialogs.PopupDialog
protected org.eclipse.swt.widgets.Text createFilterText(org.eclipse.swt.widgets.Composite parent)
parent
- the parent composite (never null
)null
)protected final void updatePatternMatcher(java.lang.String pattern)
patternMatcherUpdated()
to refresh the tree viewer.pattern
- the pattern string (not null
)protected FilteringOutlinePopup.IMatcher<java.lang.Object> createPatternMatcher(java.lang.String pattern)
pattern
- the pattern string (not null
)null
if filtering is not requiredprotected void patternMatcherUpdated()
Default implementation refreshes the tree viewer, expands all nodes of the tree, and selects the first matching element.
protected void selectFirstMatch()
protected java.lang.Object getFocalElement()
Default implementation returns the initially selected element. Subclasses may override.
null
if none