fSpecifierViewer.getCombo().select(0);
specifierCombo.setToolTipText(getSpecifierTooltip((IStructuredSelection) fSpecifierViewer.getSelection()));
/* Listen to Selection Changes in the Field-Viewer */
fFieldViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection = (IStructuredSelection) event.getSelection();
if (!selection.isEmpty()) {
/* Remember old Selection */
ISelection oldSelection = fSpecifierViewer.getSelection();
/* Set Field as Input */
ISearchField field = (ISearchField) selection.getFirstElement();
fSpecifierViewer.setInput(field);
/* Try keeping the selection */
fSpecifierViewer.setSelection(oldSelection);
if (fSpecifierViewer.getCombo().getSelectionIndex() == -1)
selectFirstItem(fSpecifierViewer);
}
}
});
/* Listen to Changes */
fSpecifierViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
fModified = true;
specifierCombo.setToolTipText(getSpecifierTooltip((IStructuredSelection) event.getSelection()));
}
});