适用于 Java 的 Eclipse IDE - 全黑主题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5053834/
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
Eclipse IDE for Java - Full Dark Theme
提问by Alireza Noori
Is there any way to completely turn Eclipse to a dark IDE? Here's a Pictureof what I'm asking:
有什么办法可以将 Eclipse 完全变成一个黑暗的 IDE?这是我要问的图片:
I don't mind doing 1 hour of work to do something like this :D
我不介意做 1 小时的工作来做这样的事情:D
EDIT:
编辑:
As Konstantin Komissarchik said, I had to modify my OS colors. This is possible by adding a custom Visual Style to the Windows. With the aid of a Custom Themeand a Custom Visual Style for Windows 7(Which I have changed a little bit), my Eclipse looks like the picture below:
正如 Konstantin Komissarchik 所说,我不得不修改我的操作系统颜色。这可以通过向 Windows 添加自定义视觉样式来实现。借助Windows 7的自定义主题和自定义视觉样式(我对其进行了一些更改),我的 Eclipse 如下图所示:
Update 2019:
2019 年更新:
The latest versions of Eclipse now come with a dark theme. Just go to General -> Appearance -> Theme
and select "Dark" or another appropriate version based on your operating system.
最新版本的 Eclipse 现在带有深色主题。只需转到General -> Appearance -> Theme
并根据您的操作系统选择“Dark”或其他合适的版本。
Of course you can still enable dark visual styles to your Windows or change your theme on other operating systems but the default dark theme is good enough for the most part.
当然,您仍然可以为 Windows 启用深色视觉样式或在其他操作系统上更改主题,但默认的深色主题在大多数情况下已经足够了。
采纳答案by coding4fun
Moonrise is the best dark theme I have ever seen for Eclipse!
Just follow the steps on the website and Enjoy!
Moonrise 是我见过的最好的 Eclipse 黑暗主题!
只需按照网站上的步骤即可享受!
https://github.com/guari/eclipse-ui-theme
https://github.com/guari/eclipse-ui-theme
回答by VonC
Update August 2016:
2016 年 8 月更新:
Tejas Padliyaadds in the comments:
Dark theme works well with Eclipse 4.5 onward with Windows 10.
No more black text on black background
深色主题适用于 Eclipse 4.5 及更高版本的 Windows 10。
黑色背景上不再有黑色文本
Update June 2014:
2014 年 6 月更新:
As mentioned din "Dark Theme, Top Eclipse Luna Feature #5", Eclipse 4.4 (Luna)has a dark theme included in it (see informatik01's comment):
正如在“黑暗主题,顶级 Eclipse Luna 功能 #5”中提到的,Eclipse 4.4 (Luna)包含一个黑暗主题(请参阅informatik01的评论):
When Eclipse 3.0 shipped in 2004 it brought a new look to the workbench. Now, 10 years later, an entirely new Dark Theme is launching.
The theme extends to more than just the Widgets. Syntax highlighting has also been improved to take advantage of the new look.
当 Eclipse 3.0 于 2004 年发布时,它为工作台带来了新的面貌。现在,10 年后,一个全新的黑暗主题正在推出。
主题扩展到不仅仅是小部件。语法突出显示也得到了改进,以利用新外观。
The What's new pagementions:
将有什么新页提到:
A new dark window theme has been introduced. This popular community theme demonstrates the power of the underlying Eclipse 4 styling engine.
You can enable it from theGeneral > Appearance
preference page.
Plug-ins can contribute extensions to this theme to style their own specific views and editors to match the window theme.
引入了新的暗窗主题。这个流行的社区主题展示了底层 Eclipse 4 样式引擎的强大功能。
您可以从General > Appearance
首选项页面启用它。
插件可以为此主题提供扩展,以设置它们自己的特定视图和编辑器的样式以匹配窗口主题。
Update April 2013:
2013 年 4 月更新:
It seems the solution below don't work well with Eclipse Juno 4.2 and Windows 8, according to Lennartin the comments.
根据Lennart在评论中的说法,似乎下面的解决方案不适用于 Eclipse Juno 4.2 和 Windows 8 。
One solution which (mostly) work is the Eclipse Chrome Theme(compatible Juno 4.2 and even Kepler 4.3), from the GitHub project eclipse-themes, by Jeeeyul Lee.
一种(大部分)有效的解决方案是Eclipse Chrome 主题(兼容 Juno 4.2 甚至 Kepler 4.3),来自 GitHub 项目eclipse-themes,作者是Jeeeyul Lee。
This postmentions:
这篇文章提到:
The first is to change the appearance of what is inside the editor windows.
That can be done with the Eclipse Colour Theme plugin (http://eclipsecolorthemes.org/). My favourite editor theme is Vibrant Ink with the Monaco font. They explain how to install their themes very well (http://eclipsecolorthemes.org/?view=how-to-use), although you get a fine set of dark themes with the default plugin install and may not need to come back to their website for any more. Get the plugin here.The second stage is darkening the chrome of the UI, which is all the widgets and menus and everything outside of the child window canvases.
This plugin gives you a GUI editor for the chrome colour scheme: https://github.com/jeeeyul/eclipse-themes/.
If you want a dark one, go ahead and click away until eclipse is dark.Once you are done, some GUI surface area will show through the system theme as mentioned at the top of this post.
Rather than using that editor, you could install the pre-baked Dark Juno theme instead.
The install is manual.
Start by downloading it from here: https://github.com/eclipse-color-theme/eclipse-ui-themes.
It has to be copied into your eclipse dropins folder. This lives next to the eclipse executable, not in your workspace or someplace like that. In my case the command to do the copy was:
第一个是更改编辑器窗口内的外观。
这可以通过 Eclipse Color Theme 插件 ( http://eclipsecolorthemes.org/) 来完成。我最喜欢的编辑器主题是带有 Monaco 字体的 Vibrant Ink。他们很好地解释了如何安装他们的主题(http://eclipsecolorthemes.org/?view=how-to-use),尽管您通过默认插件安装获得了一组精美的深色主题,并且可能不需要回到他们的网站。在这里获取插件。第二阶段是使 UI 的 chrome 变暗,这是所有小部件和菜单以及子窗口画布之外的所有内容。
这个插件为你提供了一个 chrome 配色方案的 GUI 编辑器:https: //github.com/jeeeyul/eclipse-themes/。
如果你想要一个黑暗的,继续点击直到日食变暗。完成后,一些 GUI 表面区域将通过系统主题显示,如本文顶部所述。
您可以安装预烘焙的 Dark Juno 主题,而不是使用该编辑器。
安装是手动的。
首先从这里下载它:https: //github.com/eclipse-color-theme/eclipse-ui-themes。
它必须被复制到你的 eclipse dropins 文件夹中。它位于 eclipse 可执行文件旁边,而不是在您的工作区或类似的地方。在我的情况下,执行复制的命令是:
cp ./plugins/com.github.eclipsecolortheme.themes_1.0.0.201207121019.jar /usr/lib/eclipse/dropins/
You could be running eclipse from any directory though, so which eclipse will tell you where it should go.
Restart eclipse and you should find a Dark Juno option underPreferences::General::Appearance
. It is a nice neutral grey with some gradients and is a very good option.
不过,您可以从任何目录运行 eclipse,因此哪个 eclipse 会告诉您它应该去哪里。
重新启动 eclipse,您应该会在 下找到一个 Dark Juno 选项Preferences::General::Appearance
。这是一种很好的中性灰色,带有一些渐变,是一个非常好的选择。
~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
Update December 2012 (20 months later):
2012 年 12 月更新(20 个月后):
The blog post "Jin Mingjian: Eclipse Darker Theme" mentions this GitHub repo "eclipse themes - darker":
博客文章“金明鉴:Eclipse Darker Theme”提到了这个GitHub repo“ eclipse主题-darker”:
The big fun is that, the codes are minimized by using Eclipse4 platform technologies like dependency injection.
It proves that again, the concise codes and advanced features could be achieved by contributing or extending with the external form(like library, framework).
New language is not necessary just for this kind of purpose.
最大的乐趣在于,通过使用依赖注入等 Eclipse4 平台技术,代码被最小化。
再次证明,通过贡献或扩展外部形式(如库、框架)可以实现简洁的代码和高级功能。
仅仅为了这种目的,新语言并不是必需的。
Update July 2012 (15 months later):
2012 年 7 月更新(15 个月后):
I have seen one! (Ie, a fully dark theme for Eclipse), as reported by Lars Vogelin "Eclipse 4 is beautiful – Create your own Eclipse 4 theme":
我见过一个!(即 Eclipse 的完全黑暗主题),正如Lars Vogel在“ Eclipse 4 is beautiful – Create your own Eclipse 4 theme”中所报道的:
If you want to play with it, you only need to write a plug-in, create a CSS file and use the
org.eclipse.e4.ui.css.swt.theme
extension point to point to your file.
If you export your plug-in, place it in the “dropins” folder of your Eclipse installation and your styling is available.
如果你想玩它,你只需要写一个插件,创建一个CSS文件并使用
org.eclipse.e4.ui.css.swt.theme
扩展点指向你的文件。
如果您导出插件,请将其放在 Eclipse 安装的“dropins”文件夹中,您的样式就可用了。
pixeldudementions in the comments having publish "Dark Juno" on GitHub!
pixeldude在 GitHub 上发布了“Dark Juno”的评论中提到!
Komododavementionsthat you don't always need a plugin: see "Ubuntu + Eclipse 4.2 - Dark theme - How to darken sidebar backgrounds?" for an example, based on gtkrc resource.
Komododave提到您并不总是需要插件:参见“ Ubuntu + Eclipse 4.2 - 黑暗主题 - 如何使侧边栏背景变暗?”作为示例,基于 gtkrc 资源。
Original answer: March 2011
原答案:2011 年 3 月
Note that a full dark theme will be possible with e4.
(see dynamic css with e4or A week at e4 – Themeing in e4):
请注意,e4 可以实现完全黑暗的主题。
(参见带有 e4 的动态 css或e4的一周 – 在 e4 中的主题):
In the meantime, only for editors though (which isn't what you want but still merit to be mentioned):
同时,仅适用于编辑器(这不是您想要的,但仍然值得提及):
"Fresh up your Eclipse with super-awesome color themes!"
“用超级棒的颜色主题让你的 Eclipse 焕然一新!”
回答by guari
UPDATE 2: A fork of this plugin has been merged with the main Eclipse Platform. You should find it pre-installed in the future Eclipse releases ;)
更新 2:此插件的一个分支已与主 Eclipse 平台合并。您应该会发现它已在未来的 Eclipse 版本中预先安装;)
UPDATE: I released a new version, it's a little bit darker, now pretty everything that can be currently modified has been aligned to the theme colors. Have fun!
更新:我发布了一个新版本,它有点暗,现在可以修改的所有内容都与主题颜色对齐。玩得开心!
Here is a screenshot:
这是一个屏幕截图:
if you may like, I uploaded on github a dark theme I made some months ago to avoid blinding my eyes when spending many hours on the editor.. I made it because with all the others themes some Eclipse parts remains ugly and unstyled.
如果你愿意,我在 github 上上传了一个我几个月前制作的黑暗主题,以避免在编辑器上花费大量时间时使我的眼睛失明。
You can find it here: http://guari.github.io/eclipse-ui-theme/
你可以在这里找到它:http: //guari.github.io/eclipse-ui-theme/
With my Eclipse configurations works quite ok, if you'll find some elements that remains unstyled you can submit an issue or suggest a change and I'll try to correct it if it's possible ;) (remind that currently, CSS styling support in Eclipse it's uncomplete and sometimes buggy..)
使用我的 Eclipse 配置可以正常工作,如果您发现一些元素仍然没有样式,您可以提交问题或建议更改,如果可能,我会尝试更正它;)(请注意,目前,Eclipse 中的 CSS 样式支持它不完整,有时还有错误..)
回答by Marcin Tomiak
There is a completely new, free plugin which is really DARK, supports Retina and has beautiful icons.
有一个全新的免费插件,它真的很暗,支持 Retina 并且有漂亮的图标。
What is most important: It doesn't suck on WINDOWS! It doesn't have white scrollbars and other artifacts. It's really dark.
最重要的是:它在WINDOWS上并不糟糕!它没有白色滚动条和其他工件。真的很黑
You'll find it there: https://marketplace.eclipse.org/content/darkest-dark-theme
你会在那里找到它:https: //marketplace.eclipse.org/content/darkest-dark-theme
This is how it looks like on Windows 10 with Retina screen:
这是在带有 Retina 屏幕的 Windows 10 上的样子:
回答by mondjunge
Here is my Black Eclipse Custom CSS for Chrome Theme Plugin. Usable with eclipse 4.2 and 4.3. Main goal was to make it look nice in ubuntu, besides making it "darker".
这是我的 Chrome 主题插件的 Black Eclipse 自定义 CSS。可用于 Eclipse 4.2 和 4.3。主要目标是让它在 ubuntu 中看起来不错,除了让它“更暗”。
Caution: May or may not work on Windows Systems, only checked with ubuntu.
注意:在 Windows 系统上可能工作也可能不工作,只能用 ubuntu 检查。
Required: Chrome Theme and Color Theme plugin
必需:Chrome 主题和颜色主题插件
Install those mentioned plugins. They can be found in the eclipse marketplace.
Install my variant of Gedit Oblivion Theme in Color Theme and activate it. (http://eclipsecolorthemes.org/?view=theme&id=12544)
Insert the custom css in css editor of Chrome Theme. I spend several hours with CSS Spy to find out all the relevant information to make eclipse as black and this file as small as possible. There is also an .epf File for the Chrome Theme plugin preferences you should import. You can get it from my dropbox: https://www.dropbox.com/sh/ye5tosl3cjhx96d/yL-_Y5j1PE
安装那些提到的插件。它们可以在日食市场中找到。
在颜色主题中安装我的 Gedit Oblivion 主题变体并激活它。( http://eclipsecolorthemes.org/?view=theme&id=12544)
在 Chrome 主题的 css 编辑器中插入自定义 css。我花了几个小时使用 CSS Spy 找出所有相关信息,以使 eclipse 变黑并使这个文件尽可能小。还有一个 .epf 文件用于您应该导入的 Chrome 主题插件首选项。您可以从我的保管箱中获取:https: //www.dropbox.com/sh/ye5tosl3cjhx96d/yL-_Y5j1PE
In the end your eclipse will look like this:
最后,您的日食将如下所示:
Have Fun!
玩得开心!
回答by javaPlease42
- Help → Install New Software.
- Enter Eclipse Color Theme Plugin URL: http://eclipse-color-theme.github.com/update
- Install Eclipse Color Theme Plugin.
- Restart Eclipse.
- Goto Window → Preferences → General → Appearance → Color Theme
- I like the Havenjark default Color Theme. Eclipse Color Theme Plugin comes loaded with 24 default Color Themes and option to Import a theme.
- 帮助 → 安装新软件。
- 输入 Eclipse 颜色主题插件 URL:http: //eclipse-color-theme.github.com/update
- 安装 Eclipse 颜色主题插件。
- 重新启动 Eclipse。
- 转到窗口 → 首选项 → 常规 → 外观 → 颜色主题
- 我喜欢 Havenjark 默认的颜色主题。Eclipse 颜色主题插件加载了 24 个默认颜色主题和导入主题的选项。
回答by Konstantin Komissarchik
Eclipse uses native OS controls for most UI aspects (buttons, menus, lists, etc.). That's where colors for most of the IDE come from. The first step in making a "dark IDE" is to modify your OS color theme. Then you can add the color themes plugin to complete the look.
Eclipse 对大多数 UI 方面(按钮、菜单、列表等)使用本机操作系统控件。这就是大多数 IDE 的颜色来源。制作“深色 IDE”的第一步是修改您的操作系统颜色主题。然后你可以添加颜色主题插件来完成外观。
回答by Mahdi Rashidi
Install a newer version of Eclipse, (Luna Release (4.4.0)or more recent), it include a great Dark theme by default.
安装较新版本的 Eclipse(Luna Release (4.4.0)或更新版本),它默认包含一个很棒的 Dark 主题。
Here is a screenshot :
这是一个屏幕截图:
回答by hash
Its Simple.just Download this file DarkJuno Theme.Then Extract the rar file and copy com.github.eclipsecolortheme.themes_1.0.0.201207121019.jar
file to /yourEclipsHome/dropins
.
它的简单。只需下载此文件DarkJuno 主题。然后解压缩 rar 文件并将com.github.eclipsecolortheme.themes_1.0.0.201207121019.jar
文件复制到/yourEclipsHome/dropins
.
Then restart Eclips and go to window/preference/General/Appearance
.In there choose Dark Juno
theme on Dropdown. Thats it. Restart Your Eclips.
然后重新启动 Eclips 并转到window/preference/General/Appearance
。Dark Juno
在下拉菜单中选择主题。就是这样。重启你的 Eclips。
For More Info watch this video tutorial
有关更多信息,请观看此视频教程
回答by san1deep2set3hi
If the purpose of a dark theme is to make your eyes comfortable, you can enable High Contrast settings of your Operating System. For example in Windows 8.1 you can turn on - off High Contrast by pressing ALT+ left SHIFT+ PRINT SCREEN
如果黑暗主题的目的是让您的眼睛舒适,您可以启用操作系统的高对比度设置。例如,在 Windows 8.1 中,您可以通过按ALT+ left SHIFT+打开 - 关闭高对比度PRINT SCREEN
This will make entire OS in dark mode, not only eclipse. Below is a sample screenshot of Eclipse with High Contrast enabled
这将使整个操作系统处于黑暗模式,而不仅仅是 eclipse。下面是启用高对比度的 Eclipse 的示例屏幕截图