-
Notifications
You must be signed in to change notification settings - Fork 196
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
Display quick search dialog result in SourceViewer with line numbers. Fixes #2010 #2644
base: master
Are you sure you want to change the base?
Conversation
(following pictures were taken before #2541 (adding 'search in' combo box with history) was merged) After + caret located on line other than target line, caret line becomes highlighted as well |
eaae0b5
to
d078088
Compare
Thats a nice addition. |
@@ -1030,47 +1168,6 @@ private StyledString highlightMatches(String visibleText) { | |||
return styledText; | |||
} | |||
|
|||
// Version using sourceviewer |
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.
do we know why this was discarded in the first place?
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.
It was already there (see 1st commit) when QuickSearchDialog code was contributed from Spring Tools suite.
From what I can tell it was always just a protoype code - when I tried it uncommented it looked just like that.
...eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchDialog.java
Outdated
Show resolved
Hide resolved
...eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchDialog.java
Show resolved
Hide resolved
b72a51b
to
cefa208
Compare
What it does
Adds line numbers (vertical ruler) when presenting content that contains searched term in Quick Search dialog. For this, simple StyledText widget that was used to present content was replaced with SourceViewer widget. It's configured with same colors like generic text editor.
(* current line highlighting must be enabled in preferences)
How to test
Open Quick Search dialog (default: CTRL + SHIFT + ALT + L) and confirm bottom area presenting parts of files where match was found behaves like it used to - displays match vertically centered, keeps it centered on resizing the dialog or area, displays match 'context' (lines before & after match within source file).
Known bugs
Changing theme (light <-> dark) while Quick Search dialog is open does not change all the colors used inside it (namely occurrences highlighting). Closing and reopening the dialog fixes the colors.
Author checklist