简体   繁体   English

如何更改Dart Eclipse插件编辑器的编辑器样式

[英]How to change the editor styles for Dart eclipse plugin editor

I would like to change the style for the default look of the Dart-plugin editor in eclipse IDE. 我想在Eclipse IDE中更改Dart插件编辑器的默认外观样式。 For example I would like to change the colour of comments from green (default) to pale gray. 例如,我想将注释的颜色从绿色(默认)更改为浅灰色。 How can I accomplish this in the Dart eclipse plugin. 如何在Dart eclipse插件中完成此操作。 I see how it is done for Java, JavaScript etc but none for Dart. 我看到Java,JavaScript等是如何完成的,但Dart没有。

I found a way to change the theme manually (the Dart plug-in doesn't have any option to change it automatically, and doesn't support other plug-ins like Eclipse Color Theme ). 我找到了一种手动更改主题的方法(Dart插件没有任何自动更改主题的选项,并且不支持Eclipse Color Theme等其他插件)。

Depending on your OS, these steps might be different, but this worked for me on Linux. 根据您的操作系统,这些步骤可能有所不同,但这在Linux上对我有用。

From your Eclipse workspace directory, go to .metadata/.plugins/org.eclipse.core.runtime/.settings . 从Eclipse工作区目录中,转到.metadata/.plugins/org.eclipse.core.runtime/.settings There is a file named com.google.dart.tools.ui.prefs ; 有一个名为com.google.dart.tools.ui.prefs的文件; open it with your preferred text editor. 用您喜欢的文本编辑器打开它。

In my case, I wanted to use the "Dartboard" theme included in Dart Editor. 就我而言,我想使用Dart编辑器中包含的“ Dartboard”主题。 I copy-pasted the following from the same file in the Dart Editor workspace directory (on my system, found in ~/.dartEditor/.metadata/.plugins/org.eclipse.core.runtime/.settings ) : 我从Dart编辑器工作空间目录(在我的系统上,位于~/.dartEditor/.metadata/.plugins/org.eclipse.core.runtime/.settings )的同一文件中复制粘贴了以下内容:

content_assist_completion_replacement_background=250,250,250
content_assist_completion_replacement_foreground=0,0,0
content_assist_parameters_background=250,250,250
content_assist_parameters_foreground=0,0,0
content_assist_proposals_background=250,250,250
content_assist_proposals_foreground=0,0,0
dart_bracket=96,96,96
dart_comment_task_tag=96,96,96
dart_default=0,0,0
dart_doc_default=96,96,96
dart_doc_keyword=96,96,96
dart_doc_link=96,96,96
dart_doc_tag=96,96,96
dart_keyword=0,0,0
dart_keyword_return=0,0,0
dart_multi_line_comment=96,96,96
dart_multiline_string=103,155,59
dart_operator=0,0,0
dart_single_line_comment=122,122,122
dart_string=103,155,59
glanceColorBackground=251,251,200
glanceSelectedColorBackground=182,214,253
pf_coloring_argument=0,0,0
pf_coloring_assignment=0,0,0
pf_coloring_comment=122,122,122
pf_coloring_key=0,0,0
pf_coloring_value=103,155,59
semanticHighlighting.annotation.color=0,0,0
semanticHighlighting.annotation.enabled=true
semanticHighlighting.builtin.bold=true
semanticHighlighting.builtin.color=0,0,0
semanticHighlighting.builtin.enabled=true
semanticHighlighting.class.color=6,70,167
semanticHighlighting.class.enabled=true
semanticHighlighting.constructor.color=6,70,167
semanticHighlighting.constructor.enabled=true
semanticHighlighting.deprecated.color=0,0,0
semanticHighlighting.deprecated.enabled=true
semanticHighlighting.directive.bold=true
semanticHighlighting.directive.color=1,77,100
semanticHighlighting.directive.enabled=true
semanticHighlighting.dynamicType.color=0,0,0
semanticHighlighting.dynamicType.enabled=true
semanticHighlighting.field.color=135,49,46
semanticHighlighting.field.enabled=true
semanticHighlighting.function.color=0,0,0
semanticHighlighting.function.enabled=true
semanticHighlighting.functionTypeAlias.color=6,70,167
semanticHighlighting.functionTypeAlias.enabled=true
semanticHighlighting.getterDeclaration.color=135,49,46
semanticHighlighting.getterDeclaration.enabled=true
semanticHighlighting.importPrefix.color=0,0,0
semanticHighlighting.importPrefix.enabled=true
semanticHighlighting.inheritedMethodInvocation.color=0,0,0
semanticHighlighting.inheritedMethodInvocation.enabled=true
semanticHighlighting.localVariable.color=0,0,0
semanticHighlighting.localVariable.enabled=true
semanticHighlighting.localVariableDeclaration.color=0,0,0
semanticHighlighting.localVariableDeclaration.enabled=true
semanticHighlighting.method.color=0,0,0
semanticHighlighting.method.enabled=true
semanticHighlighting.methodDeclarationName.bold=true
semanticHighlighting.methodDeclarationName.color=11,91,210
semanticHighlighting.methodDeclarationName.enabled=true
semanticHighlighting.number.color=0,0,0
semanticHighlighting.number.enabled=true
semanticHighlighting.parameterVariable.color=135,49,46
semanticHighlighting.parameterVariable.enabled=true
semanticHighlighting.setterDeclaration.color=135,49,46
semanticHighlighting.setterDeclaration.enabled=true
semanticHighlighting.staticField.color=135,49,46
semanticHighlighting.staticField.enabled=true
semanticHighlighting.staticFinalField.color=85,18,42
semanticHighlighting.staticFinalField.enabled=true
semanticHighlighting.staticMethod.color=0,0,0
semanticHighlighting.staticMethod.enabled=true
semanticHighlighting.staticMethodDeclarationName.bold=true
semanticHighlighting.staticMethodDeclarationName.color=11,91,210
semanticHighlighting.staticMethodDeclarationName.enabled=true
semanticHighlighting.typeArgument.color=3,49,120
semanticHighlighting.typeArgument.enabled=true
semanticHighlighting.typeParameter.color=3,49,120
semanticHighlighting.typeParameter.enabled=true
sourceHoverBackgroundColor=251,251,200

This will change the appearance of every Dart source file you open in Eclipse. 这将更改您在Eclipse中打开的每个Dart源文件的外观。 Then, you can change the colors as you wish. 然后,您可以根据需要更改颜色。

It's better than that eye-stinging and ugly purple default Eclipse theme... (in my opinion) 它比那种刺眼的,丑陋的紫色默认Eclipse主题要好...(在我看来)

基于这个问题,我猜测现在可能无法实现:-/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM