public class XtextEObjectSearchDialog
extends org.eclipse.ui.dialogs.ListDialog
Modifier and Type | Field and Description |
---|---|
protected org.eclipse.swt.widgets.Text |
searchControl |
protected org.eclipse.swt.widgets.Text |
typeSearchControl |
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
Constructor and Description |
---|
XtextEObjectSearchDialog(org.eclipse.swt.widgets.Shell parent,
IXtextEObjectSearch searchEngine,
org.eclipse.jface.viewers.ILabelProvider labelProvider) |
XtextEObjectSearchDialog(org.eclipse.swt.widgets.Shell parent,
IXtextEObjectSearch searchEngine,
org.eclipse.jface.viewers.ILabelProvider labelProvider,
boolean enableStyledLabels) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyFilter()
Called when the dialog is initially opened and whenever the input text changes.
|
protected org.eclipse.swt.widgets.Control |
createDialogArea(org.eclipse.swt.widgets.Composite container) |
protected org.eclipse.swt.widgets.Label |
createMessageArea(org.eclipse.swt.widgets.Composite composite) |
protected java.lang.String |
getInitialPattern() |
protected IXtextEObjectSearch |
getSearchEngine() |
protected int |
getTableStyle() |
int |
open() |
void |
setInitialPattern(java.lang.String text) |
void |
setInitialTypePattern(java.lang.String text) |
void |
setInitialTypePattern(java.lang.String text,
boolean editable) |
protected void |
startSizeCalculation(java.lang.Iterable<IEObjectDescription> matches)
Called by
applyFilter() and is responsible for calling updateMatches(Collection, boolean) with
an appropriately sorted list of matches. |
void |
updateMatches(java.util.Collection<IEObjectDescription> matches,
boolean isFinished) |
createButtonsForButtonBar, getHeightInChars, getTableViewer, getWidthInChars, okPressed, setAddCancelButton, setContentProvider, setHeightInChars, setInput, setLabelProvider, setWidthInChars
configureShell, getDialogBoundsSettings, getDialogBoundsStrategy, getInitialElementSelections, getInitialSelections, getMessage, getOkButton, getResult, isResizable, setDialogBoundsSettings, setInitialElementSelections, setInitialSelections, setMessage, setResult, setSelectionResult, setTitle
close, closeTray, createButtonBar, createHelpControl, getLayout, getTray, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
applyDialogFont, buttonPressed, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
protected org.eclipse.swt.widgets.Text searchControl
protected org.eclipse.swt.widgets.Text typeSearchControl
public XtextEObjectSearchDialog(org.eclipse.swt.widgets.Shell parent, IXtextEObjectSearch searchEngine, org.eclipse.jface.viewers.ILabelProvider labelProvider)
public XtextEObjectSearchDialog(org.eclipse.swt.widgets.Shell parent, IXtextEObjectSearch searchEngine, org.eclipse.jface.viewers.ILabelProvider labelProvider, boolean enableStyledLabels)
protected IXtextEObjectSearch getSearchEngine()
public void setInitialPattern(java.lang.String text)
protected java.lang.String getInitialPattern()
public void setInitialTypePattern(java.lang.String text)
public void setInitialTypePattern(java.lang.String text, boolean editable)
public int open()
open
in class org.eclipse.jface.window.Window
protected int getTableStyle()
getTableStyle
in class org.eclipse.ui.dialogs.ListDialog
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite container)
createDialogArea
in class org.eclipse.ui.dialogs.ListDialog
protected org.eclipse.swt.widgets.Label createMessageArea(org.eclipse.swt.widgets.Composite composite)
createMessageArea
in class org.eclipse.ui.dialogs.SelectionDialog
protected void applyFilter()
searchControl
and typeSearchControl
using getSearchEngine()
and updates
the result using startSizeCalculation(Iterable)
.public void updateMatches(java.util.Collection<IEObjectDescription> matches, boolean isFinished)
protected void startSizeCalculation(java.lang.Iterable<IEObjectDescription> matches)
applyFilter()
and is responsible for calling updateMatches(Collection, boolean)
with
an appropriately sorted list of matches.