Eclipse 在单独的窗口中打开代码
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26281285/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse open code in separate window
提问by Dramentiaras
I'm programming in eclipse, running on a two monitor setup. On one of the monitors I've only got the Project Explorer and Editor as a custom Perspective, and on the other one I got the other tools such as the console, debug, tasks, variables, breakpoints e.t.c.
我在 eclipse 中编程,在两个监视器设置上运行。在其中一个监视器上,我只有项目资源管理器和编辑器作为自定义透视图,而在另一个监视器上,我得到了其他工具,例如控制台、调试、任务、变量、断点等
When I click a task in the task view, for example, this will open the resource in which the //TODO comment is located. The only problem is that the resource is opened in the second monitor. How can I configure eclipse to always open resource files in the already existing editor, even if it's in another window?
例如,当我在任务视图中单击一个任务时,这将打开 //TODO 注释所在的资源。唯一的问题是资源是在第二个监视器中打开的。如何配置 eclipse 以始终在现有编辑器中打开资源文件,即使它在另一个窗口中?
回答by E-Riz
It sounds like you opened a second window (aka, Workbench) using Window> New Window. In that case, you actually have 2 separate workbenches and hence two separate editor areas. The views in one window only know about the views and editor area associated with that window.
听起来您使用Window> New Window打开了第二个窗口(又名 Workbench)。在这种情况下,您实际上有 2 个独立的工作台,因此有两个独立的编辑器区域。一个窗口中的视图只知道与该窗口关联的视图和编辑器区域。
To accomplish something close to what you seem to be looking for, I think the best (only?) option is to detach the views you want to be separated from your editor (eg, Console, Tasks, etc) and place them on the secondary monitor. It's not nearly as easy to manage as two separate windows each with a different Perspective, but it's the only way I know of to keep a single editor area.
为了完成与您似乎正在寻找的东西接近的事情,我认为最好的(唯一的?)选项是将您想要与编辑器分开的视图(例如,控制台、任务等)分离,并将它们放在次要的监视器。它不像管理两个单独的窗口那么容易,每个窗口都有不同的透视图,但这是我所知道的保持单个编辑器区域的唯一方法。
回答by Rüdiger Herrmann
Unfortunately this is not possible. Usually an editor is opened in the same workbench window as the view (or other workbench part) that triggered the editor opening.
不幸的是,这是不可能的。通常,编辑器在与触发编辑器打开的视图(或其他工作台部分)相同的工作台窗口中打开。