更改Eclipse侧边栏垂直范围突出显示 [英] Change Eclipse sidebar vertical scope highlighting
问题描述
在Windows 8上使用Eclipse之后,我刚刚安装了Ubuntu。唯一无法弄清楚如何修改的内容是当您在文件中的当前类或方法下工作时,垂直条的颜色。
I just installed Ubuntu after using Eclipse on Windows 8 for some time. The only thing I can't figure out how to modify is the color of the vertical bar when you're working under a current class or method in a file.
示例:在Windows中,默认是这个可爱的蓝色,如下所示:
Example: in Windows the default was this lovely blue as shown below:
但是在Ubuntu中,这是橙色的(如下所示),这分散了我的注意力:
But in Ubuntu this is orange in color (as shown below) which distracts me:
有什么想法可以解决这个问题?
不知道为什么颜色不同?我的Eclipse在Windows 8和Ubuntu 14.04都是开普勒4.3
Any idea on how I can fix this?
Not sure why the colors are different? My Eclipse on Windows 8 and Ubuntu 14.04 are both Kepler 4.3
推荐答案
这被称为范围指示器。你可以关闭范围指标。
This is called as Range indicator.You can switch off the range indicator.
点击 Windows>首
。导航至常规>编辑者>文本编辑器
。选择显示范围指标
选项。
Click Windows > Preferences
. Navigate to General > Editors > Text Editors
. De select Show Range indicator
option.
范围指示器的颜色由操作系统而不是eclipse控制。
Color of range indicator is controlled by OS not by eclipse.
- 安装
gtk-theme -config
工具从Ubuntu软件中心。更改突出显示背景颜色
。退出并再次登录。
- Install
gtk-theme-config
tool from Ubuntu software centre. Change theHighlight background color
. Logout and login again.
- 您还可以通过将dconf-editor安装为这里说/ a>
更改后:
请注意,这将会改变其他应用程序中的选择颜色也就像nautilus,Firefox等。
Note that this will change the selection colour in other applications also like nautilus, Firefox etc.
您的主目录中的某个位置,创建一个具有以下内容的gtkrc文件(如:〜/ .gtkrc-eclipse):
Somewhere on your home directory, create a gtkrc file (like: ~/.gtkrc-eclipse) with following content:
gtk-color-scheme = "selected_bg_color:#0AFC02\nselected_fg_color:#FFFFFF\norginal_selected_bg_color:#f07746\ntooltip_bg_color:#f5f5c5\ntooltip_fg_color:#000000"
style "range-indicator"
{
base[SELECTED] = @selected_bg_color
}
class "GtkWindow" style "range-indicator"
从命令行启动eclipse,如
Launch eclipse from command line like,
env GTK2_RC_FILES = / usr / share / themes /<您当前的主题> / gtk -2.0 / gtkrc:/ home /< user name> /。gtkrc-eclipse'
env GTK2_RC_FILES = / usr / share / themes / Ambiance / gtk-2.0 / gtkrc:/ home /chandrayya/.gtkrc-eclipse'/opt/eclipse-3.3/eclipse'
env GTK2_RC_FILES=/usr/share/themes/<Your current theme>/gtk-2.0/gtkrc:/home/<user name>/.gtkrc-eclipse '
env GTK2_RC_FILES=/usr/share/themes/Ambiance/gtk-2.0/gtkrc:/home/chandrayya/.gtkrc-eclipse '/opt/eclipse-3.3/eclipse'
您可以通过执行查找您当前的主题,
You can find out your current theme by executing,
gsettings get org.gnome.desktop.interface gtk-theme
gsettings get org.gnome.desktop.interface gtk-theme
请注意,编辑器中也会更改文本选择背景和前景颜色,我们无法避免。
这篇关于更改Eclipse侧边栏垂直范围突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!