如何在 Eclipse 中更改当前行和文本选择的颜色(对于 Java)?

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

How to change the color of current line & text selection in eclipse (for Java)?

eclipse

提问by IttayD

I've tried looking in Java->Editor, General->Appearance->Colors And Fonts, General->Editors->Text Editors->Annotations, but couldn't find it

我试过在 Java->Editor、General->Appearance->Colors And Fonts、General->Editors->Text Editors->Annotations 中查找,但找不到

回答by Kambo_Rambo

The one you are after are probably in General -> Editors -> Text Editors ===> Then Appearance Color options -> Current line highlight & Selection background

您所追求的可能是 General -> Editors -> Text Editors ===> Then Appearance Color options -> Current line highlight & Selection background

回答by anand krish

Here you go : In Eclipse: go to Windows -> preference-> General -> Editors -> Text Editors -> Annotations -> Occurrences

在这里:在 Eclipse 中:转到 Windows -> 首选项 -> 常规 -> 编辑器 -> 文本编辑器 -> 注释 -> 出现次数

回答by nayakam

In Eclipse Helios : General->Editors->Text Editors : Appearance color options. I always use type filter box in preference widows to check settings.

在 Eclipse Helios 中:General->Editors->Text Editors:Appearance color options。我总是在偏好寡妇中使用类型过滤器框来检查设置。

回答by uma mahesh

Eclipse Neon: Preferences > General > Editors > Text Editors - Appearance Color Options / Selection Background Color

Eclipse Neon:首选项 > 常规 > 编辑器 > 文本编辑器 - 外观颜色选项/选择背景颜色

回答by Narendra Singh Parihar

To change the color of current selected line background, follow these steps Eclipse-- In Eclipse: go to Windows -> preference-> General -> Editors -> Text Editors ->Appearance color options ->Selection Background Color

要更改当前选定行背景的颜色,请按照以下步骤操作 Eclipse-- 在 Eclipse 中:转到 Windows -> 首选项 -> 常规 -> 编辑器 -> 文本编辑器 -> 外观颜色选项 -> 选择背景颜色

&&

&&

To change the color of current selected lines(TEXT), follow these steps Eclipse-- In Eclipse: go to Windows -> preference-> General -> Editors -> Text Editors ->Appearance color options ->Selection foreground Color

要更改当前选定行(文本)的颜色,请按照以下步骤操作 Eclipse-- 在 Eclipse 中:转到 Windows -> 首选项-> 常规 -> 编辑器 -> 文本编辑器 -> 外观颜色选项 -> 选择前景颜色

&&

&&

To change background color of eclipse In Eclipse: go to Windows -> preference-> General -> Editors -> Text Editors ->Appearance color options ->Background Color

在 Eclipse 中更改 Eclipse 的背景颜色:转到 Windows -> 首选项 -> 常规 -> 编辑器 -> 文本编辑器 -> 外观颜色选项 -> 背景颜色

回答by Gianluca Mereu

Instead of changing every color individually I solved launching eclipse with the parameter "--launcher.GTK_version 2" This solved the tooltips, the selected text and the selected items problems at once!

我没有单独更改每种颜色,而是使用参数“--launcher.GTK_version 2”解决了启动 eclipse 这一次解决了工具提示、所选文本和所选项目的问题!

It has been suggested here: https://stackoverflow.com/a/41482138/6465697

这里已经建议:https: //stackoverflow.com/a/41482138/6465697

回答by John Czukkermann

I had to spend an inordinate amount of time searching for an answer to this question. Here is a picture of the Preferences from the 2019-03 JavaEE bundle showing which selection is for changing the background color of text you have selected with your mousein the editor. This is totally different from the Occurrences that people keep pointing out.

我不得不花费过多的时间来寻找这个问题的答案。这是 2019-03 JavaEE 包中的首选项图片,显示了哪个选项用于更改在编辑器中用鼠标选择的文本背景颜色。这与人们不断指出的事件完全不同。

enter image description here

在此处输入图片说明