-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature: search through project with ctrl + f #53
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sillydan1
force-pushed
the
feature/project-search
branch
2 times, most recently
from
November 26, 2022 08:06
aa32820
to
afc6f10
Compare
sillydan1
changed the title
Feature: project search
Feature: search through project with ctrl + f
Nov 26, 2022
sillydan1
force-pushed
the
feature/project-search
branch
from
November 27, 2022 09:16
639846f
to
c74de3f
Compare
Nielswps
reviewed
Dec 3, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 😃 Is there a reason for calling the feature SpotlightSearch like on macOS?
src/main/java/dk/cs/aau/huppaal/controllers/SpotlightSearchController.java
Outdated
Show resolved
Hide resolved
sillydan1
force-pushed
the
feature/project-search
branch
from
December 3, 2022 15:39
af0e2dd
to
a0efd2c
Compare
This was mostly because that's where I got the inspiration from 😅 renamed it in a0efd2c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature - search project modal
This PR adds a new modal for finding elements in the currently opened project. This makes it much easier to find excactly the location/edge/component/update/sync etc that you need. Searches accepts regular expressions (java's regex, so users will have to manually escape special characters). If a search is not a valid regex, it will simply default to string-include.
The modal can be summoned either by selecting
view
>search...
or by pressingctrl + f
.Additionally, I have included some changes that makes it much easier to navigate the model when using a trackpad.
Dependencies
This PR is based on the changes from #52, so that should be merged first
Demo
Screen.Recording.2022-11-25.at.22.42.13.mov
Limitations
Right now, to keep the modal performant, it will only show a maximum of 100 (hardcoded) search results, with a priority of components, then locations, then edges. This might not be very accurate, but it's a quick and easy solution that seems to be good enough. In any case, it can be extended and/or refactored fairly easily.