Skip to content

Issue #8621 : Find a value in a table view - #8622

Open
mattcasters wants to merge 2 commits into
apache:mainfrom
mattcasters:issue-8621
Open

mattcasters wants to merge 2 commits into
apache:mainfrom
mattcasters:issue-8621

Conversation

@mattcasters

Copy link
Copy Markdown
Contributor

The table search button stays the only find icon. Clicking it opens a menu with Find value and Find column. Find column is the existing column picker. Find value opens a dialog with the columns on the left (all checked) and the search string, case sensitive, and regular expression options on the right. Find first and Find next keep the dialog open. A match scrolls the row and column into view; in an editable grid the cell text is selected. Ctrl-F (Command-F on macOS) opens Find value. Filtered selection no longer advertises Ctrl-F, which was not wired to a key.

fixes #8621


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Run mvn clean install apache-rat:check to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If you have a group of commits related to the same change, please squash your commits into one and force push your branch using git rebase -i.
  • Mention the appropriate issue in your description (for example: addresses #123), if applicable.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

The table search button opens a menu with Find value and Find column.
Find value searches the checked columns and shows the matching cell.
Ctrl-F opens that dialog.
The toolbar button's stored control is the whole toolbar, so the menu
opened at the left edge. Place it at the pointer instead.
@bamaer

bamaer commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Blockers

1. revealFoundCell() reuses edit(), so a hit performs a click. editText returns early to fire the column's selection adapter (TableView.java:3279) or open the multi-line pop-out (TableView.java:3290). Six dialogs put an adapter on their COLUMN_TYPE_TEXT value column — Formula, Janino, Calculator, Random value, System data, Neo4j Get logging info — so every hit there opens a sub-dialog over the modal find dialog. And the pop-out's queued asyncExec (TableView.java:2337) steals focus back out of the search field after showHit set it, so Enter closes the pop-out instead of finding next.

ColumnInfo colinfo = columns[dataColumn];
if (!readonly
    && !colinfo.isReadOnly()
    && colinfo.getSelectionAdapter() == null
    && indexOfLineBreak(getCellValue(item, tableColumnIndex)) < 0) {
  edit(row, tableColumnIndex);
}

setPosition already ran, so the skipped case still leaves the active cell right.

2. lastHit is never reset. Change the search text, press Enter (Find next is the default button) and the scan resumes from the previous query's hit — earlier rows are never looked at, and continued makes the status say "No more matches". Reset it from a ModifyListener on wFind and selection listeners on the two checkboxes.

Should fix

3. Dead reuse path. open() runs its own event loop (BaseDialog.java:929) and the finally nulls findDialog, and APPLICATION_MODAL stops the table's Ctrl-F handlers firing, so findDialog / isOpen() are unreachable. Drop them, or make the shell modeless — which is what "stays open" implies, and would let the user type in the cell the search revealed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Find a value in a table view

2 participants