Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Finder #656

Merged
merged 11 commits into from
Jan 18, 2024
Merged

New Finder #656

merged 11 commits into from
Jan 18, 2024

Conversation

hernanmd
Copy link
Member

This PR contains the new implementation of the Finder based in Spec 2. It is a first version which could be greatly improved by receiving feedback from the community once integrated.

This PR does NOT remove the old Finder. That would be pushed by another PR.

The work in this PR started in the repository https://github.com/n1toxyz/NewTools-Finder (thanks to @n1toxyz !).
Then it was re-taken and completed in https://github.com/pharo-spec/NewTools-Finder/tree/main

Most of the look and feel is the same of the Morphic based Finder tool, however it includes new features and the model it is cleaner, allowing to add new types of searches in a straightforward way.

Features

  • Includes new features and settings to control the behavior of the searches.
    • Expand all the results by default
    • Log evaluation errors for Example searches to Transcript
    • Log evaluation errors for Example searches to a file.
    • Use completion (disabled because completion is not working correctly in Pharo 12 for now).
  • Includes auto-selection of the first item if matches exactly with the entered search input.
  • Example searches run with a timeout.
  • Search as you type (like Spotter) is included (after typing the first 3 characters by default), however not enabled in the default setting for now.
  • Search using different strategies
    • Substring search (default option)
    • Regex for regular expressions
    • Exact for matching exactly was typed.
    • Case, which can be combined or not. A complete explanation of the possible combinations can be found in the class comment of StFinderSearchOptions.
  • Commands (contextual menus) for:
    • Debug it (enabled when it makes sense: selection of methods)
    • Profile it (enabled when it makes sense: selection of methods)
    • Browse
    • References
    • Senders
    • Implementors
    • Expand all items
    • Collapse all items
    • Select all items
    • Unselect all
    • Copy the current selection
  • Includes a new search type (Packages) which wasn't available in the old Finder.

Known bugs and limitations

  • In the UI, the first items returned from the first search do not include their children, meaning that they do not include the expand arrow at the left of each children, although each child node in the model contains it. Hitting Enter a second time will draw the left arrows to expand the node.
  • Tests for source code search are still missing. Some tests could have been implemented Parametrized Test Matrix.
  • Time out for example searches needs more testing.
  • Searching in comments are ignored currently.
  • Searching some pragmas needs more testing.

@Ducasse Ducasse merged commit 6805e51 into pharo-spec:Pharo12 Jan 18, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants