mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
Bug 367403 - [preferences] C/C++ editor does not respect high contrast settings
This commit is contained in:
parent
cfb47f9a65
commit
adc46fe221
11 changed files with 1100 additions and 379 deletions
|
@ -577,6 +577,258 @@
|
||||||
label="%Dummy.label"
|
label="%Dummy.label"
|
||||||
value="240, 216, 168">
|
value="240, 216, 168">
|
||||||
</colorDefinition>
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.c_multi_line_comment"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="63, 127, 95">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.c_single_line_comment"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="63, 127, 95">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.c_keyword"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="127, 0, 85">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.c_type"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="127, 0, 85">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.c_string"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="42, 0, 255">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.c_operators"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.c_braces"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.c_numbers"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.c_default"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.pp_directive"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="127, 0, 85">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.pp_directive"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="127, 0, 85">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.pp_default"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.pp_header"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="42, 0, 255">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.asm_directive"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="127, 0, 85">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.asm_label"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="127, 0, 85">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.c_comment_task_tag"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="127, 159, 191">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.internal.ui.text.doctools.doxygen.multi"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="63, 95, 191">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.internal.ui.text.doctools.doxygen.single"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="63, 95, 191">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.internal.ui.text.doctools.doxygen.recognizedTag"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="127, 159, 191">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.staticFieldHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 192">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.fieldHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 192">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.methodDeclarationHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.staticMethodHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.functionDeclarationHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.functionHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.localVariableDeclarationHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="128, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.localVariableHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.globalVariableHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.parameterVariableHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.templateParameterHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="100, 70, 50">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.methodHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.classHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 80, 50">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.enumHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="100, 70, 50">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.macroSubstitutionHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.macroDefinitionHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.typedefHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 80, 50">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.namespaceHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.labelHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.enumeratorHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="0, 0, 192">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.problemHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="224, 0, 0">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.externalSDKHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="100, 40, 128">
|
||||||
|
</colorDefinition>
|
||||||
|
<colorDefinition
|
||||||
|
id="org.eclipse.cdt.ui.overloadedOperatorHighlighting"
|
||||||
|
isEditable="false"
|
||||||
|
label="%Dummy.label"
|
||||||
|
value="200, 100, 0">
|
||||||
|
</colorDefinition>
|
||||||
<theme
|
<theme
|
||||||
id="org.eclipse.ui.ide.systemDefault">
|
id="org.eclipse.ui.ide.systemDefault">
|
||||||
<colorOverride
|
<colorOverride
|
||||||
|
@ -595,6 +847,170 @@
|
||||||
id="org.eclipse.cdt.ui.content_assist_parameters_foreground"
|
id="org.eclipse.cdt.ui.content_assist_parameters_foreground"
|
||||||
value="COLOR_LIST_FOREGROUND">
|
value="COLOR_LIST_FOREGROUND">
|
||||||
</colorOverride>
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.c_multi_line_comment"
|
||||||
|
value="COLOR_LIST_SELECTION">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.c_single_line_comment"
|
||||||
|
value="COLOR_LIST_SELECTION">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.c_keyword"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.c_type"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.c_string"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.c_operators"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.c_braces"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.c_numbers"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.c_default"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.pp_directive"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.pp_default"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.pp_header"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.asm_directive"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.asm_label"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.c_comment_task_tag"
|
||||||
|
value="COLOR_WIDGET_NORMAL_SHADOW">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.internal.ui.text.doctools.doxygen.multi"
|
||||||
|
value="COLOR_LIST_SELECTION">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.internal.ui.text.doctools.doxygen.single"
|
||||||
|
value="COLOR_LIST_SELECTION">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.internal.ui.text.doctools.doxygen.recognizedTag"
|
||||||
|
value="COLOR_WIDGET_NORMAL_SHADOW">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.staticFieldHighlighting"
|
||||||
|
value="COLOR_LIST_SELECTION">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.fieldHighlighting"
|
||||||
|
value="COLOR_LIST_SELECTION">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.methodDeclarationHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.staticMethodHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.functionDeclarationHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.functionHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.localVariableDeclarationHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.localVariableHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.globalVariableHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.parameterVariableHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.templateParameterHighlighting"
|
||||||
|
value="COLOR_WIDGET_DARK_SHADOW">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.methodHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.classHighlighting"
|
||||||
|
value="COLOR_WIDGET_DARK_SHADOW">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.enumHighlighting"
|
||||||
|
value="COLOR_WIDGET_DARK_SHADOW">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.macroSubstitutionHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.macroDefinitionHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.typedefHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.namespaceHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.labelHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.enumeratorHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.problemHighlighting"
|
||||||
|
value="COLOR_WIDGET_DARK_SHADOW">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.externalSDKHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
|
<colorOverride
|
||||||
|
id="org.eclipse.cdt.ui.overloadedOperatorHighlighting"
|
||||||
|
value="COLOR_LIST_FOREGROUND">
|
||||||
|
</colorOverride>
|
||||||
</theme>
|
</theme>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
|
@ -2946,10 +3362,6 @@
|
||||||
point="org.eclipse.core.runtime.preferences">
|
point="org.eclipse.core.runtime.preferences">
|
||||||
<initializer class="org.eclipse.cdt.ui.CUIPreferenceInitializer"/>
|
<initializer class="org.eclipse.cdt.ui.CUIPreferenceInitializer"/>
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
|
||||||
point="org.eclipse.core.runtime.preferences">
|
|
||||||
<initializer class="org.eclipse.cdt.ui.text.doctools.doxygen.DoxygenHelper"/>
|
|
||||||
</extension>
|
|
||||||
|
|
||||||
<!-- Default folding -->
|
<!-- Default folding -->
|
||||||
<extension
|
<extension
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 IBM Corporation and others.
|
* Copyright (c) 2007, 2011 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -40,4 +40,94 @@ public interface ICThemeConstants {
|
||||||
*/
|
*/
|
||||||
public final String CODEASSIST_PARAMETERS_FOREGROUND= ID_PREFIX + PreferenceConstants.CODEASSIST_PARAMETERS_FOREGROUND;
|
public final String CODEASSIST_PARAMETERS_FOREGROUND= ID_PREFIX + PreferenceConstants.CODEASSIST_PARAMETERS_FOREGROUND;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for multi-line comments.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_MULTI_LINE_COMMENT_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for single-line comments.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_SINGLE_LINE_COMMENT_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for C/C++ keywords.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_C_KEYWORD_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_C_KEYWORD_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for preprocessor directives.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_PP_DIRECTIVE_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_PP_DIRECTIVE_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for preprocessor headers (includes).
|
||||||
|
*/
|
||||||
|
public final String EDITOR_PP_HEADER_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_PP_HEADER_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for preprocessor text.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_PP_DEFAULT_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_PP_DEFAULT_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for C/C++ built-in types.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_C_BUILTIN_TYPE_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_C_BUILTIN_TYPE_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for string constants.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_C_STRING_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_C_STRING_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for operators.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_C_OPERATOR_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_C_OPERATOR_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for numbers.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_C_NUMBER_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_C_NUMBER_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for braces.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_C_BRACES_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_C_BRACES_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for C/C++ code.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_C_DEFAULT_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_C_DEFAULT_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for assembly labels.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_ASM_LABEL_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_ASM_LABEL_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for assembly directives.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_ASM_DIRECTIVE_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_ASM_DIRECTIVE_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for task tags.
|
||||||
|
*/
|
||||||
|
public final String EDITOR_TASK_TAG_COLOR= ID_PREFIX + PreferenceConstants.EDITOR_TASK_TAG_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for doxygen multi-line comments.
|
||||||
|
*/
|
||||||
|
public final String DOXYGEN_MULTI_LINE_COLOR= PreferenceConstants.DOXYGEN_MULTI_LINE_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for doxygen single line comments.
|
||||||
|
*/
|
||||||
|
public final String DOXYGEN_SINGLE_LINE_COLOR= PreferenceConstants.DOXYGEN_SINGLE_LINE_COLOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A theme constant that holds the foreground color used for doxygen tags.
|
||||||
|
*/
|
||||||
|
public final String DOXYGEN_TAG_COLOR= PreferenceConstants.DOXYGEN_TAG_COLOR;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2009 IBM Corporation and others.
|
* Copyright (c) 2000, 2011 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -13,7 +13,11 @@
|
||||||
|
|
||||||
package org.eclipse.cdt.internal.ui.editor;
|
package org.eclipse.cdt.internal.ui.editor;
|
||||||
|
|
||||||
|
import org.eclipse.jface.resource.ColorRegistry;
|
||||||
import org.eclipse.swt.graphics.RGB;
|
import org.eclipse.swt.graphics.RGB;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Semantic highlighting.
|
* Semantic highlighting.
|
||||||
|
@ -28,11 +32,17 @@ public abstract class SemanticHighlighting {
|
||||||
*/
|
*/
|
||||||
public abstract String getPreferenceKey();
|
public abstract String getPreferenceKey();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the default default text color
|
||||||
|
* @since 5.4
|
||||||
|
*/
|
||||||
|
public abstract RGB getDefaultDefaultTextColor();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the default text color
|
* @return the default text color
|
||||||
*/
|
*/
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultTextColor() {
|
||||||
return new RGB(0, 0, 0);
|
return findRGB(getThemeColorKey(), getDefaultDefaultTextColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -93,4 +103,28 @@ public abstract class SemanticHighlighting {
|
||||||
* @return <code>true</code> iff the semantic highlighting consumes the semantic token
|
* @return <code>true</code> iff the semantic highlighting consumes the semantic token
|
||||||
*/
|
*/
|
||||||
public abstract boolean consumes(SemanticToken token);
|
public abstract boolean consumes(SemanticToken token);
|
||||||
|
|
||||||
|
private String getThemeColorKey() {
|
||||||
|
return CUIPlugin.PLUGIN_ID + "." + getPreferenceKey() + "Highlighting"; //$NON-NLS-1$//$NON-NLS-2$
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the RGB for the given key in the given color registry.
|
||||||
|
*
|
||||||
|
* @param key the key for the constant in the registry
|
||||||
|
* @param defaultRGB the default RGB if no entry is found
|
||||||
|
* @return RGB the RGB
|
||||||
|
* @since 5.4
|
||||||
|
*/
|
||||||
|
private static RGB findRGB(String key, RGB defaultRGB) {
|
||||||
|
if (!PlatformUI.isWorkbenchRunning())
|
||||||
|
return defaultRGB;
|
||||||
|
|
||||||
|
ColorRegistry registry= PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
|
||||||
|
RGB rgb= registry.getRGB(key);
|
||||||
|
if (rgb != null)
|
||||||
|
return rgb;
|
||||||
|
return defaultRGB;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,10 +209,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return new RGB(0, 0, 192);
|
return new RGB(0, 0, 192);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,10 +282,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return new RGB(0, 0, 192);
|
return new RGB(0, 0, 192);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,10 +355,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return RGB_BLACK;
|
return RGB_BLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -454,10 +454,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return RGB_BLACK;
|
return RGB_BLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -530,10 +530,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return RGB_BLACK;
|
return RGB_BLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,10 +606,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return RGB_BLACK;
|
return RGB_BLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -700,10 +700,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return RGB_BLACK;
|
return RGB_BLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -775,10 +775,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return new RGB(128, 0, 0);
|
return new RGB(128, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -858,10 +858,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return RGB_BLACK;
|
return RGB_BLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -956,10 +956,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return RGB_BLACK;
|
return RGB_BLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1041,10 +1041,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return RGB_BLACK;
|
return RGB_BLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1107,10 +1107,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return new RGB(100, 70, 50);
|
return new RGB(100, 70, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1176,10 +1176,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return new RGB(0, 80, 50);
|
return new RGB(0, 80, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1248,10 +1248,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return new RGB(100, 70, 50);
|
return new RGB(100, 70, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1317,10 +1317,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return RGB_BLACK;
|
return RGB_BLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1386,10 +1386,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return RGB_BLACK;
|
return RGB_BLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1455,10 +1455,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return new RGB(0, 80, 50);
|
return new RGB(0, 80, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1528,10 +1528,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return RGB_BLACK;
|
return RGB_BLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1594,10 +1594,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return RGB_BLACK;
|
return RGB_BLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1660,10 +1660,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return new RGB(0, 0, 192);
|
return new RGB(0, 0, 192);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1733,10 +1733,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return new RGB(224, 0, 0);
|
return new RGB(224, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1811,10 +1811,10 @@ public class SemanticHighlightings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return new RGB(100, 40, 128);
|
return new RGB(100, 40, 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1932,10 +1932,10 @@ public class SemanticHighlightings {
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultTextColor()
|
* @see org.eclipse.cdt.internal.ui.editor.SemanticHighlighting#getDefaultDefaultTextColor()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RGB getDefaultTextColor() {
|
public RGB getDefaultDefaultTextColor() {
|
||||||
return new RGB(200, 100, 0); // orange
|
return new RGB(200, 100, 0); // orange
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2010 IBM Corporation and others.
|
* Copyright (c) 2000, 2011 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -66,7 +66,6 @@ import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.ui.PreferenceConstants;
|
import org.eclipse.cdt.ui.PreferenceConstants;
|
||||||
import org.eclipse.cdt.ui.text.ICPartitions;
|
import org.eclipse.cdt.ui.text.ICPartitions;
|
||||||
import org.eclipse.cdt.ui.text.IColorManager;
|
import org.eclipse.cdt.ui.text.IColorManager;
|
||||||
import org.eclipse.cdt.ui.text.doctools.doxygen.DoxygenHelper;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.editor.CSourceViewer;
|
import org.eclipse.cdt.internal.ui.editor.CSourceViewer;
|
||||||
import org.eclipse.cdt.internal.ui.editor.SemanticHighlighting;
|
import org.eclipse.cdt.internal.ui.editor.SemanticHighlighting;
|
||||||
|
@ -206,6 +205,7 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
|
* @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Color getBackground(Object element) {
|
public Color getBackground(Object element) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -213,6 +213,7 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
|
* @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Color getForeground(Object element) {
|
public Color getForeground(Object element) {
|
||||||
if (element instanceof SemanticHighlightingColorListItem) {
|
if (element instanceof SemanticHighlightingColorListItem) {
|
||||||
if (!getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED)) {
|
if (!getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED)) {
|
||||||
|
@ -231,6 +232,7 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
|
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Object[] getElements(Object inputElement) {
|
public Object[] getElements(Object inputElement) {
|
||||||
return new String[] {fCodeCategory, fAssemblyCategory, fCommentsCategory, fPreprocessorCategory, fDoxygenCategory};
|
return new String[] {fCodeCategory, fAssemblyCategory, fCommentsCategory, fPreprocessorCategory, fDoxygenCategory};
|
||||||
}
|
}
|
||||||
|
@ -238,15 +240,18 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
|
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
|
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
|
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object[] getChildren(Object parentElement) {
|
public Object[] getChildren(Object parentElement) {
|
||||||
if (parentElement instanceof String) {
|
if (parentElement instanceof String) {
|
||||||
String entry= (String) parentElement;
|
String entry= (String) parentElement;
|
||||||
|
@ -264,6 +269,7 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
return new Object[0];
|
return new Object[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object getParent(Object element) {
|
public Object getParent(Object element) {
|
||||||
if (element instanceof String)
|
if (element instanceof String)
|
||||||
return null;
|
return null;
|
||||||
|
@ -279,6 +285,7 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
return fCommentsCategory;
|
return fCommentsCategory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean hasChildren(Object element) {
|
public boolean hasChildren(Object element) {
|
||||||
return element instanceof String;
|
return element instanceof String;
|
||||||
}
|
}
|
||||||
|
@ -313,9 +320,9 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
{ PreferencesMessages.CEditorColoringConfigurationBlock_ppHeaders, PreferenceConstants.EDITOR_PP_HEADER_COLOR },
|
{ PreferencesMessages.CEditorColoringConfigurationBlock_ppHeaders, PreferenceConstants.EDITOR_PP_HEADER_COLOR },
|
||||||
{ PreferencesMessages.CEditorColoringConfigurationBlock_asmLabels, PreferenceConstants.EDITOR_ASM_LABEL_COLOR },
|
{ PreferencesMessages.CEditorColoringConfigurationBlock_asmLabels, PreferenceConstants.EDITOR_ASM_LABEL_COLOR },
|
||||||
{ PreferencesMessages.CEditorColoringConfigurationBlock_asmDirectives, PreferenceConstants.EDITOR_ASM_DIRECTIVE_COLOR },
|
{ PreferencesMessages.CEditorColoringConfigurationBlock_asmDirectives, PreferenceConstants.EDITOR_ASM_DIRECTIVE_COLOR },
|
||||||
{ PreferencesMessages.CEditorColoringConfigurationBlock_DoxygenTagRecognized, DoxygenHelper.DOXYGEN_TAG_RECOGNIZED },
|
{ PreferencesMessages.CEditorColoringConfigurationBlock_DoxygenTagRecognized, PreferenceConstants.DOXYGEN_TAG_COLOR },
|
||||||
{ PreferencesMessages.CEditorColoringConfigurationBlock_DoxygenSingleLineComment, DoxygenHelper.DOXYGEN_SINGLE_TOKEN },
|
{ PreferencesMessages.CEditorColoringConfigurationBlock_DoxygenSingleLineComment, PreferenceConstants.DOXYGEN_SINGLE_LINE_COLOR },
|
||||||
{ PreferencesMessages.CEditorColoringConfigurationBlock_DoxygenMultiLineComment, DoxygenHelper.DOXYGEN_MULTI_TOKEN },
|
{ PreferencesMessages.CEditorColoringConfigurationBlock_DoxygenMultiLineComment, PreferenceConstants.DOXYGEN_MULTI_LINE_COLOR },
|
||||||
{ PreferencesMessages.CEditorColoringConfigurationBlock_keywords, PreferenceConstants.EDITOR_C_KEYWORD_COLOR },
|
{ PreferencesMessages.CEditorColoringConfigurationBlock_keywords, PreferenceConstants.EDITOR_C_KEYWORD_COLOR },
|
||||||
// { PreferencesMessages.CEditorColoringConfigurationBlock_returnKeyword, PreferenceConstants.EDITOR_C_KEYWORD_RETURN_COLOR },
|
// { PreferencesMessages.CEditorColoringConfigurationBlock_returnKeyword, PreferenceConstants.EDITOR_C_KEYWORD_RETURN_COLOR },
|
||||||
{ PreferencesMessages.CEditorColoringConfigurationBlock_builtInTypes, PreferenceConstants.EDITOR_C_BUILTIN_TYPE_COLOR },
|
{ PreferencesMessages.CEditorColoringConfigurationBlock_builtInTypes, PreferenceConstants.EDITOR_C_BUILTIN_TYPE_COLOR },
|
||||||
|
@ -432,6 +439,7 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
* @param parent the parent composite
|
* @param parent the parent composite
|
||||||
* @return the control for the preference page
|
* @return the control for the preference page
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Control createControl(Composite parent) {
|
public Control createControl(Composite parent) {
|
||||||
initializeDialogUnits(parent);
|
initializeDialogUnits(parent);
|
||||||
return createSyntaxPage(parent);
|
return createSyntaxPage(parent);
|
||||||
|
@ -698,15 +706,18 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
previewer.setLayoutData(gd);
|
previewer.setLayoutData(gd);
|
||||||
|
|
||||||
fListViewer.addSelectionChangedListener(new ISelectionChangedListener() {
|
fListViewer.addSelectionChangedListener(new ISelectionChangedListener() {
|
||||||
|
@Override
|
||||||
public void selectionChanged(SelectionChangedEvent event) {
|
public void selectionChanged(SelectionChangedEvent event) {
|
||||||
handleSyntaxColorListSelection();
|
handleSyntaxColorListSelection();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
foregroundColorButton.addSelectionListener(new SelectionListener() {
|
foregroundColorButton.addSelectionListener(new SelectionListener() {
|
||||||
|
@Override
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
HighlightingColorListItem item= getHighlightingColorListItem();
|
HighlightingColorListItem item= getHighlightingColorListItem();
|
||||||
PreferenceConverter.setValue(getPreferenceStore(), item.getColorKey(), fSyntaxForegroundColorEditor.getColorValue());
|
PreferenceConverter.setValue(getPreferenceStore(), item.getColorKey(), fSyntaxForegroundColorEditor.getColorValue());
|
||||||
|
@ -714,9 +725,11 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
});
|
});
|
||||||
|
|
||||||
fBoldCheckBox.addSelectionListener(new SelectionListener() {
|
fBoldCheckBox.addSelectionListener(new SelectionListener() {
|
||||||
|
@Override
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
HighlightingColorListItem item= getHighlightingColorListItem();
|
HighlightingColorListItem item= getHighlightingColorListItem();
|
||||||
getPreferenceStore().setValue(item.getBoldKey(), fBoldCheckBox.getSelection());
|
getPreferenceStore().setValue(item.getBoldKey(), fBoldCheckBox.getSelection());
|
||||||
|
@ -724,18 +737,22 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
});
|
});
|
||||||
|
|
||||||
fItalicCheckBox.addSelectionListener(new SelectionListener() {
|
fItalicCheckBox.addSelectionListener(new SelectionListener() {
|
||||||
|
@Override
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
HighlightingColorListItem item= getHighlightingColorListItem();
|
HighlightingColorListItem item= getHighlightingColorListItem();
|
||||||
getPreferenceStore().setValue(item.getItalicKey(), fItalicCheckBox.getSelection());
|
getPreferenceStore().setValue(item.getItalicKey(), fItalicCheckBox.getSelection());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
fStrikethroughCheckBox.addSelectionListener(new SelectionListener() {
|
fStrikethroughCheckBox.addSelectionListener(new SelectionListener() {
|
||||||
|
@Override
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
HighlightingColorListItem item= getHighlightingColorListItem();
|
HighlightingColorListItem item= getHighlightingColorListItem();
|
||||||
getPreferenceStore().setValue(item.getStrikethroughKey(), fStrikethroughCheckBox.getSelection());
|
getPreferenceStore().setValue(item.getStrikethroughKey(), fStrikethroughCheckBox.getSelection());
|
||||||
|
@ -743,9 +760,11 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
});
|
});
|
||||||
|
|
||||||
fUnderlineCheckBox.addSelectionListener(new SelectionListener() {
|
fUnderlineCheckBox.addSelectionListener(new SelectionListener() {
|
||||||
|
@Override
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
HighlightingColorListItem item= getHighlightingColorListItem();
|
HighlightingColorListItem item= getHighlightingColorListItem();
|
||||||
getPreferenceStore().setValue(item.getUnderlineKey(), fUnderlineCheckBox.getSelection());
|
getPreferenceStore().setValue(item.getUnderlineKey(), fUnderlineCheckBox.getSelection());
|
||||||
|
@ -753,9 +772,11 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
});
|
});
|
||||||
|
|
||||||
fEnableCheckbox.addSelectionListener(new SelectionListener() {
|
fEnableCheckbox.addSelectionListener(new SelectionListener() {
|
||||||
|
@Override
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
HighlightingColorListItem item= getHighlightingColorListItem();
|
HighlightingColorListItem item= getHighlightingColorListItem();
|
||||||
if (item instanceof SemanticHighlightingColorListItem) {
|
if (item instanceof SemanticHighlightingColorListItem) {
|
||||||
|
@ -775,9 +796,11 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
|
||||||
});
|
});
|
||||||
|
|
||||||
fEnableSemanticHighlightingCheckbox.addSelectionListener(new SelectionListener() {
|
fEnableSemanticHighlightingCheckbox.addSelectionListener(new SelectionListener() {
|
||||||
|
@Override
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
fListViewer.refresh(true);
|
fListViewer.refresh(true);
|
||||||
HighlightingColorListItem item= getHighlightingColorListItem();
|
HighlightingColorListItem item= getHighlightingColorListItem();
|
||||||
|
|
|
@ -48,6 +48,8 @@ import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
import org.eclipse.jface.text.source.ISharedTextColors;
|
import org.eclipse.jface.text.source.ISharedTextColors;
|
||||||
import org.eclipse.jface.text.templates.ContextTypeRegistry;
|
import org.eclipse.jface.text.templates.ContextTypeRegistry;
|
||||||
import org.eclipse.jface.text.templates.persistence.TemplateStore;
|
import org.eclipse.jface.text.templates.persistence.TemplateStore;
|
||||||
|
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||||
|
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||||
import org.eclipse.swt.widgets.Display;
|
import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IEditorInput;
|
import org.eclipse.ui.IEditorInput;
|
||||||
|
@ -56,6 +58,7 @@ import org.eclipse.ui.IEditorReference;
|
||||||
import org.eclipse.ui.IWorkbench;
|
import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.IWorkbenchPage;
|
import org.eclipse.ui.IWorkbenchPage;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.editors.text.EditorsUI;
|
import org.eclipse.ui.editors.text.EditorsUI;
|
||||||
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
|
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
|
||||||
import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
|
import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
|
||||||
|
@ -64,6 +67,7 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
import org.eclipse.ui.preferences.ScopedPreferenceStore;
|
import org.eclipse.ui.preferences.ScopedPreferenceStore;
|
||||||
import org.eclipse.ui.texteditor.ChainedPreferenceStore;
|
import org.eclipse.ui.texteditor.ChainedPreferenceStore;
|
||||||
import org.eclipse.ui.texteditor.ConfigurationElementSorter;
|
import org.eclipse.ui.texteditor.ConfigurationElementSorter;
|
||||||
|
import org.eclipse.ui.themes.IThemeManager;
|
||||||
import org.osgi.framework.Bundle;
|
import org.osgi.framework.Bundle;
|
||||||
import org.osgi.framework.BundleContext;
|
import org.osgi.framework.BundleContext;
|
||||||
import org.osgi.framework.BundleException;
|
import org.osgi.framework.BundleException;
|
||||||
|
@ -435,6 +439,12 @@ public class CUIPlugin extends AbstractUIPlugin {
|
||||||
*/
|
*/
|
||||||
private TemplateStore fCodeTemplateStore;
|
private TemplateStore fCodeTemplateStore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Theme listener.
|
||||||
|
* @since 5.4
|
||||||
|
*/
|
||||||
|
private IPropertyChangeListener fThemeListener;
|
||||||
|
|
||||||
public CUIPlugin() {
|
public CUIPlugin() {
|
||||||
fgCPlugin = this;
|
fgCPlugin = this;
|
||||||
fDocumentProvider = null;
|
fDocumentProvider = null;
|
||||||
|
@ -531,6 +541,7 @@ public class CUIPlugin extends AbstractUIPlugin {
|
||||||
public void startGlobalConsole() {
|
public void startGlobalConsole() {
|
||||||
GlobalBuildConsoleManager.startGlobalConsole();
|
GlobalBuildConsoleManager.startGlobalConsole();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
|
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
|
||||||
*/
|
*/
|
||||||
|
@ -543,14 +554,26 @@ public class CUIPlugin extends AbstractUIPlugin {
|
||||||
|
|
||||||
registerAdapters();
|
registerAdapters();
|
||||||
IWorkingCopyProvider workingCopyProvider = new IWorkingCopyProvider() {
|
IWorkingCopyProvider workingCopyProvider = new IWorkingCopyProvider() {
|
||||||
|
@Override
|
||||||
public IWorkingCopy[] getWorkingCopies() {
|
public IWorkingCopy[] getWorkingCopies() {
|
||||||
return CUIPlugin.getSharedWorkingCopies();
|
return CUIPlugin.getSharedWorkingCopies();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
CCorePlugin.getDefault().getDOM().setWorkingCopyProvider(workingCopyProvider);
|
CCorePlugin.getDefault().getDOM().setWorkingCopyProvider(workingCopyProvider);
|
||||||
|
|
||||||
// init ast provider
|
if (PlatformUI.isWorkbenchRunning()) {
|
||||||
getASTProvider();
|
// Initialize AST provider
|
||||||
|
getASTProvider();
|
||||||
|
|
||||||
|
fThemeListener= new IPropertyChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void propertyChange(PropertyChangeEvent event) {
|
||||||
|
if (IThemeManager.CHANGE_CURRENT_THEME.equals(event.getProperty()))
|
||||||
|
CUIPreferenceInitializer.setThemeBasedPreferences(PreferenceConstants.getPreferenceStore(), true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
PlatformUI.getWorkbench().getThemeManager().addPropertyChangeListener(fThemeListener);
|
||||||
|
}
|
||||||
CDTContextActivator.getInstance().install();
|
CDTContextActivator.getInstance().install();
|
||||||
|
|
||||||
DocCommentOwnerManager.getInstance().addListener(new EditorReopener());
|
DocCommentOwnerManager.getInstance().addListener(new EditorReopener());
|
||||||
|
@ -629,6 +652,11 @@ public class CUIPlugin extends AbstractUIPlugin {
|
||||||
|
|
||||||
ContentAssistPreference.shutdown();
|
ContentAssistPreference.shutdown();
|
||||||
|
|
||||||
|
if (fThemeListener != null) {
|
||||||
|
PlatformUI.getWorkbench().getThemeManager().removePropertyChangeListener(fThemeListener);
|
||||||
|
fThemeListener= null;
|
||||||
|
}
|
||||||
|
|
||||||
// Do this last.
|
// Do this last.
|
||||||
super.stop(context);
|
super.stop(context);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2003, 2009 IBM Corporation and others.
|
* Copyright (c) 2003, 2011 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -10,6 +10,17 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.ui;
|
package org.eclipse.cdt.ui;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
||||||
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
|
import org.eclipse.jface.preference.PreferenceConverter;
|
||||||
|
import org.eclipse.jface.resource.ColorRegistry;
|
||||||
|
import org.eclipse.swt.graphics.RGB;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
import org.eclipse.ui.editors.text.EditorsUI;
|
||||||
|
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
|
||||||
|
import org.eclipse.ui.texteditor.AbstractTextEditor;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.internal.ui.ICThemeConstants;
|
||||||
import org.eclipse.cdt.internal.ui.cview.CView;
|
import org.eclipse.cdt.internal.ui.cview.CView;
|
||||||
import org.eclipse.cdt.internal.ui.editor.SemanticHighlightings;
|
import org.eclipse.cdt.internal.ui.editor.SemanticHighlightings;
|
||||||
import org.eclipse.cdt.internal.ui.preferences.BuildConsolePreferencePage;
|
import org.eclipse.cdt.internal.ui.preferences.BuildConsolePreferencePage;
|
||||||
|
@ -18,12 +29,6 @@ import org.eclipse.cdt.internal.ui.preferences.CPluginPreferencePage;
|
||||||
import org.eclipse.cdt.internal.ui.preferences.CodeAssistPreferencePage;
|
import org.eclipse.cdt.internal.ui.preferences.CodeAssistPreferencePage;
|
||||||
import org.eclipse.cdt.internal.ui.preferences.WorkInProgressPreferencePage;
|
import org.eclipse.cdt.internal.ui.preferences.WorkInProgressPreferencePage;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
|
||||||
import org.eclipse.ui.editors.text.EditorsUI;
|
|
||||||
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
|
|
||||||
import org.eclipse.ui.texteditor.AbstractTextEditor;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class implements the setting of the CUI initial preference store settings.
|
* This class implements the setting of the CUI initial preference store settings.
|
||||||
*
|
*
|
||||||
|
@ -88,4 +93,145 @@ public class CUIPreferenceInitializer extends AbstractPreferenceInitializer {
|
||||||
store.setToDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE);
|
store.setToDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE);
|
||||||
store.setToDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SMART_HOME_END);
|
store.setToDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SMART_HOME_END);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void setThemeBasedPreferences(IPreferenceStore store, boolean fireEvent) {
|
||||||
|
ColorRegistry registry= null;
|
||||||
|
if (PlatformUI.isWorkbenchRunning())
|
||||||
|
registry= PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
|
||||||
|
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_MULTI_LINE_COMMENT_COLOR, new RGB(63, 127, 95)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR, new RGB(63, 127, 95)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_TASK_TAG_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_TASK_TAG_COLOR, new RGB(127, 159, 191)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_C_KEYWORD_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_C_KEYWORD_COLOR, new RGB(127, 0, 85)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_C_BUILTIN_TYPE_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_C_BUILTIN_TYPE_COLOR, new RGB(127, 0, 85)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_C_STRING_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_C_STRING_COLOR, new RGB(42, 0, 255)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_C_DEFAULT_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_C_DEFAULT_COLOR, new RGB(0, 0, 0)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_C_OPERATOR_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_C_OPERATOR_COLOR, new RGB(0, 0, 0)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_C_BRACES_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_C_BRACES_COLOR, new RGB(0, 0, 0)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_C_NUMBER_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_C_NUMBER_COLOR, new RGB(0, 0, 0)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_PP_DIRECTIVE_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_PP_DIRECTIVE_COLOR, new RGB(127, 0, 85)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_PP_HEADER_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_PP_HEADER_COLOR, new RGB(42, 0, 255)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_PP_DEFAULT_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_PP_DEFAULT_COLOR, new RGB(0, 0, 0)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_ASM_LABEL_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_ASM_LABEL_COLOR, new RGB(127, 0, 85)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.EDITOR_ASM_DIRECTIVE_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.EDITOR_ASM_DIRECTIVE_COLOR, new RGB(127, 0, 85)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND,
|
||||||
|
findRGB(registry, ICThemeConstants.CODEASSIST_PROPOSALS_BACKGROUND, new RGB(255, 255, 255)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND,
|
||||||
|
findRGB(registry, ICThemeConstants.CODEASSIST_PROPOSALS_FOREGROUND, new RGB(0, 0, 0)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.CODEASSIST_PARAMETERS_BACKGROUND,
|
||||||
|
findRGB(registry, ICThemeConstants.CODEASSIST_PARAMETERS_BACKGROUND, new RGB(255, 255, 255)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.CODEASSIST_PARAMETERS_FOREGROUND,
|
||||||
|
findRGB(registry, ICThemeConstants.CODEASSIST_PARAMETERS_FOREGROUND, new RGB(0, 0, 0)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.DOXYGEN_MULTI_LINE_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.DOXYGEN_MULTI_LINE_COLOR, new RGB(63, 95, 191)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.DOXYGEN_SINGLE_LINE_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.DOXYGEN_SINGLE_LINE_COLOR, new RGB(63, 95, 191)), fireEvent);
|
||||||
|
setDefault(
|
||||||
|
store,
|
||||||
|
PreferenceConstants.DOXYGEN_TAG_COLOR,
|
||||||
|
findRGB(registry, ICThemeConstants.DOXYGEN_TAG_COLOR, new RGB(127, 159, 191)), fireEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the default value and fires a property
|
||||||
|
* change event if necessary.
|
||||||
|
*
|
||||||
|
* @param store the preference store
|
||||||
|
* @param key the preference key
|
||||||
|
* @param newValue the new value
|
||||||
|
* @param fireEvent <code>false</code> if no event should be fired
|
||||||
|
* @since 5.4
|
||||||
|
*/
|
||||||
|
private static void setDefault(IPreferenceStore store, String key, RGB newValue, boolean fireEvent) {
|
||||||
|
if (!fireEvent) {
|
||||||
|
PreferenceConverter.setDefault(store, key, newValue);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
RGB oldValue= null;
|
||||||
|
if (store.isDefault(key))
|
||||||
|
oldValue= PreferenceConverter.getDefaultColor(store, key);
|
||||||
|
|
||||||
|
PreferenceConverter.setDefault(store, key, newValue);
|
||||||
|
|
||||||
|
if (oldValue != null && !oldValue.equals(newValue))
|
||||||
|
store.firePropertyChangeEvent(key, oldValue, newValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the RGB for the given key in the given color registry.
|
||||||
|
*
|
||||||
|
* @param registry the color registry
|
||||||
|
* @param key the key for the constant in the registry
|
||||||
|
* @param defaultRGB the default RGB if no entry is found
|
||||||
|
* @return RGB the RGB
|
||||||
|
* @since 5.4
|
||||||
|
*/
|
||||||
|
private static RGB findRGB(ColorRegistry registry, String key, RGB defaultRGB) {
|
||||||
|
if (registry == null)
|
||||||
|
return defaultRGB;
|
||||||
|
|
||||||
|
RGB rgb= registry.getRGB(key);
|
||||||
|
if (rgb != null)
|
||||||
|
return rgb;
|
||||||
|
|
||||||
|
return defaultRGB;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,17 +23,12 @@ import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||||
import org.eclipse.jface.action.Action;
|
import org.eclipse.jface.action.Action;
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
import org.eclipse.jface.preference.PreferenceConverter;
|
|
||||||
import org.eclipse.jface.resource.ColorRegistry;
|
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.graphics.RGB;
|
|
||||||
import org.eclipse.ui.PlatformUI;
|
|
||||||
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
|
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.ICProject;
|
import org.eclipse.cdt.core.model.ICProject;
|
||||||
import org.eclipse.cdt.ui.text.ICColorConstants;
|
import org.eclipse.cdt.ui.text.ICColorConstants;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.ICThemeConstants;
|
|
||||||
import org.eclipse.cdt.internal.ui.preferences.formatter.FormatterProfileManager;
|
import org.eclipse.cdt.internal.ui.preferences.formatter.FormatterProfileManager;
|
||||||
import org.eclipse.cdt.internal.ui.text.spelling.SpellCheckEngine;
|
import org.eclipse.cdt.internal.ui.text.spelling.SpellCheckEngine;
|
||||||
|
|
||||||
|
@ -554,6 +549,45 @@ public class PreferenceConstants {
|
||||||
*/
|
*/
|
||||||
public final static String EDITOR_ASM_DIRECTIVE_ITALIC= ICColorConstants.ASM_DIRECTIVE + EDITOR_ITALIC_SUFFIX;
|
public final static String EDITOR_ASM_DIRECTIVE_ITALIC= ICColorConstants.ASM_DIRECTIVE + EDITOR_ITALIC_SUFFIX;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A named preference that holds the color used to render doxygen tags.
|
||||||
|
* <p>
|
||||||
|
* Value is of type <code>String</code>. A RGB color value encoded as a string
|
||||||
|
* using class <code>PreferenceConverter</code>
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @see org.eclipse.jface.resource.StringConverter
|
||||||
|
* @see org.eclipse.jface.preference.PreferenceConverter
|
||||||
|
* @since 5.4
|
||||||
|
*/
|
||||||
|
public static final String DOXYGEN_TAG_COLOR= "org.eclipse.cdt.internal.ui.text.doctools.doxygen.recognizedTag"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A named preference that holds the color used to render doxygen single line comments.
|
||||||
|
* <p>
|
||||||
|
* Value is of type <code>String</code>. A RGB color value encoded as a string
|
||||||
|
* using class <code>PreferenceConverter</code>
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @see org.eclipse.jface.resource.StringConverter
|
||||||
|
* @see org.eclipse.jface.preference.PreferenceConverter
|
||||||
|
* @since 5.4
|
||||||
|
*/
|
||||||
|
public static final String DOXYGEN_SINGLE_LINE_COLOR= "org.eclipse.cdt.internal.ui.text.doctools.doxygen.single"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A named preference that holds the color used to render doxygen multi-line comments.
|
||||||
|
* <p>
|
||||||
|
* Value is of type <code>String</code>. A RGB color value encoded as a string
|
||||||
|
* using class <code>PreferenceConverter</code>
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @see org.eclipse.jface.resource.StringConverter
|
||||||
|
* @see org.eclipse.jface.preference.PreferenceConverter
|
||||||
|
* @since 5.4
|
||||||
|
*/
|
||||||
|
public static final String DOXYGEN_MULTI_LINE_COLOR= "org.eclipse.cdt.internal.ui.text.doctools.doxygen.multi"; //$NON-NLS-1$
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The symbolic font name for the C/C++ editor text font
|
* The symbolic font name for the C/C++ editor text font
|
||||||
* (value <code>"org.eclipse.cdt.ui.editors.textfont"</code>).
|
* (value <code>"org.eclipse.cdt.ui.editors.textfont"</code>).
|
||||||
|
@ -1859,8 +1893,6 @@ public class PreferenceConstants {
|
||||||
* @param store the preference store to be initialized
|
* @param store the preference store to be initialized
|
||||||
*/
|
*/
|
||||||
public static void initializeDefaultValues(IPreferenceStore store) {
|
public static void initializeDefaultValues(IPreferenceStore store) {
|
||||||
ColorRegistry registry= PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
|
|
||||||
|
|
||||||
store.setDefault(PreferenceConstants.EDITOR_CORRECTION_INDICATION, false);
|
store.setDefault(PreferenceConstants.EDITOR_CORRECTION_INDICATION, false);
|
||||||
store.setDefault(PreferenceConstants.EDITOR_SHOW_SEGMENTS, false);
|
store.setDefault(PreferenceConstants.EDITOR_SHOW_SEGMENTS, false);
|
||||||
store.setDefault(PreferenceConstants.PREF_SHOW_CU_CHILDREN, true);
|
store.setDefault(PreferenceConstants.PREF_SHOW_CU_CHILDREN, true);
|
||||||
|
@ -1875,64 +1907,49 @@ public class PreferenceConstants {
|
||||||
|
|
||||||
store.setDefault(EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT, true);
|
store.setDefault(EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT, true);
|
||||||
|
|
||||||
// Coloring
|
// Syntax highlighting
|
||||||
PreferenceConverter.setDefault(store, EDITOR_MULTI_LINE_COMMENT_COLOR, new RGB(63, 127, 95));
|
|
||||||
store.setDefault(EDITOR_MULTI_LINE_COMMENT_BOLD, false);
|
store.setDefault(EDITOR_MULTI_LINE_COMMENT_BOLD, false);
|
||||||
store.setDefault(EDITOR_MULTI_LINE_COMMENT_ITALIC, false);
|
store.setDefault(EDITOR_MULTI_LINE_COMMENT_ITALIC, false);
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, EDITOR_SINGLE_LINE_COMMENT_COLOR, new RGB(63, 127, 95));
|
|
||||||
store.setDefault(EDITOR_SINGLE_LINE_COMMENT_BOLD, false);
|
store.setDefault(EDITOR_SINGLE_LINE_COMMENT_BOLD, false);
|
||||||
store.setDefault(EDITOR_SINGLE_LINE_COMMENT_ITALIC, false);
|
store.setDefault(EDITOR_SINGLE_LINE_COMMENT_ITALIC, false);
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_TASK_TAG_COLOR, new RGB(127, 159, 191));
|
store.setDefault(EDITOR_TASK_TAG_BOLD, true);
|
||||||
store.setDefault(PreferenceConstants.EDITOR_TASK_TAG_BOLD, true);
|
store.setDefault(EDITOR_TASK_TAG_ITALIC, false);
|
||||||
store.setDefault(PreferenceConstants.EDITOR_TASK_TAG_ITALIC, false);
|
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, EDITOR_C_KEYWORD_COLOR, new RGB(127, 0, 85));
|
|
||||||
store.setDefault(EDITOR_C_KEYWORD_BOLD, true);
|
store.setDefault(EDITOR_C_KEYWORD_BOLD, true);
|
||||||
store.setDefault(EDITOR_C_KEYWORD_ITALIC, false);
|
store.setDefault(EDITOR_C_KEYWORD_ITALIC, false);
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, EDITOR_C_BUILTIN_TYPE_COLOR, new RGB(127, 0, 85));
|
|
||||||
store.setDefault(EDITOR_C_BUILTIN_TYPE_BOLD, true);
|
store.setDefault(EDITOR_C_BUILTIN_TYPE_BOLD, true);
|
||||||
store.setDefault(EDITOR_C_BUILTIN_TYPE_ITALIC, false);
|
store.setDefault(EDITOR_C_BUILTIN_TYPE_ITALIC, false);
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, EDITOR_C_STRING_COLOR, new RGB(42, 0, 255));
|
|
||||||
store.setDefault(EDITOR_C_STRING_BOLD, false);
|
store.setDefault(EDITOR_C_STRING_BOLD, false);
|
||||||
store.setDefault(EDITOR_C_STRING_ITALIC, false);
|
store.setDefault(EDITOR_C_STRING_ITALIC, false);
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, EDITOR_C_DEFAULT_COLOR, new RGB(0, 0, 0));
|
|
||||||
store.setDefault(EDITOR_C_DEFAULT_BOLD, false);
|
store.setDefault(EDITOR_C_DEFAULT_BOLD, false);
|
||||||
store.setDefault(EDITOR_C_DEFAULT_ITALIC, false);
|
store.setDefault(EDITOR_C_DEFAULT_ITALIC, false);
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, EDITOR_C_OPERATOR_COLOR, new RGB(0, 0, 0));
|
|
||||||
store.setDefault(EDITOR_C_OPERATOR_BOLD, false);
|
store.setDefault(EDITOR_C_OPERATOR_BOLD, false);
|
||||||
store.setDefault(EDITOR_C_OPERATOR_ITALIC, false);
|
store.setDefault(EDITOR_C_OPERATOR_ITALIC, false);
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, EDITOR_C_BRACES_COLOR, new RGB(0, 0, 0));
|
|
||||||
store.setDefault(EDITOR_C_BRACES_BOLD, false);
|
store.setDefault(EDITOR_C_BRACES_BOLD, false);
|
||||||
store.setDefault(EDITOR_C_BRACES_ITALIC, false);
|
store.setDefault(EDITOR_C_BRACES_ITALIC, false);
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, EDITOR_C_NUMBER_COLOR, new RGB(0, 0, 0));
|
|
||||||
store.setDefault(EDITOR_C_NUMBER_BOLD, false);
|
store.setDefault(EDITOR_C_NUMBER_BOLD, false);
|
||||||
store.setDefault(EDITOR_C_NUMBER_ITALIC, false);
|
store.setDefault(EDITOR_C_NUMBER_ITALIC, false);
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, EDITOR_PP_DIRECTIVE_COLOR, new RGB(127, 0, 85));
|
|
||||||
store.setDefault(EDITOR_PP_DIRECTIVE_BOLD, true);
|
store.setDefault(EDITOR_PP_DIRECTIVE_BOLD, true);
|
||||||
store.setDefault(EDITOR_PP_DIRECTIVE_ITALIC, false);
|
store.setDefault(EDITOR_PP_DIRECTIVE_ITALIC, false);
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, EDITOR_PP_HEADER_COLOR, new RGB(42, 0, 255));
|
|
||||||
store.setDefault(EDITOR_PP_HEADER_BOLD, false);
|
store.setDefault(EDITOR_PP_HEADER_BOLD, false);
|
||||||
store.setDefault(EDITOR_PP_HEADER_ITALIC, false);
|
store.setDefault(EDITOR_PP_HEADER_ITALIC, false);
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, EDITOR_PP_DEFAULT_COLOR, new RGB(0, 0, 0));
|
|
||||||
store.setDefault(EDITOR_PP_DEFAULT_BOLD, false);
|
store.setDefault(EDITOR_PP_DEFAULT_BOLD, false);
|
||||||
store.setDefault(EDITOR_PP_DEFAULT_ITALIC, false);
|
store.setDefault(EDITOR_PP_DEFAULT_ITALIC, false);
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, EDITOR_ASM_LABEL_COLOR, new RGB(127, 0, 85));
|
|
||||||
store.setDefault(EDITOR_ASM_LABEL_BOLD, true);
|
store.setDefault(EDITOR_ASM_LABEL_BOLD, true);
|
||||||
store.setDefault(EDITOR_ASM_LABEL_ITALIC, false);
|
store.setDefault(EDITOR_ASM_LABEL_ITALIC, false);
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, EDITOR_ASM_DIRECTIVE_COLOR, new RGB(127, 0, 85));
|
|
||||||
store.setDefault(EDITOR_ASM_DIRECTIVE_BOLD, true);
|
store.setDefault(EDITOR_ASM_DIRECTIVE_BOLD, true);
|
||||||
store.setDefault(EDITOR_ASM_DIRECTIVE_ITALIC, false);
|
store.setDefault(EDITOR_ASM_DIRECTIVE_ITALIC, false);
|
||||||
|
|
||||||
|
@ -1972,23 +1989,6 @@ public class PreferenceConstants {
|
||||||
|
|
||||||
store.setDefault(PreferenceConstants.CODEASSIST_PROPOSALS_TIMEOUT, 5000);
|
store.setDefault(PreferenceConstants.CODEASSIST_PROPOSALS_TIMEOUT, 5000);
|
||||||
|
|
||||||
setDefaultAndFireEvent(
|
|
||||||
store,
|
|
||||||
PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND,
|
|
||||||
findRGB(registry, ICThemeConstants.CODEASSIST_PROPOSALS_BACKGROUND, new RGB(255, 255, 255)));
|
|
||||||
setDefaultAndFireEvent(
|
|
||||||
store,
|
|
||||||
PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND,
|
|
||||||
findRGB(registry, ICThemeConstants.CODEASSIST_PROPOSALS_FOREGROUND, new RGB(0, 0, 0)));
|
|
||||||
setDefaultAndFireEvent(
|
|
||||||
store,
|
|
||||||
PreferenceConstants.CODEASSIST_PARAMETERS_BACKGROUND,
|
|
||||||
findRGB(registry, ICThemeConstants.CODEASSIST_PARAMETERS_BACKGROUND, new RGB(255, 255, 255)));
|
|
||||||
setDefaultAndFireEvent(
|
|
||||||
store,
|
|
||||||
PreferenceConstants.CODEASSIST_PARAMETERS_FOREGROUND,
|
|
||||||
findRGB(registry, ICThemeConstants.CODEASSIST_PARAMETERS_FOREGROUND, new RGB(0, 0, 0)));
|
|
||||||
|
|
||||||
// Refactoring.
|
// Refactoring.
|
||||||
store.setDefault(PreferenceConstants.REFACTOR_SAVE_ALL_EDITORS, false);
|
store.setDefault(PreferenceConstants.REFACTOR_SAVE_ALL_EDITORS, false);
|
||||||
store.setDefault(PreferenceConstants.REFACTOR_LIGHTWEIGHT, true);
|
store.setDefault(PreferenceConstants.REFACTOR_LIGHTWEIGHT, true);
|
||||||
|
@ -2081,6 +2081,9 @@ public class PreferenceConstants {
|
||||||
store.setDefault(NAME_STYLE_CPP_TEST_PREFIX, ""); //$NON-NLS-1$
|
store.setDefault(NAME_STYLE_CPP_TEST_PREFIX, ""); //$NON-NLS-1$
|
||||||
store.setDefault(NAME_STYLE_CPP_TEST_SUFFIX, "_test.cpp"); //$NON-NLS-1$
|
store.setDefault(NAME_STYLE_CPP_TEST_SUFFIX, "_test.cpp"); //$NON-NLS-1$
|
||||||
store.setDefault(NAME_STYLE_CPP_TEST_WORD_DELIMITER, ""); //$NON-NLS-1$
|
store.setDefault(NAME_STYLE_CPP_TEST_WORD_DELIMITER, ""); //$NON-NLS-1$
|
||||||
|
|
||||||
|
// Colors that are set by the current theme
|
||||||
|
CUIPreferenceInitializer.setThemeBasedPreferences(store, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2149,39 +2152,4 @@ public class PreferenceConstants {
|
||||||
return getPreferenceNode(key, project).getBoolean(key, defaultValue);
|
return getPreferenceNode(key, project).getBoolean(key, defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the default value and fires a property
|
|
||||||
* change event if necessary.
|
|
||||||
*
|
|
||||||
* @param store the preference store
|
|
||||||
* @param key the preference key
|
|
||||||
* @param newValue the new value
|
|
||||||
* @since 5.0
|
|
||||||
*/
|
|
||||||
private static void setDefaultAndFireEvent(IPreferenceStore store, String key, RGB newValue) {
|
|
||||||
RGB oldValue= null;
|
|
||||||
if (store.isDefault(key))
|
|
||||||
oldValue= PreferenceConverter.getDefaultColor(store, key);
|
|
||||||
|
|
||||||
PreferenceConverter.setDefault(store, key, newValue);
|
|
||||||
|
|
||||||
if (oldValue != null && !oldValue.equals(newValue))
|
|
||||||
store.firePropertyChangeEvent(key, oldValue, newValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the RGB for the given key in the given color registry.
|
|
||||||
*
|
|
||||||
* @param registry the color registry
|
|
||||||
* @param key the key for the constant in the registry
|
|
||||||
* @param defaultRGB the default RGB if no entry is found
|
|
||||||
* @return RGB the RGB
|
|
||||||
* @since 5.0
|
|
||||||
*/
|
|
||||||
private static RGB findRGB(ColorRegistry registry, String key, RGB defaultRGB) {
|
|
||||||
RGB rgb= registry.getRGB(key);
|
|
||||||
if (rgb != null)
|
|
||||||
return rgb;
|
|
||||||
return defaultRGB;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2009 Symbian Software Systems and others.
|
* Copyright (c) 2008, 2011 Symbian Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Andrew Ferguson (Symbian) - Initial implementation
|
* Andrew Ferguson (Symbian) - Initial implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.ui.text.doctools.doxygen;
|
package org.eclipse.cdt.ui.text.doctools.doxygen;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
|
@ -20,11 +20,8 @@ import org.eclipse.core.runtime.FileLocator;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
|
||||||
import org.eclipse.jface.preference.PreferenceConverter;
|
|
||||||
import org.eclipse.swt.graphics.RGB;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
import org.eclipse.cdt.ui.PreferenceConstants;
|
||||||
import org.eclipse.cdt.ui.text.doctools.generic.GenericDocTag;
|
import org.eclipse.cdt.ui.text.doctools.generic.GenericDocTag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,24 +34,38 @@ public class DoxygenHelper extends AbstractPreferenceInitializer {
|
||||||
private static final IPath TAGS_CSV= new Path("doxygenTags.csv"); //$NON-NLS-1$
|
private static final IPath TAGS_CSV= new Path("doxygenTags.csv"); //$NON-NLS-1$
|
||||||
private static GenericDocTag[] fTags;
|
private static GenericDocTag[] fTags;
|
||||||
|
|
||||||
public static final String DOXYGEN_TAG_RECOGNIZED= "org.eclipse.cdt.internal.ui.text.doctools.doxygen.recognizedTag"; //$NON-NLS-1$
|
/**
|
||||||
public static final String DOXYGEN_SINGLE_TOKEN= "org.eclipse.cdt.internal.ui.text.doctools.doxygen.single"; //$NON-NLS-1$
|
* @deprecated Use {@link PreferenceConstants#DOXYGEN_TAG_COLOR} instead.
|
||||||
public static final String DOXYGEN_MULTI_TOKEN= "org.eclipse.cdt.internal.ui.text.doctools.doxygen.multi"; //$NON-NLS-1$
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public static final String DOXYGEN_TAG_RECOGNIZED= PreferenceConstants.DOXYGEN_TAG_COLOR;
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link PreferenceConstants#DOXYGEN_SINGLE_LINE_COLOR} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public static final String DOXYGEN_SINGLE_TOKEN= PreferenceConstants.DOXYGEN_SINGLE_LINE_COLOR;
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link PreferenceConstants#DOXYGEN_MULTI_LINE_COLOR} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public static final String DOXYGEN_MULTI_TOKEN= PreferenceConstants.DOXYGEN_MULTI_LINE_COLOR;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The tags which are understood by default by the doxygen tool.
|
* @return The tags which are understood by default by the doxygen tool.
|
||||||
*/
|
*/
|
||||||
public static GenericDocTag[] getDoxygenTags() {
|
public static GenericDocTag[] getDoxygenTags() {
|
||||||
if(fTags==null) {
|
if(fTags==null) {
|
||||||
|
InputStream is = null;
|
||||||
try {
|
try {
|
||||||
List<GenericDocTag> temp= new ArrayList<GenericDocTag>();
|
List<GenericDocTag> temp= new ArrayList<GenericDocTag>();
|
||||||
InputStream is= FileLocator.openStream(CUIPlugin.getDefault().getBundle(), TAGS_CSV, false);
|
is= FileLocator.openStream(CUIPlugin.getDefault().getBundle(), TAGS_CSV, false);
|
||||||
BufferedReader br= new BufferedReader(new InputStreamReader(is));
|
BufferedReader br= new BufferedReader(new InputStreamReader(is));
|
||||||
StringBuffer content= new StringBuffer();
|
StringBuilder content= new StringBuilder(2000);
|
||||||
for(String line= br.readLine(); line!=null; line= br.readLine()) {
|
for(String line= br.readLine(); line!=null; line= br.readLine()) {
|
||||||
content.append(line+"\n"); //$NON-NLS-1$
|
content.append(line).append('\n');
|
||||||
}
|
}
|
||||||
String[] values= (content.toString()+"dummy-for-split").split("(\\s)*,(\\s)*"); //$NON-NLS-1$ //$NON-NLS-2$
|
content.append("dummy-for-split"); //$NON-NLS-1$
|
||||||
|
String[] values= content.toString().split("(\\s)*,(\\s)*"); //$NON-NLS-1$
|
||||||
|
|
||||||
for(int i=0; i+1<values.length; i+=2) {
|
for(int i=0; i+1<values.length; i+=2) {
|
||||||
temp.add(new GenericDocTag(values[i], values[i+1]));
|
temp.add(new GenericDocTag(values[i], values[i+1]));
|
||||||
|
@ -63,6 +74,12 @@ public class DoxygenHelper extends AbstractPreferenceInitializer {
|
||||||
} catch(IOException ioe) {
|
} catch(IOException ioe) {
|
||||||
fTags= new GenericDocTag[0];
|
fTags= new GenericDocTag[0];
|
||||||
CUIPlugin.log(ioe);
|
CUIPlugin.log(ioe);
|
||||||
|
} finally {
|
||||||
|
if (is != null) {
|
||||||
|
try {
|
||||||
|
is.close();
|
||||||
|
} catch (IOException exc) {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fTags;
|
return fTags;
|
||||||
|
@ -73,9 +90,6 @@ public class DoxygenHelper extends AbstractPreferenceInitializer {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initializeDefaultPreferences() {
|
public void initializeDefaultPreferences() {
|
||||||
IPreferenceStore cuis= CUIPlugin.getDefault().getPreferenceStore();
|
// doxygen colors are now initialized in PreferenceConstants
|
||||||
PreferenceConverter.setDefault(cuis, DoxygenHelper.DOXYGEN_MULTI_TOKEN, new RGB(63, 95, 191));
|
|
||||||
PreferenceConverter.setDefault(cuis, DoxygenHelper.DOXYGEN_SINGLE_TOKEN, new RGB(63, 95, 191));
|
|
||||||
PreferenceConverter.setDefault(cuis, DoxygenHelper.DOXYGEN_TAG_RECOGNIZED, new RGB(127, 159, 191));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008 Symbian Software Systems and others.
|
* Copyright (c) 2008, 2011 Symbian Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Andrew Ferguson (Symbian) - Initial implementation
|
* Andrew Ferguson (Symbian) - Initial implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.ui.text.doctools.doxygen;
|
package org.eclipse.cdt.ui.text.doctools.doxygen;
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import org.eclipse.jface.text.IAutoEditStrategy;
|
||||||
import org.eclipse.jface.text.IDocument;
|
import org.eclipse.jface.text.IDocument;
|
||||||
|
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
import org.eclipse.cdt.ui.PreferenceConstants;
|
||||||
import org.eclipse.cdt.ui.text.doctools.IDocCommentViewerConfiguration;
|
import org.eclipse.cdt.ui.text.doctools.IDocCommentViewerConfiguration;
|
||||||
import org.eclipse.cdt.ui.text.doctools.generic.AbstractGenericTagDocCommentViewerConfiguration;
|
import org.eclipse.cdt.ui.text.doctools.generic.AbstractGenericTagDocCommentViewerConfiguration;
|
||||||
import org.eclipse.cdt.ui.text.doctools.generic.GenericDocTag;
|
import org.eclipse.cdt.ui.text.doctools.generic.GenericDocTag;
|
||||||
|
@ -29,7 +30,7 @@ public class DoxygenMultilineConfiguration extends AbstractGenericTagDocCommentV
|
||||||
* Default constructor
|
* Default constructor
|
||||||
*/
|
*/
|
||||||
public DoxygenMultilineConfiguration() {
|
public DoxygenMultilineConfiguration() {
|
||||||
super(DoxygenHelper.getDoxygenTags(), new char[] {'@','\\'}, DoxygenHelper.DOXYGEN_MULTI_TOKEN, DoxygenHelper.DOXYGEN_TAG_RECOGNIZED);
|
super(DoxygenHelper.getDoxygenTags(), new char[] {'@','\\'}, PreferenceConstants.DOXYGEN_MULTI_LINE_COLOR, PreferenceConstants.DOXYGEN_TAG_COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,6 +48,7 @@ public class DoxygenMultilineConfiguration extends AbstractGenericTagDocCommentV
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.ui.text.doctools.IDocCommentViewerConfiguration#createAutoEditStrategy()
|
* @see org.eclipse.cdt.ui.text.doctools.IDocCommentViewerConfiguration#createAutoEditStrategy()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IAutoEditStrategy createAutoEditStrategy() {
|
public IAutoEditStrategy createAutoEditStrategy() {
|
||||||
return new DoxygenMultilineAutoEditStrategy();
|
return new DoxygenMultilineAutoEditStrategy();
|
||||||
}
|
}
|
||||||
|
@ -54,6 +56,7 @@ public class DoxygenMultilineConfiguration extends AbstractGenericTagDocCommentV
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.ui.text.doctools.IDocCommentViewerConfiguration#isDocumentationComment(org.eclipse.jface.text.IDocument, int, int)
|
* @see org.eclipse.cdt.ui.text.doctools.IDocCommentViewerConfiguration#isDocumentationComment(org.eclipse.jface.text.IDocument, int, int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isDocumentationComment(IDocument doc, int offset, int length) {
|
public boolean isDocumentationComment(IDocument doc, int offset, int length) {
|
||||||
try {
|
try {
|
||||||
if(offset+2 < doc.getLength()) {
|
if(offset+2 < doc.getLength()) {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008 Symbian Software Systems and others.
|
* Copyright (c) 2008, 2011 Symbian Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Andrew Ferguson (Symbian) - Initial implementation
|
* Andrew Ferguson (Symbian) - Initial implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.ui.text.doctools.doxygen;
|
package org.eclipse.cdt.ui.text.doctools.doxygen;
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ import org.eclipse.jface.text.IAutoEditStrategy;
|
||||||
import org.eclipse.jface.text.IDocument;
|
import org.eclipse.jface.text.IDocument;
|
||||||
|
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
import org.eclipse.cdt.ui.PreferenceConstants;
|
||||||
import org.eclipse.cdt.ui.text.doctools.IDocCommentViewerConfiguration;
|
import org.eclipse.cdt.ui.text.doctools.IDocCommentViewerConfiguration;
|
||||||
import org.eclipse.cdt.ui.text.doctools.generic.AbstractGenericTagDocCommentViewerConfiguration;
|
import org.eclipse.cdt.ui.text.doctools.generic.AbstractGenericTagDocCommentViewerConfiguration;
|
||||||
import org.eclipse.cdt.ui.text.doctools.generic.GenericDocTag;
|
import org.eclipse.cdt.ui.text.doctools.generic.GenericDocTag;
|
||||||
|
@ -30,7 +31,7 @@ public class DoxygenSingleConfiguration extends AbstractGenericTagDocCommentView
|
||||||
* Default constructor
|
* Default constructor
|
||||||
*/
|
*/
|
||||||
public DoxygenSingleConfiguration() {
|
public DoxygenSingleConfiguration() {
|
||||||
super(DoxygenHelper.getDoxygenTags(), new char[] {'@','\\'}, DoxygenHelper.DOXYGEN_SINGLE_TOKEN, DoxygenHelper.DOXYGEN_TAG_RECOGNIZED);
|
super(DoxygenHelper.getDoxygenTags(), new char[] {'@','\\'}, PreferenceConstants.DOXYGEN_SINGLE_LINE_COLOR, PreferenceConstants.DOXYGEN_TAG_COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,6 +48,7 @@ public class DoxygenSingleConfiguration extends AbstractGenericTagDocCommentView
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.ui.text.doctools.IDocCommentViewerConfiguration#createAutoEditStrategy()
|
* @see org.eclipse.cdt.ui.text.doctools.IDocCommentViewerConfiguration#createAutoEditStrategy()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IAutoEditStrategy createAutoEditStrategy() {
|
public IAutoEditStrategy createAutoEditStrategy() {
|
||||||
return new DefaultIndentLineAutoEditStrategy();
|
return new DefaultIndentLineAutoEditStrategy();
|
||||||
}
|
}
|
||||||
|
@ -54,6 +56,7 @@ public class DoxygenSingleConfiguration extends AbstractGenericTagDocCommentView
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.ui.text.doctools.IDocCommentViewerConfiguration#isDocumentationComment(org.eclipse.jface.text.IDocument, int, int)
|
* @see org.eclipse.cdt.ui.text.doctools.IDocCommentViewerConfiguration#isDocumentationComment(org.eclipse.jface.text.IDocument, int, int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isDocumentationComment(IDocument doc, int offset, int length) {
|
public boolean isDocumentationComment(IDocument doc, int offset, int length) {
|
||||||
try {
|
try {
|
||||||
if(offset+2 < doc.getLength()) {
|
if(offset+2 < doc.getLength()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue