search result in Eclipse opens in tab in same panel - eclipse

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.

Related

VSCode "Open Editors" panel not showing

I don't know what I have done but I cannot see the "Open Editors" panel in the Explorer view
I note also that clicking on the three dots (Views and More Actions...) to the right of the word Explorer at the top of the explorer panel the word Folders is greyed out
Can anyone point me to the setting I need to change in order to rectify this situation?
Just in case anyone else has the same problem here is how I resolved my issue. I won't bore you with how I discovered the solution.
Right-click in the activity bar, this will bring up a context menu with the entry for Open Editors listed but not marked with a tick
Activity bar context menu.
Clicking on "Open Editors" in this context menu brings up a new icon in the activity bar that looks like an open book
Open Editor icon
Right-clicking on this new icon reveals another context menu that includes the option to reset the location of the Open Editors panel.
Open Editor context menu
Selecting this option resolves the problem.
How I got into the problem in the first place is still difficult to ascertain. With the activity bar in its default configuration I must have dragged the "Open Editors" header to somewhere on the activity bar, that clearly removes it from the Explorer side bar but how I inadvertently right clicked this new icon and selected "Hide 'Open Editors'" without realising remains a mystery.
Go to view and click on Open View and the on Open Editors.
3 dots on extreme right hand side has an option - keep editors open --> set it to default view. Once done the open editor will be be visible on the left.
This is considering you have default vs code layout...
I am currently using version: 1.68.1
In VS Code, go to Settings and in the search box, type explorer.openEditors.visible. Set the value in the dialogue box to any number greater than 0 and you are good to go. Refer to the image below.

Files get opened in wrong editing area

my Eclipse Juno SR1 somehow got screwed up. It seems I have a new area, and if I interpret it correctly, it is called the "Shared Area" (only from a tooltip). I cannot get rid of it by conventional means (i.E. closing/hiding). All files I open now are opened in this shared area, not in the area my files were opened before. The area is distinct from the normal editing area in that it will not go to the same place (top right, under the menus).
The area has only maximize and minimize buttons. Maximizing it will maximize it over everything, this would be expected. Minimizing it actually hides it, but opening an existing file will bring it back as kind of a popup over the eclipse file list.
I do not seem to find how I activated this feature, and I cannot seem to find any activation instructions in the Eclipse help (the help looking for "shared" and "area" separately doesn't really help anyway).
I just want this feature/window/perspective to go away and let me open files like I used to. Any tips?
Edit: Maybe this area is not called "Shared area", this could be wrong. If not, it doesn't seem to have any name. It just forces all editors opening new files to open in it, and not in the area that they usually open in. The way I determined it was called "Shared area" is by minimizing it, then opening a file. It opens as kind of a popup (described above), and there's a menu bar attached with 2 icons, "Restore" and "Shared area", which is pre-selected.
This is the are "docked" to the right:
This is the area docked below:
The area is not dockable in the way that it docks to certain areas of Eclipse, but stretches (when dragged) over the whole Eclipse Window and even outside of it.
You should reset the perspective Window -> Reset Perspective...
The shared area is the default location to open files. The files remain open in the shared area across different perspectives such as Java and Debug so that you can switch between them while working on the same files. You'd generally drag a file outside the shared area to work on it without it appearing in other perspectives.
It's hard to position the shard area view by dragging it, but you can drag the surrounding views in place around it to get it where you want.
I click on the bottom corner of the offending tile and dragged in till it closed! The "reset perspective" did not work for me but the draggin to a smaller size as if it were a picture did. Hope this helps.
If nothing works out for you, simply go to window -> new Window. Opens up a fresh copy of eclipse with everything loaded up. Even on a restart,loads up like normally it would.
I think I know what you mean. If you drag any view to that "Shared Area" but not to the body but to the header (where the title is supposed to be) the dragged view will occupy completely that "Shared Aread".
Hope that helps.
Here's what worked for me:
Menu > Window > Perspective > Open Perspective > Other > Java(default) > Open
Now I can create a new class that shows on the tab next to my working tab.
Ctrl+Shift+{ to toggle it on or Off.
Ctrl+Shift+W to close both of the area.

Is there a way to set "waypoints" in an Eclipse file? Meaning

I'm working in a file that's thousands of lines of code. I'm implementing an algorithm at line 700-ish. I frequently have to navigate away from those lines to check out the other methods in the file.
Navigating back to where I'm actually coding is usually a pain. If I could set a waypoint at line 700 and map a shortcut to it that would be great. It would also be nice to be able to do this on a file level too.
Is there any way to do this in Eclipse? If not, should there be?
I don't control the file so I can't break it up into smaller files/classes.
There's a Bookmark view in Eclipse that would probably work for this.
On any line of source (at least in the Java view), right click in the left hand tray. You'll see a menu pop up and an option called Bookmark. Select that and provide some kind of useful description that you'll remember.
Now, add the Bookmarks view to your perspective.
Click on Window
Select Show View
Select Other (at the bottom)
Select Bookmarks under General (or just enter Bookmarks in the search box).
You should now have the Bookmarks view in your perspective listing your bookmarks. Duble click on one of the bookmarks and it will take you right to it.
Hope that helps.

In Eclipse, can I view the files I currently have open in a vertical stack instead of a horizontal one?

I would find it much easier if the tabs show which files are in the Editor were stacked vertically rather than horizontally. Stacked horizontally means that you run out of room to display file names very fast and makes switching between files time consuming.
Is there an option or a plugin to display the files vertically? (Similar to navigator, but for open files instead of project files) I can't seem to find one.
tabs can not be stacked vertically. However, CTRL+E (⌘+E on mac) might give you some relief.
Eclipse 3.8
CTRL+G brings up an Editors dialog as shown in this screen capture:
Eclipse 4.3
CTRL+E brings up the pop-up shown in this screen capture:
With ctrl+shift+e you can open an extra window that show you the open tabs vertically.
EditorViewer is very good
The project is dead, but it works fine with Eclipse 3.7. Just drop the .jar file in the dropins folder
http://sourceforge.net/projects/editorviewer/?source=dlp
Another command is CTRL+F6 not entirely like the other ones but great to switch between your two most recent tabs. And you also get a list of open tabs like the other examples.
you can always drag windows over each other to tile them vertically but if you see a ">>" at the end of the tabs clicking on it gives a file list which are open.
None that I know of, but there are some other tipps to make life a little easier:
1) Use Mylyn, which filters the Explorer-Views so only relevant files are shown there.
2) Have a look at "Extended VS Presentation" http://andrei.gmxhome.de/skins/index.html . This little plugin adds some useful features to reduce waste of screenspace. With it you can hide the file extension in editor tabs or limit the size of each tab and reduce the padding. Then you can remove the X and close tabs with a middle click. Each just a small saving, but they add up.
For newer versions of Eclipse, there is a plugin Open Editors which adds a view listing all open editors.
Finally a true relief!
https://sourceforge.net/projects/editorviewer/?source=dlp
Install dragging the "install" button from
https://marketplace.eclipse.org/content/vertical-tab-list
to show it
"window / show view / browsing / editors list"
On its internal menu I selected too: Sort by ext+name
Now I just need a way to hide the top tabs list and it will become perfect!

How do I get rid of the Eclipse Find/Replace Bar

For searching a document, I like using the floating Find/Replace window that pops up. Lately, however, hitting command-F pulls up this Find/Replace bar at the bottom of the editor window. I suppose I wouldn't mind it so much, except instead of selecting the text to search it puts the insertion point after whatever I've searched for before. Very annoying. Clicking on the magnifying glass pops up the other Find/Replace dialog.
How can I get the normal dialog to pop-up by default?
I should add that for some reason search is no longer working in Preferences, so I can no longer just search for "Find" to locate the setting I might need to change. So you'll have to give me the exact location.
A little more experimenting reveals that this is PyDev-specific behavior but I still can't find the setting that needs changing.
type Ctrl-Shift-L twice brings up Preferences window.
In Preferences window: type 'find bar' in the search field. This finds 'Find bar' in category 'Aptana Studio' (assuming you have Aptana Studio included in Eclipse). Click this entry 'Find Bar' to bring up the 'Find Bar' settings page.
On the Find Bar settings page uncheck 'Use custom find bar on Aptana editors' See shot.
This did the trick for me!
I added a feature request to the Pydev tracker for a setting to suppress the find bar: https://sourceforge.net/tracker/?func=detail&aid=3097964&group_id=85796&atid=577332
Could you make sure the 'command-f' is binding with menu item 'edit' - 'find/replace...'?
Might other plug-in hook the key binding.
And another way is using 'spy' to see which one contribute it. Focus on the search widget, then click 'alt - shift - f1'.