删除 Eclipse Juno 中的“快速访问”条目

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

Remove "Quick Access" entry in Eclipse Juno

eclipseeclipse-cdt

提问by kyku

How do I remove the "Quick Access" text entry from Juno's CDT toolbar? I never use it and it consumes valuable space on my laptop screen.

如何从 Juno 的 CDT 工具栏中删除“快速访问”文本条目?我从不使用它,它占用了我笔记本电脑屏幕上的宝贵空间。

采纳答案by katsharp

This bug Make "Quick access" optional and hidden by defaultcovers it. It looks like it is not currently possible, I suggest you add your interest to the bug.

此错误使“快速访问”可选并默认隐藏。看起来目前不可能,我建议您将您的兴趣添加到该错误中。

回答by Per

I looked for an answer to this question because Quick Access took a full row in the toolbar. Instead of removing it (Which requires too much hacking for my taste), I just removed a few toolbar buttons that I didn't use anyway, and the Quick Access shifted up among the rest of the buttons taking only an acceptable amount of space.

我寻找这个问题的答案,因为快速访问在工具栏中占据了一整行。我没有删除它(这对我来说需要太多的黑客攻击),我只是删除了一些我无论如何都没有使用的工具栏按钮,并且快速访问在其余按钮之间向上移动,只占用了可接受的空间量。

There is really no need for that many buttons for any one perspective. They should fit unless your screen is tiny. Customise this in Window -> Customize Prespective...

对于任何一种观点,实际上都不需要那么多按钮。除非您的屏幕很小,否则它们应该适合。在窗口中自定义此-> 自定义预...

回答by b1nary.atr0phy

Here is a quick hack which doesn't require any plugin installation, instead you just need to add a few lines to your current layout's CSS file. Works perfectly for me in v4.2.2

这是一个不需要安装任何插件的快速技巧,您只需要在当前布局的 CSS 文件中添加几行即可。在 v4.2.2 中非常适合我

Navigate to <ECLIPSE_HOME>/plugins/org.eclipse.platform_<VERSION>/cssthen open up the CSS file of whichever layout you are using, e.g. mine was e4_default.css. Now append the following snippet to the file:

导航到<ECLIPSE_HOME>/plugins/org.eclipse.platform_<VERSION>/css然后打开您使用的任何布局的 CSS 文件,例如我的e4_default.css. 现在将以下代码段附加到文件中:

#SearchField {
   visibility:hidden;
}

Now just restart Eclipse and the box is gone.

现在只需重新启动 Eclipse,盒子就不见了。

*Edit

*Edit

It appears that the layout file e4_basestyle.cssis used universally, regardless of your current layout. Thus you should be able to add the above snippet to that file and this fix will be persistent, even if you change layouts.

e4_basestyle.css无论您当前的布局如何,布局文件似乎都被普遍使用。因此,您应该能够将上述代码段添加到该文件中,即使您更改布局,此修复程序也将是持久的。

回答by sag

In Luna this has been fixed.

在 Luna 中,这已得到修复。

You can just right click on Quick Access toolbar and click hide to hide it. Refer last few comments in https://bugs.eclipse.org/bugs/show_bug.cgi?id=362420

您可以右键单击快速访问工具栏,然后单击隐藏将其隐藏。请参阅https://bugs.eclipse.org/bugs/show_bug.cgi?id=362420 中的最后几条评论

回答by borisdiakur

Check out this plugin: https://github.com/atlanto/eclipse-4.x-filler#hide-quick-access-plug-in

看看这个插件:https: //github.com/atlanto/eclipse-4.x-filler#hide-quick-access-plug-in

Works with Eclipse Kepler release.

适用于 Eclipse Kepler 版本。

This plug-in adds a functionality to hide/show Quick Access textbox in the main toolbar.

Window ? Hide Quick Access

此插件添加了在主工具栏中隐藏/显示快速访问文本框的功能。

窗户 ?隐藏快速访问

回答by Aurelien

A solution inspired from : https://bugs.eclipse.org/bugs/show_bug.cgi?id=319991

灵感来自:https: //bugs.eclipse.org/bugs/show_bug.cgi?id=319991的解决方案

(With eclipse Juno 4.2) Just add this piece of code to your ApplicationWorkbenchWindowAdvisorclass and call the method from preWindowOpen().

(使用 eclipse Juno 4.2)只需将这段代码添加到您的ApplicationWorkbenchWindowAdvisor类中并从preWindowOpen().

private void hideQuickAccess() { 
        UIJob job = new UIJob("hide quick access") {
            @Override
            public IStatus runInUIThread(IProgressMonitor monitor) {
                IWorkbenchWindow window = PlatformUI.getWorkbench()
                        .getActiveWorkbenchWindow();
                if (window instanceof WorkbenchWindow) {
                    MTrimBar topTrim = ((WorkbenchWindow) window).getTopTrim();
                for (MTrimElement element : topTrim.getChildren()) {
                    if ("SearchField".equals(element.getElementId())) {                     
                        ((Control) element.getWidget()).dispose();
                        break;
                    }
                }
            }
            return Status.OK_STATUS;
        }
    };
    job.schedule();

It might not work unless changing the accessibility rule of the org.eclipse.e4.ui.model.workbench.source_0.10.1.v20120523-1955.jar. To change this option, go to the Java build Path menu, find the jar, expand it and the option will appear.

除非更改org.eclipse.e4.ui.model.workbench.source_0.10.1.v20120523-1955.jar. 要更改此选项,请转到 Java 构建路径菜单,找到该 jar,将其展开,该选项将出现。

NB: I'm not sure about the entailment of this last change, it could be 'not clean'.

注意:我不确定最后一次更改的含义,它可能“不干净”。

回答by muka90

Solution for Version: Oxygen Release (4.7.0):

版本解决方案:氧气释放(4.7.0):

  1. Save the icons you are constantly using by dragging them off the "Toolbar" e.g. left/right/under to the Editor.
  2. Then toggle: Window > Appearance > Hide/Show Toolbar Done. :)
  1. 将您经常使用的图标从“工具栏”(例如左/右/下方)拖到编辑器中,以保存它们。
  2. 然后切换:窗口>外观>隐藏/显示工具栏完成。:)

回答by Alex

Type "toggle toolbar" in the quick access window (yes, that very thing that annoys us) and it'll be gone. C.f.

在快速访问窗口中输入“切换工具栏”(是的,这正是让我们烦恼的东西),它就会消失。比照