Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2003, 2018 IBM Corporation and others.
* Copyright (c) 2003, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -313,7 +313,7 @@ public TableViewer getTableViewer() {
}

protected Text createFilterText(Composite parent) {
fFilterText = new Text(parent, SWT.NONE);
fFilterText = new Text(parent, SWT.SEARCH | SWT.ICON_CANCEL);

GridData data = new GridData();
GC gc = new GC(parent);
Expand All @@ -327,6 +327,12 @@ protected Text createFilterText(Composite parent) {
data.verticalAlignment = GridData.BEGINNING;
fFilterText.setLayoutData(data);

fFilterText.addListener(SWT.DefaultSelection, event -> {
if (event.detail == SWT.ICON_CANCEL) {
fFilterText.setText(""); //$NON-NLS-1$
}
});

fFilterText.addKeyListener(KeyListener.keyPressedAdapter(e -> {
switch (e.keyCode) {
case SWT.CR:
Expand Down
Loading