Scroll in eclipse quick search preview - eclipse

I'd like to scroll when in the preview part of the quick text search (Search in menu -> Quick Search)
(IntelliJ has it without any effort). Is it possible?

I assume you're referring to the search provided by the Spring Quick Search plug-in.
Scrolling the result preview area vertically is not possible, since the whole point is to open results in the editor.
In case you have many results I recommend using regular Eclipse search, since this search dialog is practically useless.

Related

VS Code find result panel

Is there any way to print search results (Ctrl+Shift+F) to horizontal panel?
Current vertical view is really inconvenient for me as I see only small part of line. Thanks
Update: see Visual studio code - how to copy search results? The new search editor makes seeing and copying the results much more user-friendly.
And now you can just drag the Search view into the Panel.
v1.21 has helped this problem. See Horizontal panel search
// Preview: controls if the search will be shown as a view in the
sidebar or as a panel in the panel area for more horizontal space.
Next release search in panel will have improved horizontal layout and
this will no longer be a preview.
"search.location": "panel",
I don't think you can print those results yet but at least the view is much improved. I don't think you meant actually "print" but nevertheless...
EDIT: Functionality added after the original answer:::
You can now right-click anywhere in the search results and select "Copy All" to get all the search results into the clipboard. That context menu has some other options as well.
As of May 2020, the accepted answer is marked by VSCode as a deprecated setting, and no longer works.
Instead, use the Command Palette to find for "Open New Search Editor" to get a full-screen search experience. This option is not bound to a keyboard shortcut by default, and you'll have to do that separately (would be nice to have it as the default, IMO).

search result in Eclipse opens in tab in same panel

When I search for something in Eclipse and the results show in the Search tab, whenever I click on a result (for example, a .java) it opens in a new tab next to the Search tab (in the lower panel), instead of in a new tab next to the rest of files that are open in Eclipse (in the upper panel).
This is very annoying because I use the lower panel for "tool views" such as Console, Search, Problems, Tasks, etc and I don't want files to be opened in that panel.
I'm sure I'm missing some setting in the preferences but I can't find it and this behaviour is driving me crazy.
Thanks for your help!
I had the same problem and was able to finally find a solution which helped me, so this should work for you as well.
Try the following:
drag the Search view out of its current position and anchor it in a different place (I dragged it just above the Explorer view on the left)
double click on a search result - it should open in the panel with all other files
next drag the Search view again to anchor it as the bottom panel, and try to open a search result again
You may need to play around with this a few times before it works, but it took me less than a minute to fix.
It seems that the way how you anchor the Search view has influence where the files will open after you double click.
See the original post which helped me find the solution
I fixed this in my variant of Eclipse (MCUXpresso) by altering: Window -> Preferences -> General -> Search -> Reuse editors to show matches.

Move Eclipse's Find/Replace dialog to a view?

I find Eclipse's (Eclipse 3.7, Indigo, running under Mac OS X 10.6.8) Find/Replace floating dialog box to be very annoying. Part of the time it ends up obscuring the search results. Is there any way to have Eclipse move the Find/Replace somewhere else? I'd like it to be a pop-up view, as I often do with the Console, Servers, Outline, and other views. However, if it could be incorporated into the view which it's searching, that would be great, too.
Eclipse's Find / Replace dialog is a dialog, not a view, so you can't drag and drop it to one of the view areas.
Here's a Eclipse search plugin that might work for you. Scroll all the way to the bottom of the page to get the Software Update link.
Worst case, you could write your own Eclipse plug-in that creates a view that does a Find / Replace.
TL;DR
Find/replace cannot be used as a view. Here are two ways to find text without obstructing the search:
Use incremental search (CTRL+J)
Use the quick search plugin (CTRL+SHIFT+L)
Pros and cons
Both approaches behave differently from the traditional find/replace and may require some getting used to.
Approach 1.
It works out of the box, no need to install a plugin, but it (currently) does not support pasting nor searching for the current selection (but there is CTRL+K for the latter). You can use UP and DOWN or repeat CTRL+J or CTRL+SHIFT+J to jump between matches.
Approach 2.
This still opens a dialog, but one which integrates the search results rather than obscuring them. I suggest resizing it to have a good preview size.
The default shortcut shadows the "Show Key Assist" original, but this can be changed. It is an extra install and AFAIK only supports case sensitive searches, but it supports searching for the selection and pasting.
It shows matches across files, starting with the top open editor (if you have more than one visible, e.g. side by side, it sometimes does not start with the one you were last on). You can move between matches with UP and DOWN and hit enter to go back to the editor on the selected match.
NOTE
I suppose on OSX you can replace CTRL with CMD in keyboard shortcuts above to achieve the same, but I could not test it. The shortcuts can be customized in Preferences->General->Keys

How to cancel search highlight in Eclipse

When I search something in Eclipse, the search items stay highlighted for some time. How do I remove this after I have found what I was looking for?
Remove your matches in the search view, that will remove the highlighting. I.e., click the button with the two X's in the search view.
If you cannot see that view, navigate to window -> show view -> Search
AFIAK, the search result view has a toolbar button to clear the search results. This removes the highlighting in the editor.
An alternative way is to run a search that will yield no results. For example file search, containing text - leave this field empty, files - some stupid extension like ".qwe".
For people concerned that https://stackoverflow.com/a/3545215/6012102 removes search results from history.
Select the search from history, press "Run the current search again" (2 rotating arrows icon). This will run the search and you will get all the results back (this brings back the text highlight as well unfortunately).
Disable Preferences->General->Text Editors->Annotations->Search Results->Text as.
For a single instance, delete the line and undo it: Ctrl+DCtrl+Z. This is faster than the other answers, and worked when they failed (for some buggy JSP I had).

Is it possible to dock the "Find/Replace" window in Eclipse?

I could have sworn I saw it once before in a screencast where someone had the find/replace window docked in their Eclipse environment.
However looking through the list of options in "Window > Show" the closest thing I can find is the Search window.
I find that I use it quite a bit and with larger monitors these days I figure I could afford to have it open in my perspective all the time.
Is this possible?
Thanks.
One poor-man's workaround is to dock a view that you don't need in a part of Eclipse where you want the find/replace view and then place the find/replace dialog on top of that like this:
Clearly this is a huge kludge but it does work.
I am not sure about that, since Fast views are:
icons allowing users to quickly display different views that have been created as fast views
And the search/replace is a Dialog, not a View..
(source: bpsite.net)
(That Dialog box is not like Views, which support editors, also have their own menus. Some views also have their own toolbars.)
The help page mentions:
Fast views are hidden views that can be quickly opened and closed. They work like other views except they do not take up space in your Workbench window.
This might not be an exact answer for the question. But this works like a charm.
Press ctrl + j and keep typing...
Use ctrl + k to go on
Use shift key wherever required.
Use Edit > Incremental Find Next (Ctrl+J) or Edit > Incremental Find Previous (Ctrl+Shift+J) to enter the incremental find mode, and start typing the string to match. Matches are found incrementally as you type. The search string is shown in the status line. Press Ctrl+J or Ctrl+Shift+J to go to the next or previous match. Press Enter or Esc to exit incremental find mode.