【问题标题】:Eclipse Rulers background colorEclipse 标尺背景颜色
【发布时间】:2012-07-11 14:29:21
【问题描述】:
  1. 如何更改 Eclipse 垂直标尺背景颜色?
  2. 包含折叠圆圈的标尺/列的名称是什么?
  3. 如何更改上述标尺/clomun 的背景颜色?

【问题讨论】:

    标签: eclipse


    【解决方案1】:
    what is name of the ruler/column that includes the folding circles?
    

    称为代码折叠边距,或简称折叠边距。

    How can I change eclipse Vertical Ruler background color?
    How can I change the background color of the above ruler/clomun?
    

    恐怕 Eclipse 有许多不可自定义的 UI 设置,这两个就是其中之一。已提出功能请求以允许更改代码折叠边距。 Background color for code folding 鉴于该请求已经存在超过 5 年,我不太乐观你会得到解决方案。您可以对这个问题发表评论以提高它。

    您也可以在他们的 bugtracker 页面上提出功能请求。 https://bugs.eclipse.org/bugs/

    【讨论】:

      【解决方案2】:

      通常我使用 Eclipse 提供的默认设置来使用我的颜色,但我知道很多人喜欢 Eclipse 的替代外观(通常使用深色主题),所以我决定试一试...

      要更改默认颜色,您必须在窗口 > 首选项菜单中查看一些地方:

      General > Editors > Text Editors (to set the background color / selection color, etc. for all editors)
      
      General > Editors > Text Editors > Annotations (to set the colors for the occurrences highlight, tasks, etc.)
      
      Pydev > Editor (to set the pydev editor-related colors)
      
      General > Appearance > Colors an Fonts (to set what's not available in the other places)
      

      现在,在您正确设置了这些颜色之后,您真正应该做的一件事是导出您刚刚更改的首选项,以便以后导入它们。

      为此,请转到文件 > 导出 > 首选项并将所有首选项导出到一个文件,然后打开该文件并删除所有与颜色无关的首选项(除了 file_export_version,Eclipse 在导入时需要它) - 请注意,您也可以保留您一直输入的其他首选项,并且使用干净的 Eclipse 安装可能会更容易,只需使用您想要配置的内容(这样您在该首选项文件中就没有太多首选项)。

      稍后,您可以通过 File > Import > Preferences 在 Eclipse 中导入这些首选项。

      我使用的深色主题的首选项给出了以下结果(请注意,您可能必须重新启动 Eclipse 以使左侧标尺看起来正确):

      【讨论】:

        【解决方案3】:

        您只能使用首选项 -> 常规 -> 编辑器 -> 文本编辑器 -> 注释来配置垂直标尺中显示的内容。你不能禁用它。希望这会有所帮助!

        【讨论】:

          【解决方案4】:

          这不是一个彻底的答案,但这是我在调试时提取的 SWT 间谍日志:

          AnnotationRulerColumn$5 {}@140230138540928
            Style: NO_FOCUS | LEFT_TO_RIGHT | DOUBLE_BUFFERED 
            Layout Data: null
            Bounds: Rectangle {44, 0, 9, 206}
          
          Children:
          
          Peers:
            *AnnotationRulerColumn$5 {}@140230138540928 Layout Data: null Bounds: Rectangle {44, 0, 9, 206}
            AnnotationRulerColumn$5 {}@140230141853568 Layout Data: null Bounds: Rectangle {0, 0, 12, 206}
            LineNumberRulerColumn$4 {}@140230140489248 Layout Data: null Bounds: Rectangle {12, 0, 32, 206}
          
          Parent Tree:
          [CUT]
          
                                                                 Canvas {}@139916372127008
                                                                   Style: LEFT_TO_RIGHT | DOUBLE_BUFFERED 
                                                                   Bounds: Rectangle {0, 0, 954, 276}
                                                                   Layout: org.eclipse.jface.text.source.SourceViewer$RulerLayout@4a767290
                                                                   LayoutData: null
                                                                  CompositeRuler$CompositeRulerCanvas {}@139916355542160
                                                                       Style: LEFT_TO_RIGHT | DOUBLE_BUFFERED 
                                                                       Bounds: Rectangle {0, 0, 29, 258}
                                                                       Layout: org.eclipse.jface.text.source.CompositeRuler$RulerLayout@76b6b86f
                                                                       LayoutData: null
          

          ``

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2010-09-16
            • 1970-01-01
            • 2016-03-27
            • 2013-07-04
            • 1970-01-01
            • 2013-07-02
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多