eclipse 如何在eclipse中更改搜索背景颜色
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10922934/
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
How to change search background color in eclipse
提问by C-TZ
I've been searching for about 40 minutes now and this is just so frustrating...
我已经搜索了大约 40 分钟,这真是令人沮丧......
The standard search result background color in eclipse is freaking white and black. Everytime I search something I have to scan the screen for like 50 seconds before I find the spot where Eclipse has found something. I don't know which goon set it this way but he must be working with the goon who programmed the interface for configuring the colors... I can't find it.
eclipse 中标准的搜索结果背景颜色是白色和黑色。每次我搜索某些东西时,我都必须扫描屏幕大约 50 秒,然后才能找到 Eclipse 找到某些东西的地方。我不知道是哪个傻瓜把它设置成这样,但他一定是在和那个对界面进行编程以配置颜色的傻瓜一起工作......我找不到它。
Where do I change the background color of search results?
在哪里更改搜索结果的背景颜色?
I feel ashamed to have to ask this here... but the things I've tried, like setting it in general>editors>text-editors>annotations didn't work.
我很惭愧不得不在这里问这个......但是我尝试过的事情,比如将它设置为一般>编辑器>文本编辑器>注释不起作用。
回答by bityz
In the Eclipse menu bar: Windows->Preferences->General->Editors->Text Editors->Annotations
在Eclipse菜单栏中:Windows->Preferences->General->Editors->Text Editors->Annotations
Then scroll down to "Search Results" and set the highlighted text color.
然后向下滚动到“搜索结果”并设置突出显示的文本颜色。
This works for Eclipse Helios and Eclipse Juno. I haven't tested other versions.
这适用于 Eclipse Helios 和 Eclipse Juno。我没有测试过其他版本。
回答by DevDaddyNick
This may not be true for all modes, but I'm using Eclipse with Flash Builder plugin on Mac, and it turned out I had to modify the current selection highlight:
这可能不适用于所有模式,但我在 Mac 上使用 Eclipse 和 Flash Builder 插件,结果我不得不修改当前的选择突出显示:
General -> Editors -> Text Editors -> Selection Background Color
常规 -> 编辑器 -> 文本编辑器 -> 选择背景颜色
回答by Laura
I am not sure I understand what you mean, but this might help, go to:
我不确定我是否理解您的意思,但这可能会有所帮助,请转到:
Eclipse -> Preferences -> General -> Search there is a line in the right that reads: "Foreground color for potential matches" and it has a box right next to it where you can change the colors. You can change the color of the search. Otherwise, you can also change the colors of what Eclipse highlights by going to:
Eclipse -> Preferences -> General -> Search 右侧有一行写着:“潜在匹配的前景色”,它旁边有一个框,您可以在其中更改颜色。您可以更改搜索的颜色。否则,您还可以通过以下方式更改 Eclipse 突出显示的颜色:
Eclipse -> Preferences -> General -> Appearance -> Colors and Fonts -> Match Highlight background color
and change the color there.
Eclipse -> Preferences -> General -> Appearance -> Colors and Fonts -> Match Highlight 背景颜色
并在那里更改颜色。
Hope this helps! You can also look at this webpage:
希望这可以帮助!你也可以看看这个网页:
回答by rezeli
You can change search background color like this: (works for Luna and previous versions)
您可以像这样更改搜索背景颜色:(适用于 Luna 和以前的版本)
In the Eclipse menu bar: Windows->Preferences->General->Editors->Text Editors->Annotations Then scroll down to "Search Results" and set the highlighted text color.
在 Eclipse 菜单栏中:Windows->Preferences->General->Editors->Text Editors->Annotations 然后向下滚动到“搜索结果”并设置突出显示的文本颜色。
回答by MasterHD
Also in the searchresults window (that lists all the findings in a tree), the background color is under a different setting: Windows->Preferences->General->Appearance->Colors and Fonts->Match highlighting background color
.
同样在搜索结果窗口(列出树中的所有发现)中,背景颜色处于不同的设置下:Windows->Preferences->General->Appearance->Colors and Fonts->Match highlighting background color
。
回答by dojo
Old question but I will add my findings. I'm using a MacBook Pro
Using Eclipse Mars.1, while I do a 'text' search (using Emacs). To set the search highlight (or background) color I do the following:
Preferences->General->Editors->Text Editors
see the Appearance color options
section. Highlight the Selection background color
and use the color palette to set your desired color.
It is somewhat frustrating as the only way I could get this to work is to restart Eclipse. After the restart I am happy.
老问题,但我会添加我的发现。我正在使用 Eclipse Mars.1 的 MacBook Pro,同时进行“文本”搜索(使用 Emacs)。要设置搜索突出显示(或背景)颜色,我执行以下操作:
Preferences->General->Editors->Text Editors
请参阅Appearance color options
部分。突出显示Selection background color
并使用调色板设置所需的颜色。这有点令人沮丧,因为我可以让它工作的唯一方法是重新启动 Eclipse。重新启动后我很高兴。
回答by John Lehmann
Same as @bityz's answer, except for me the annotation which mattered was "Occurrences". I tried this on Eclipse 4.3 Kepler.
与@bityz 的回答相同,除了我之外,重要的注释是“发生”。我在 Eclipse 4.3 Kepler 上试过这个。
回答by roj
If you mean (as I think you do) how do you change the highlight colour of strings that match what you select in an editor (e.g. you double-click on 'filename' and Eclipse highlights other references to 'filename' in a dull grey background), then the following post answers this: Eclipse: How do you change the highlight color of the currently selected method/expression?
如果您的意思是(正如我认为的那样),您如何更改与您在编辑器中选择的内容匹配的字符串的突出显示颜色(例如,您双击“文件名”,Eclipse 以暗灰色突出显示对“文件名”的其他引用)背景),那么下面的帖子回答了这个问题: Eclipse:你如何改变当前选择的方法/表达式的高亮颜色?
In a nutshell, you want: * General -> Editors -> Text Editors -> Annotations * Look for "Occurrences" in the Annotation types list and change it from grey to your favourite colour!
简而言之,您需要: * General -> Editors -> Text Editors -> Annotations * 在 Annotation types 列表中查找“Occurrences”并将其从灰色更改为您喜欢的颜色!
回答by Ogre Psalm33
I have also found, if you are looking at C++ code (at least in Eclipse Mars 2), changing the following option will set the highlight color of all occurrences of your current (or most recent) search, in case this is what you are looking for:
我还发现,如果您正在查看 C++ 代码(至少在 Eclipse Mars 2 中),更改以下选项将设置当前(或最近)搜索的所有出现的突出显示颜色,以防万一寻找:
General->Editors->Text Editors->Annotations->C/C++ Occurrences
General->Editors->Text Editors->Annotations->C/C++ Occurrences
Why oh why this is not in the C++ preferences pane I will never know.
为什么哦,为什么这不在 C++ 首选项窗格中,我永远不会知道。
回答by Prabuddha
To highlight the matching keywords in Juno
在 Juno 中突出显示匹配的关键字
Windows->Preferences->General->Text Editor-.Annotations-> in Annotation Types box, look for Write Occurrences. Change the color there.
Windows->Preferences->General->Text Editor-.Annotations-> 在 Annotation Types 框中,查找 Write Occurrences。改变那里的颜色。