我想在eclipse IDE中更改Dart-plugin编辑器默认外观的样式。例如,我想将注释的颜色从绿色(默认)更改为浅灰色。我怎样才能在Dart eclipse插件中实现这一点。我看到它是如何为Java,JavaScript等做的,但Dart没有。
答案 0 :(得分:1)
我找到了一种手动更改主题的方法(Dart插件没有任何选项可以自动更改它,并且不支持其他插件,如 Eclipse Color Theme )
根据您的操作系统,这些步骤可能会有所不同,但这在Linux上适用于我。
从Eclipse工作区目录中,转到.metadata/.plugins/org.eclipse.core.runtime/.settings
。有一个名为com.google.dart.tools.ui.prefs
的文件;用你喜欢的文本编辑器打开它。
就我而言,我想使用Dart编辑器中包含的“Dartboard”主题。我从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
这将更改您在Eclipse中打开的每个Dart源文件的外观。然后,您可以根据需要更改颜色。
这比眼睛刺痛和丑陋的紫色默认Eclipse主题更好......(在我看来)
答案 1 :(得分:0)
基于this issue我猜这可能现在不可能: - /