Search code examples
javaeclipsemultiple-monitors

eclipse: how to get the "link with editor" to work between windows?


I use multiple monitors. I have two eclipse windows, one on each of my primary monitors, full screen:
right monitor views: code editors, outline, package explorer, task list
left monitor views: console, declaration, javadoc, etc
The second window is created by eclipse menu Window >> New Window.

The "link with editor" feature works perfectly on all views within the same window, but I've found no way to make them work across windows.
Works perfectly means when clicking or resting the editor caret on a member function in the code the javadoc and declaration code pops up in their respective views. But not when the editor and info views are in different windows.

The mylyn tasks focus works great across both windows, and it would be very nice if I can get the "link with editor" to work as well.


Solution

  • The two windows are separate from each other and there is very little linking between them; this is by design, how the New Window feature is intended to work (see this answer to a similar question). Those two Workbench windows do no share state with each other (although as you've noted, Mylyn context does cross over; that's because Mylyn is driving the UI across the entire workspace, it's not specific to a particular Workbench).

    What you can do instead is use only a single Workbench Window (don't use New Window) but detach the views you want on your second monitor. This should serve your needs as long as you don't want to have an editor area on both monitors - there is only a single editor area for a workbench window, so having 2 editor areas means having two Workbenches.