Eclipse:如何关闭多个窗口

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

Eclipse: How to close multiple windows

eclipse

提问by justinhj

Once you have a bunch (20+) source windows open in Eclipse is there way to close them with clicking all the close buttons on the tabs? It takes a long time and if you double click the middle button it maximises the window instead.

一旦你在 Eclipse 中打开了一堆(20+)个源窗口,有没有办法通过单击选项卡上的所有关闭按钮来关闭它们?这需要很长时间,如果您双击中间按钮,它会最大化窗口。

I guess worst case I'll learn to write a plugin that just closes them all, but ideally I want a little list box that I can easily close them in, like the buffer list in emacs or the window list in devstudio.

我想在最坏的情况下,我将学习编写一个仅关闭它们的插件,但理想情况下我想要一个可以轻松关闭它们的小列表框,例如 emacs 中的缓冲区列表或 devstudio 中的窗口列表。

回答by Kaleb Brasee

Right click one of the source tabs, then click "Close all". This is in Eclipse 3.4, don't know what version it was first available in.

右键单击源选项卡之一,然后单击“全部关闭”。这是在 Eclipse 3.4 中,不知道它最初是在哪个版本中可用的。

回答by Csaba_H

Beside the "Close All" functionality kbrasee mentioned you can work with a "buffer list" using Window / Navigation / Switch to Editor (or Ctrl+Shift+E). In this dialog you can select multiple editors for saving / closing.

除了 kbrasee 提到的“全部关闭”功能之外,您还可以使用“窗口”/“导航”/“切换到编辑器”(或 Ctrl+Shift+E)来处理“缓冲区列表”。在此对话框中,您可以选择多个编辑器进行保存/关闭。

回答by kyku

Maybe this is a little bit unrelated to your question but you can limit the number of open files by selecting "Window > Preferences > General > Editors > Number of opened editors before closing". If you set it to 8, opening the 9th file will close the file you visited most early.

也许这与您的问题有点无关,但您可以通过选择“窗口 > 首选项 > 常规 > 编辑器 > 关闭前打开的编辑器的数量”来限制打开文件的数量。如果设置为 8,则打开第 9 个文件将关闭您最早访问的文件。

回答by powtac

For a fast and selective solution you can click with the mouse wheel (yes!) into the middle of a tab you want to close. You don't have to target the close X.

要获得快速且有选择性的解决方案,您可以使用鼠标滚轮(是的!)单击要关闭的选项卡的中间。您不必瞄准接近的 X。

回答by profistart.com

To close all your open files in Eclipse, simply goto File-> Close all

要关闭 Eclipse 中所有打开的文件,只需转到File-> Close all

回答by Cfir TSabari

First if you use the right click mouse on the tabs you can choose either Close All or Close Others.
Second you can press Ctrl+Shift+Wto close all the opened tabs.

首先,如果您在选项卡上使用右键单击鼠标,您可以选择“全部关闭”或“关闭其他”。
其次,您可以按Ctrl+ Shift+W关闭所有打开的选项卡。

回答by darroosh

An addition to what mentioned by others,

除了其他人提到的,

If the undesired tabs are related to a project, you can right click the project name and choose close project, all its taps will be closed

如果不需要的选项卡与项目相关,您可以右键单击项目名称并选择关闭项目,其所有水龙头将被关闭