Eclipse IDE 视图消失了 - 如何找回它

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9010334/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 20:52:09  来源:igfitidea点击:

Eclipse IDE view gone - how to get it back

eclipse

提问by Stephane Grenier

I basically have multiple monitors and did some changes today. As such, the views on one of my monitors (specifically the console view) is no longer there. I can't seem to find a way to get it back.

我基本上有多个显示器,今天做了一些更改。因此,我的其中一台显示器(特别是控制台视图)上的视图不再存在。我似乎无法找到恢复它的方法。

The console view appears in Window -> Open view, and this menu option moves focus from the other open views, but the console view does not appear on screen. This probably means it's positioned outside of the monitors...

控制台视图出现在 中Window -> Open view,此菜单选项将焦点从其他打开的视图移开,但控制台视图未出现在屏幕上。这可能意味着它位于显示器之外......

How can I get the view back?

我怎样才能恢复视图?

回答by 0xbadc0de

two option:

两种选择:

window -> New Window         //Opens with no editors, but preserves views layout
window -> reset perspective  //Keep editors, but resets layout view

If i understood your description correctly - you'll get what you want.

如果我正确理解了你的描述——你会得到你想要的。

回答by lapis

I managed to return my gone view without resetting the perspective!
I opened workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi, searched for "outline" there (the view was Outline) and found it (precisely org.eclipse.ui.views.ContentOutline) inside a childrentag which had an attribute visible="false". I removed that attribute and also <tags>Minimized</tags>inside the childrentag, saved the file, started Eclipse, and that was it, my view returned!

我设法在没有重置视角的情况下返回了我消失的视图!
我打开workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi,在那里搜索“大纲”(视图是大纲)并children在具有属性的标签中找到它(准确地说是 org.eclipse.ui.views.ContentOutline)visible="false"。我删除了那个属性,也在标签<tags>Minimized</tags>里面children,保存了文件,启动了 Eclipse,就是这样,我的视图返回了!

回答by cyber-monk

Use CTL+F7to cycle through the Eclipse Views, select one that is on the hidden detached view group, then press ALT+<space>, Mand use the keyboard arrows to position this window onto your active screen.

使用CTL+F7循环浏览 Eclipse 视图,选择隐藏的分离视图组中的一个,然后按下ALT+<space>, M并使用键盘箭头将此窗口定位到活动屏幕上。

回答by user79878

Slightly related... I just had a case where my editor disappeared and would not reappear. I could try to open files but not see them anywhere (the file would be successfully parsed by the "Outline" view). Simply resetting the perspective didn't work. Nor did Window -> New Editor. To fix I had to do this:

有点相关……我刚刚遇到了一个案例,我的编辑器消失了,不会再出现。我可以尝试打开文件,但在任何地方都看不到它们(文件将被“大纲”视图成功解析)。简单地重置视角是行不通的。Window -> New Editor 也没有。要修复我必须这样做:

  1. Window -> Close Perspective. (I actually did Close All Perspectives in a fit of rage)
  2. Window -> Open Perspective. (C/C++ in my case)
  3. Window -> Reset Perspective.
  1. 窗口 -> 关闭透视图。(实际上我一怒之下关闭了所有视角)
  2. 窗口 -> 打开透视图。(在我的情况下是 C/C++)
  3. 窗口 -> 重置透视。

BTW, I'm running Juno.

顺便说一句,我正在运行朱诺。

回答by Gilad

I solved this problem by removing the attribute toBeRendered="false"from the element with elementId="org.eclipse.e4.primaryDataStack"in the workbench.xmifile.

我通过移除属性解决了这个问题,toBeRendered="false"从元素elementId="org.eclipse.e4.primaryDataStack"workbench.xmi的文件。

回答by Dejan Jovanovi?

This has been one of the most annoying and long-lasting bugs in Eclipse for me. I still don't know why this happens, but my solution (similar to @cyber-monk) is the following:

对我来说,这是 Eclipse 中最烦人、最持久的错误之一。我仍然不知道为什么会发生这种情况,但我的解决方案(类似于@cyber-monk)如下:

  1. Open Window -> Show View -> Console (activates the console window, but it's still hidden).
  2. Alt-Space (activates the context menu).
  3. Select maximize (actually shows the console window).
  1. 打开窗口 -> 显示视图 -> 控制台(激活控制台窗口,但它仍处于隐藏状态)。
  2. Alt-Space(激活上下文菜单)。
  3. 选择最大化(实际上是显示控制台窗口)。

This works, since I have the console window open on the second screen as in the question. Not sure if this bug happens when console is not in a separate window.

这是有效的,因为我在第二个屏幕上打开了控制台窗口,如问题所示。不确定当控制台不在单独的窗口中时是否会发生此错误。

回答by Martin Ellis

If you're just missing a view, you can use the menu item: Window->Show View->Console. No need to reset the perspective.

如果您只是缺少一个视图,则可以使用菜单项:Window-> Show View-> Console。无需重新设置视角。

Alternatively, Ctrl-3 and type Console<enter>.

或者,Ctrl-3 并键入Console<enter>。

回答by Michael Scheper

This is a na?ve answer and may not be possible in every case, but it worked for me and turned out to be less hassle than I thought:

这是一个天真的答案,可能并非在所有情况下都可行,但它对我有用,结果证明比我想象的要麻烦:

I simply changed my OS's monitor setup to bring the windows back to within reach, dragged them back to the main screen, changed my monitor setup back to reality, and dragged the windows to my monitor's new position. Certainly easier than setting my perspective back up from scratch!

我只是改变了我的操作系统的监视器设置,使窗口回到触手可及的地方,将它们拖回主屏幕,将我的监视器设置改回现实,并将窗口拖到我的监视器的新位置。当然比从头开始设置我的观点更容易!

回答by Georg Sawtschuk

Tested under Windows 7 with "Console"-view

在 Windows 7 下使用“控制台”视图进行测试

Select in menu Window -> Show View -> Console

在菜单窗口 -> 显示视图 -> 控制台中选择

The main window becomes inactive and invisible Console-window is now active.

主窗口变为非活动状态,不可见的控制台窗口现在处于活动状态。

Now, press Alt+Space combination and somewhere on main Display appears small menu with window-controls.

现在,按 Alt+Space 组合键,主显示器上的某处会出现带有窗口控件的小菜单。

Select "Maximize" and the hidden window becomes maximized on main Display. Now just drag the view with mouse to the main eclipse window.

选择“最大化”,隐藏窗口在主显示器上最大化。现在只需用鼠标将视图拖到主 Eclipse 窗口即可。

回答by Wolfie

I did Window->Perspective->Reset Perspective on all of my Perspectives within Eclipse Mars, and it did the trick in restoring all of my views.

我在 Eclipse Mars 中的所有透视图上都执行了 Window->Perspective->Reset Perspective,它成功地恢复了我的所有视图。