In Eclipse, is there a short cut key to open a editor in a New Window? - eclipse

I am editing a .java file in eclipse, is there a short cut key to launch/open the current .java file I am editing into a new window to make use of my multiple displays?
I am using Eclipse 3.x

There is no shortcut key in Eclipse to reopen a file in a new window, but I'm unclear on how that would work anyway. Maybe I'm missing something, but how would Eclipse know which display to use, where to position the new window on the display, and what dimensions to use for the new window? And even if it did know how to do all that, it's not improbable that you would still want to adjust the size and positioning of the new window.
Besides, there already is a better alternative to a shortcut key: just position the mouse cursor over the tab of the open file, drag it to wherever you want on any of your displays, and optionally resize that new window as desired. The change will persist over restarts of Eclipse.
(I verified this on the latest release of Eclipse, Oxygen.2 Release 4.7.2, but I don't know when that drag and drop functionality was first implemented.)

Related

How to make Matlab editor open a new script as a tab by default, instead of a new window?

I'm used to using tabs rather than having many new windows open. I've recently changed (work) computers and now whenever I open an old script or start writing a new one it opens a new instance of the matlab editor. The question is, does anybody know how to change the default to a new tab within the same editor? (hope that makes sense).
Thanks
Open 2 scripts or more. On one of the editor windows press the circled triangle (I am sure it has a proper name):
Select Dock All in Editor.
The files should appear as tabs docked to the matlab desktop.
You can now undock the editor using the same button (you should undock the editor, not a specific file)
Any file you open now should be in a new tab.

How do you make new editors open in another screen?

I use dual monitor for work and I prefer to have the editor on my main screen while the rest of eclipse in my laptop monitor.
However, when I open a new file, that is. I open a file with Cmd-Shift-R, files are opened in my laptop monitor as opposed to the editor that I dragged to my main screen.
I find this mildly annoying. Any ideas?
Are using the Window -> New Window feature? In that case it depends on which window you're working on at the time you press Ctrl+Shift+R.
However, if you're streching only one Eclipse window along both monitors, then the Open Resource dialog will be opened in your "monitor number 1" (and that depends on your graphic configuration: Laptop+Main or Main+Laptop).
I found easier to avoid the new window menu and just to drag those views out of eclipse. This creates a secondary window but the project explorer is linked to the old window so double click will open the file on the main window.
I recommend to save everything as a new perspective that I usually call "Java 2 Windows". This way I can change perspectives when I do not have an auxiliar screen.
P.S. Just avoid closing the auxiliar window when leaving eclipse.

Eclipse Invisible Editor

I have eclipse Juno. I'm not sure how, but my editor in eclipse is now "invisible". By invisible i mean, the editor pane is not in the visible window. I'm not a novice in eclipse and i know you can minimize the editors or maximize a different panel - but this isn't the case. There isn't even a minimize/maximize button on this empty space where the editor should be.
However, the title bar shows the current file that is opened (but in the invisible editor and hence invisible). and my outline sidebar shows the file's outline.
I think this might have happened when splitting editor panes (which i do a lot, love the side by side comparison), and also switching the perspective.
Any ideas on how i can get the editor back in the visible window?
Above is a screenshot of how it looks. At the time of the screen shot i had just recently clicked a file to open it, and it seems to have opened in the invisible editor.
I've tried all given solutions and none of them solved the problem.
Only using Window->New Window gave me a new fixed eclipse window.
Try Window > Reset Perspective to get things back to normal.
I minimized sharedArea and after restore it was empty. Editors worked well (open, close, save etc.) but i could not see them. Closing all perspectives helped.
This happens to me sometimes when I try to split an editor group by dragging an editor tab. The only solution that worked for me was to close every single perspective in the application toolbar, then Window -> New Window.
I've had this happen occasionally when splitting panes. Restarting Eclipse didn't work for me, nor did resetting the perspective.
The solution I stumbled upon was to give the editor area focus (by clicking in the area where it should be, I suppose) and close files in the invisible editor with Ctrl+W until the editor reappears. You may notice the window title changes to follow the file in the hidden editor.
I had the same problem and simply stopping/restarting Eclipse fixed it.
I have the fix, when neither resetting the perspective or restarting eclipse helps:
At the bottom of the File Menu, there is your recent file name that you are trying to get back. Click on that and it should return.
Start eclipse with:
eclipse.exe -repair

Detached windows in Eclipse, is this possible?

Is there a way (plugin) in Eclipse to open detached windows which can be put on separate monitors: e.g one monitor will have my source, second threads and variables? The feature is in IntelliJ.
Yes. From the "Window" menu select "New Window". You can also drag the tabs off of the main window and a new window with just that tab will be created.
If you want a window with just the source code by itself, dragging the tab with the source in it won't work. What you can do is create the new window, drag the source over and minimize any other existing tabs within the new window to essentially leave a "source code only" view. You should be able to save this as a perspective and name it "Editor Only". This is somewhat cumbersome to setup, but once you have the perspective saved it should be pretty easy to get in and out of.
This is available in Helios and possibly earlier versions.
You can right-click on the title of any "View" and choose "Detach", this way you won't need two mail windows.

How can I take eclipse out of MDI mode?

Does anyone know of a way to make Eclipse an SDI application rather than an MDI one?
SDI - Single document interface, each pane is its own window
MDI - Multiple document interface, all of the panes are stuck inside one "master" window.
Eclipse is an MDI application. All of the little panes (like the call stack, variable viewer, etc) are part of the one master Eclipse window. Rather than having all of the windows stuck inside one master "eclipse" window, I'd like them to all be their own free-floating windows.
To make a pane "free-floatting" just drag that pane outside the main eclipse window.
If you have only one monitor, you have to resize first your eclipse window: you can not leave eclipse maximized on all the screen space.
Then you have to drag your pane outside the eclipse window until you see the cursor change into a little window with a '+' in the middle.
Once all your panes are in the required position, save your configuration in a new perspective. (Menu Window\Save Perspective As)
That way, you can switch between panes configurations easily.
Regarding the SDI aspect however, the editor part of eclipse is made to edit several document (so, MDI only).
Karl's double-click suggestion is the most effective to focus on one of those edited document.
Hit the little X next to each document until there is only one open.
Alternatively, doubleclick on the tab to maximize it.
Then edit your question to give some more information about what you really want to do.
No, Unfortuantly Eclipse 3.x and lower do not allow the editor window to be outside the application window. You can drag other windows outside the main window to give you more editor space, but you cannot for example drag an editor outside the main eclipse window onto a second monitor and to have another code window open on the main monitor. This feature seems to be scheduled for Eclipse 4. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=8886 for this feature.