From 1d3da89cf06a7a207d71c7b5decdc3da1c55170e Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Wed, 12 Dec 2007 13:34:28 +0000 Subject: [PATCH] Fix for 194312: Hover Background Color --- core/org.eclipse.cdt.ui/plugin.xml | 47 ++- .../cdt/internal/ui/ICThemeConstants.java | 11 + .../ui/preferences/CEditorPreferencePage.java | 76 ++-- .../ui/preferences/PreferencesMessages.java | 15 +- .../PreferencesMessages.properties | 1 + .../hover/SourceViewerInformationControl.java | 147 ++++--- .../ContentAssistPreference.java | 28 +- .../eclipse/cdt/ui/PreferenceConstants.java | 368 ++++++++++-------- 8 files changed, 415 insertions(+), 278 deletions(-) diff --git a/core/org.eclipse.cdt.ui/plugin.xml b/core/org.eclipse.cdt.ui/plugin.xml index cb510b5cc02..22a955db0a5 100644 --- a/core/org.eclipse.cdt.ui/plugin.xml +++ b/core/org.eclipse.cdt.ui/plugin.xml @@ -572,8 +572,8 @@ contentTypeId="org.eclipse.cdt.core.binaryFile"> - + @@ -614,8 +614,51 @@ %asmCompareFontDefiniton.description - + + + + + + + + + + + + + + + + + + + IInformationControl. - * Displays information in a source viewer. - * + * Source viewer based implementation of IInformationControl. + * Displays information in a source viewer. + * */ public class SourceViewerInformationControl implements IInformationControl, IInformationControlExtension, DisposeListener { - + /** Border thickness in pixels. */ private static final int BORDER= 1; /** The control's shell */ @@ -61,22 +64,22 @@ public class SourceViewerInformationControl implements IInformationControl, IInf /** The control's text widget */ private StyledText fText; /** The control's source viewer */ - private SourceViewer fViewer; + private SourceViewer fViewer; /** * The optional status field. - * + * * @since 3.0 */ - private Label fStatusField; + private Label fStatusField; /** * The separator for the optional status field. - * + * * @since 3.0 */ - private Label fSeparator; + private Label fSeparator; /** * The font of the optional status text label. - * + * * @since 3.0 */ private Font fStatusTextFont; @@ -90,12 +93,15 @@ public class SourceViewerInformationControl implements IInformationControl, IInf * @since 4.0 */ private int fMaxHeight= SWT.DEFAULT; - + + private Color fBackgroundColor; + private boolean fIsSystemBackgroundColor= true; + /** * Creates a default information control with the given shell as parent. The given * information presenter is used to process the information to be displayed. The given * styles are applied to the created styled text widget. - * + * * @param parent the parent shell * @param shellStyle the additional styles for the shell * @param style the additional styles for the styled text widget @@ -103,12 +109,12 @@ public class SourceViewerInformationControl implements IInformationControl, IInf public SourceViewerInformationControl(Shell parent, int shellStyle, int style) { this(parent, shellStyle, style, null); } - + /** * Creates a default information control with the given shell as parent. The given * information presenter is used to process the information to be displayed. The given * styles are applied to the created styled text widget. - * + * * @param parent the parent shell * @param shellStyle the additional styles for the shell * @param style the additional styles for the styled text widget @@ -121,9 +127,11 @@ public class SourceViewerInformationControl implements IInformationControl, IInf GridData gd; fShell= new Shell(parent, SWT.NO_FOCUS | SWT.ON_TOP | shellStyle); - Display display= fShell.getDisplay(); + Display display= fShell.getDisplay(); fShell.setBackground(display.getSystemColor(SWT.COLOR_BLACK)); + initializeColors(); + Composite composite= fShell; layout= new GridLayout(1, false); int border= ((shellStyle & SWT.NO_TRIM) == 0) ? 0 : BORDER; @@ -142,31 +150,31 @@ public class SourceViewerInformationControl implements IInformationControl, IInf gd= new GridData(GridData.FILL_BOTH); composite.setLayoutData(gd); composite.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND)); - composite.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND)); - } + composite.setBackground(fBackgroundColor); + } // Source viewer IPreferenceStore store= CUIPlugin.getDefault().getCombinedPreferenceStore(); fViewer= new CSourceViewer(composite, null, null, false, style, store); CTextTools tools= CUIPlugin.getDefault().getTextTools(); - fViewer.configure(new SimpleCSourceViewerConfiguration(tools.getColorManager(), store, null, tools.getDocumentPartitioning(), false)); + fViewer.configure(new SimpleCSourceViewerConfiguration(tools.getColorManager(), store, null, ICPartitions.C_PARTITIONING, false)); fViewer.setEditable(false); - + fText= fViewer.getTextWidget(); gd= new GridData(GridData.BEGINNING | GridData.FILL_BOTH); fText.setLayoutData(gd); fText.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND)); - fText.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND)); + fText.setBackground(fBackgroundColor); initializeFont(); fText.addKeyListener(new KeyListener() { - + public void keyPressed(KeyEvent e) { if (e.character == 0x1B) // ESC fShell.dispose(); } - + public void keyReleased(KeyEvent e) {} }); @@ -191,45 +199,62 @@ public class SourceViewerInformationControl implements IInformationControl, IInf // Regarding the color see bug 41128 fStatusField.setForeground(display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW)); - - fStatusField.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND)); + fStatusField.setBackground(fBackgroundColor); } - + addDisposeListener(this); } + private void initializeColors() { + RGB bgRGB= getHoverBackgroundColorRGB(); + if (bgRGB != null) { + fBackgroundColor= new Color(fShell.getDisplay(), bgRGB); + fIsSystemBackgroundColor= false; + } else { + fBackgroundColor= fShell.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND); + fIsSystemBackgroundColor= true; + } + } + + private RGB getHoverBackgroundColorRGB() { + IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore(); + return store.getBoolean(PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT) + ? null + : PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR); + } + /** * Creates a default information control with the given shell as parent. The given * information presenter is used to process the information to be displayed. The given * styles are applied to the created styled text widget. - * + * * @param parent the parent shell * @param style the additional styles for the styled text widget - */ + */ public SourceViewerInformationControl(Shell parent,int style) { - this(parent, SWT.NO_TRIM, style); + this(parent, SWT.NO_TRIM | SWT.TOOL, style); } - + /** * Creates a default information control with the given shell as parent. The given * information presenter is used to process the information to be displayed. The given * styles are applied to the created styled text widget. - * + * * @param parent the parent shell * @param style the additional styles for the styled text widget * @param statusFieldText the text to be used in the optional status field * or null if the status field should be hidden * @since 3.0 - */ + */ public SourceViewerInformationControl(Shell parent,int style, String statusFieldText) { - this(parent, SWT.NO_TRIM, style, statusFieldText); + this(parent, SWT.NO_TRIM | SWT.TOOL, style, statusFieldText); } /** * Creates a default information control with the given shell as parent. * No information presenter is used to process the information * to be displayed. No additional styles are applied to the styled text widget. - * + * * @param parent the parent shell */ public SourceViewerInformationControl(Shell parent) { @@ -240,7 +265,7 @@ public class SourceViewerInformationControl implements IInformationControl, IInf * Creates a default information control with the given shell as parent. * No information presenter is used to process the information * to be displayed. No additional styles are applied to the styled text widget. - * + * * @param parent the parent shell * @param statusFieldText the text to be used in the optional status field * or null if the status field should be hidden @@ -249,10 +274,10 @@ public class SourceViewerInformationControl implements IInformationControl, IInf public SourceViewerInformationControl(Shell parent, String statusFieldText) { this(parent, SWT.NONE, statusFieldText); } - + /** * Initialize the font to the editor font. - * + * * @since 4.0 */ private void initializeFont() { @@ -279,12 +304,12 @@ public class SourceViewerInformationControl implements IInformationControl, IInf fViewer.setInput(null); return; } - + IDocument doc= new Document(content); CUIPlugin.getDefault().getTextTools().setupCDocument(doc); fViewer.setInput(doc); } - + /* * @see IInformationControl#setVisible(boolean) */ @@ -299,27 +324,29 @@ public class SourceViewerInformationControl implements IInformationControl, IInf public void widgetDisposed(DisposeEvent event) { if (fStatusTextFont != null && !fStatusTextFont.isDisposed()) fStatusTextFont.dispose(); - + fStatusTextFont= null; fShell= null; fText= null; } - + /** * {@inheritDoc} */ public final void dispose() { + if (!fIsSystemBackgroundColor) + fBackgroundColor.dispose(); if (fShell != null && !fShell.isDisposed()) fShell.dispose(); else widgetDisposed(null); } - + /* * @see IInformationControl#setSize(int, int) */ public void setSize(int width, int height) { - + if (fStatusField != null) { GridData gd= (GridData)fViewer.getTextWidget().getLayoutData(); Point statusSize= fStatusField.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); @@ -327,22 +354,18 @@ public class SourceViewerInformationControl implements IInformationControl, IInf gd.heightHint= height - statusSize.y - separatorSize.y; } fShell.setSize(width, height); - + if (fStatusField != null) fShell.pack(true); } - + /* * @see IInformationControl#setLocation(Point) */ public void setLocation(Point location) { - Rectangle trim= fShell.computeTrim(0, 0, 0, 0); - Point textLocation= fText.getLocation(); - location.x += trim.x - textLocation.x; - location.y += trim.y - textLocation.y; - fShell.setLocation(location); + fShell.setLocation(location); } - + /* * @see IInformationControl#setSizeConstraints(int, int) */ @@ -350,7 +373,7 @@ public class SourceViewerInformationControl implements IInformationControl, IInf fMaxWidth= maxWidth; fMaxHeight= maxHeight; } - + /* * @see IInformationControl#computeSizeHint() */ @@ -370,42 +393,42 @@ public class SourceViewerInformationControl implements IInformationControl, IInf return size; } - + /* * @see IInformationControl#addDisposeListener(DisposeListener) */ public void addDisposeListener(DisposeListener listener) { fShell.addDisposeListener(listener); } - + /* * @see IInformationControl#removeDisposeListener(DisposeListener) */ public void removeDisposeListener(DisposeListener listener) { fShell.removeDisposeListener(listener); } - + /* * @see IInformationControl#setForegroundColor(Color) */ public void setForegroundColor(Color foreground) { fText.setForeground(foreground); } - + /* * @see IInformationControl#setBackgroundColor(Color) */ public void setBackgroundColor(Color background) { fText.setBackground(background); } - + /* * @see IInformationControl#isFocusControl() */ public boolean isFocusControl() { return fText.isFocusControl(); } - + /* * @see IInformationControl#setFocus() */ @@ -413,28 +436,28 @@ public class SourceViewerInformationControl implements IInformationControl, IInf fShell.forceFocus(); fText.setFocus(); } - + /* * @see IInformationControl#addFocusListener(FocusListener) */ public void addFocusListener(FocusListener listener) { fText.addFocusListener(listener); } - + /* * @see IInformationControl#removeFocusListener(FocusListener) */ public void removeFocusListener(FocusListener listener) { fText.removeFocusListener(listener); } - + /* * @see IInformationControlExtension#hasContents() */ public boolean hasContents() { return fText.getCharCount() > 0; } - + protected ISourceViewer getViewer() { return fViewer; } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistPreference.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistPreference.java index 0a22ec1a133..169951ef974 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistPreference.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistPreference.java @@ -17,6 +17,8 @@ import org.eclipse.swt.graphics.RGB; import org.eclipse.cdt.internal.ui.text.CTextTools; import org.eclipse.cdt.internal.ui.text.IColorManager; import org.eclipse.cdt.ui.CUIPlugin; +import org.eclipse.cdt.ui.PreferenceConstants; + import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferenceConverter; import org.eclipse.jface.text.IDocument; @@ -35,13 +37,13 @@ public class ContentAssistPreference { /** Preference key for content assist timeout delay (unused) */ public final static String TIMEOUT_DELAY= "content_assist_timeout_delay"; //$NON-NLS-1$ /** Preference key for content assist proposal color */ - public final static String PROPOSALS_FOREGROUND= "content_assist_proposals_foreground"; //$NON-NLS-1$ + public final static String PROPOSALS_FOREGROUND= PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND; /** Preference key for content assist proposal color */ - public final static String PROPOSALS_BACKGROUND= "content_assist_proposals_background"; //$NON-NLS-1$ + public final static String PROPOSALS_BACKGROUND= PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND; /** Preference key for content assist parameters color */ - public final static String PARAMETERS_FOREGROUND= "content_assist_parameters_foreground"; //$NON-NLS-1$ + public final static String PARAMETERS_FOREGROUND= PreferenceConstants.CODEASSIST_PARAMETERS_FOREGROUND; /** Preference key for content assist parameters color */ - public final static String PARAMETERS_BACKGROUND= "content_assist_parameters_background"; //$NON-NLS-1$ + public final static String PARAMETERS_BACKGROUND= PreferenceConstants.CODEASSIST_PARAMETERS_BACKGROUND; /** Preference key for content assist auto insert */ public final static String AUTOINSERT= "content_assist_autoinsert"; //$NON-NLS-1$ /** Preference key for content assist to insert the common prefix */ @@ -104,7 +106,7 @@ public class ContentAssistPreference { // boolean enabled; // enabled= store.getBoolean(SHOW_DOCUMENTED_PROPOSALS); // ccp.restrictProposalsToVisibility(enabled); -// +// // enabled= store.getBoolean(CASE_SENSITIVITY); // ccp.restrictProposalsToMatchingCases(enabled); @@ -112,23 +114,23 @@ public class ContentAssistPreference { // ccp.orderProposalsAlphabetically(enabled); // enabled= store.getBoolean(ADD_INCLUDE); -// ccp.allowAddingIncludes(enabled); +// ccp.allowAddingIncludes(enabled); } /** * Configure the given content assistant from the given store. */ - public static void configure(ContentAssistant assistant, IPreferenceStore store) { + public static void configure(ContentAssistant assistant, IPreferenceStore store) { CTextTools textTools= CUIPlugin.getDefault().getTextTools(); - IColorManager manager= textTools.getColorManager(); + IColorManager manager= textTools.getColorManager(); boolean enabledDot= store.getBoolean(AUTOACTIVATION_TRIGGERS_DOT); boolean enabledArrow= store.getBoolean(AUTOACTIVATION_TRIGGERS_ARROW); boolean enabledDoubleColon= store.getBoolean(AUTOACTIVATION_TRIGGERS_DOUBLECOLON); boolean enabled = ((enabledDot) || ( enabledArrow ) || (enabledDoubleColon )); - assistant.enableAutoActivation(enabled); + assistant.enableAutoActivation(enabled); int delay= store.getInt(AUTOACTIVATION_DELAY); assistant.setAutoActivationDelay(delay); @@ -162,7 +164,7 @@ public class ContentAssistPreference { if (ccp == null) return; - if ( (AUTOACTIVATION_TRIGGERS_DOT.equals(key)) + if ( (AUTOACTIVATION_TRIGGERS_DOT.equals(key)) || (AUTOACTIVATION_TRIGGERS_ARROW.equals(key)) || (AUTOACTIVATION_TRIGGERS_DOUBLECOLON.equals(key)) ){ boolean useDotAsTrigger = store.getBoolean(AUTOACTIVATION_TRIGGERS_DOT); @@ -205,14 +207,14 @@ public class ContentAssistPreference { String p= event.getProperty(); - if ((AUTOACTIVATION_TRIGGERS_DOT.equals(p)) + if ((AUTOACTIVATION_TRIGGERS_DOT.equals(p)) || (AUTOACTIVATION_TRIGGERS_ARROW.equals(p)) || (AUTOACTIVATION_TRIGGERS_DOUBLECOLON.equals(p))){ boolean enabledDot= store.getBoolean(AUTOACTIVATION_TRIGGERS_DOT); boolean enabledArrow= store.getBoolean(AUTOACTIVATION_TRIGGERS_ARROW); boolean enabledDoubleColon= store.getBoolean(AUTOACTIVATION_TRIGGERS_DOUBLECOLON); boolean enabled = ((enabledDot) || ( enabledArrow ) || (enabledDoubleColon )); - assistant.enableAutoActivation(enabled); + assistant.enableAutoActivation(enabled); } else if (AUTOACTIVATION_DELAY.equals(p)) { int delay= store.getInt(AUTOACTIVATION_DELAY); assistant.setAutoActivationDelay(delay); @@ -236,7 +238,7 @@ public class ContentAssistPreference { } else if (PREFIX_COMPLETION.equals(p)) { boolean enabled= store.getBoolean(PREFIX_COMPLETION); assistant.enablePrefixCompletion(enabled); - } + } changeCProcessor(assistant, store, p); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/PreferenceConstants.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/PreferenceConstants.java index bfa35565f58..28d55a689b5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/PreferenceConstants.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/PreferenceConstants.java @@ -35,40 +35,40 @@ import org.eclipse.cdt.internal.ui.text.spelling.SpellCheckEngine; /** * Preference constants used in the CDT-UI preference store. Clients should only read the - * CDT-UI preference store using these values. Clients are not allowed to modify the + * CDT-UI preference store using these values. Clients are not allowed to modify the * preference store programmatically. - * + * * @since 2.0 */ public class PreferenceConstants { - + private PreferenceConstants() { } - + /** * Preference key suffix for bold text style preference keys. - * + * * @since 4.0 */ public static final String EDITOR_BOLD_SUFFIX= "_bold"; //$NON-NLS-1$ /** * Preference key suffix for italic text style preference keys. - * + * * @since 4.0 */ public static final String EDITOR_ITALIC_SUFFIX= "_italic"; //$NON-NLS-1$ - + /** * Preference key suffix for strikethrough text style preference keys. - * + * * @since 4.0 */ public static final String EDITOR_STRIKETHROUGH_SUFFIX= "_strikethrough"; //$NON-NLS-1$ - + /** * Preference key suffix for underline text style preference keys. - * + * * @since 4.0 */ public static final String EDITOR_UNDERLINE_SUFFIX= "_underline"; //$NON-NLS-1$ @@ -79,7 +79,7 @@ public class PreferenceConstants { * Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 4.0 @@ -92,10 +92,10 @@ public class PreferenceConstants { * Value is of type Boolean. If true multi-line comments are rendered * in bold. If false the are rendered using no font style attribute. *

- * + * * @since 4.0 */ - public final static String EDITOR_MULTI_LINE_COMMENT_BOLD= ICColorConstants.C_MULTI_LINE_COMMENT + EDITOR_BOLD_SUFFIX; + public final static String EDITOR_MULTI_LINE_COMMENT_BOLD= ICColorConstants.C_MULTI_LINE_COMMENT + EDITOR_BOLD_SUFFIX; /** * A named preference that controls whether multi-line comments are rendered in italic. @@ -103,18 +103,18 @@ public class PreferenceConstants { * Value is of type Boolean. If true multi-line comments are rendered * in italic. If false the are rendered using no italic font style attribute. *

- * + * * @since 4.0 */ public final static String EDITOR_MULTI_LINE_COMMENT_ITALIC= ICColorConstants.C_MULTI_LINE_COMMENT + EDITOR_ITALIC_SUFFIX; - + /** * A named preference that holds the color used to render single line comments. *

* Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 4.0 @@ -127,10 +127,10 @@ public class PreferenceConstants { * Value is of type Boolean. If true single line comments are rendered * in bold. If false the are rendered using no font style attribute. *

- * + * * @since 4.0 */ - public final static String EDITOR_SINGLE_LINE_COMMENT_BOLD= ICColorConstants.C_SINGLE_LINE_COMMENT + EDITOR_BOLD_SUFFIX; + public final static String EDITOR_SINGLE_LINE_COMMENT_BOLD= ICColorConstants.C_SINGLE_LINE_COMMENT + EDITOR_BOLD_SUFFIX; /** * A named preference that controls whether single line comments are rendered in italic. @@ -138,18 +138,18 @@ public class PreferenceConstants { * Value is of type Boolean. If true single line comments are rendered * in italic. If false the are rendered using no italic font style attribute. *

- * + * * @since 4.0 */ public final static String EDITOR_SINGLE_LINE_COMMENT_ITALIC= ICColorConstants.C_SINGLE_LINE_COMMENT + EDITOR_ITALIC_SUFFIX; - + /** * A named preference that holds the color used to render C/C++ keywords. *

* Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 4.0 @@ -161,7 +161,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_KEYWORD_BOLD= ICColorConstants.C_KEYWORD + EDITOR_BOLD_SUFFIX; @@ -171,7 +171,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_KEYWORD_ITALIC= ICColorConstants.C_KEYWORD + EDITOR_ITALIC_SUFFIX; @@ -182,7 +182,7 @@ public class PreferenceConstants { * Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 4.0 @@ -194,7 +194,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_PP_DIRECTIVE_BOLD= ICColorConstants.PP_DIRECTIVE + EDITOR_BOLD_SUFFIX; @@ -204,7 +204,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_PP_DIRECTIVE_ITALIC= ICColorConstants.PP_DIRECTIVE + EDITOR_ITALIC_SUFFIX; @@ -215,19 +215,19 @@ public class PreferenceConstants { * Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 4.0 */ - public final static String EDITOR_PP_HEADER_COLOR= ICColorConstants.PP_HEADER; + public final static String EDITOR_PP_HEADER_COLOR= ICColorConstants.PP_HEADER; /** * A named preference that controls whether headers are rendered in bold. *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_PP_HEADER_BOLD= ICColorConstants.PP_HEADER + EDITOR_BOLD_SUFFIX; @@ -237,18 +237,18 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_PP_HEADER_ITALIC= ICColorConstants.PP_HEADER + EDITOR_ITALIC_SUFFIX; - + /** * A named preference that holds the color used to render preprocessor text. *

* Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 4.0 @@ -260,7 +260,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_PP_DEFAULT_BOLD= ICColorConstants.PP_DEFAULT + EDITOR_BOLD_SUFFIX; @@ -270,7 +270,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_PP_DEFAULT_ITALIC= ICColorConstants.PP_DEFAULT + EDITOR_ITALIC_SUFFIX; @@ -281,7 +281,7 @@ public class PreferenceConstants { * Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 4.0 @@ -293,7 +293,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_BUILTIN_TYPE_BOLD= ICColorConstants.C_TYPE + EDITOR_BOLD_SUFFIX; @@ -303,18 +303,18 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_BUILTIN_TYPE_ITALIC= ICColorConstants.C_TYPE + EDITOR_ITALIC_SUFFIX; - + /** * A named preference that holds the color used to render string constants. *

* Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 4.0 @@ -326,7 +326,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_STRING_BOLD= ICColorConstants.C_STRING + EDITOR_BOLD_SUFFIX; @@ -336,63 +336,63 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_STRING_ITALIC= ICColorConstants.C_STRING + EDITOR_ITALIC_SUFFIX; - + /** * A named preference that holds the color used to render operators. *

* Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 4.0 */ - public final static String EDITOR_C_OPERATOR_COLOR= ICColorConstants.C_OPERATOR; - + public final static String EDITOR_C_OPERATOR_COLOR= ICColorConstants.C_OPERATOR; + /** * A named preference that controls whether operators are rendered in bold. *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_OPERATOR_BOLD= ICColorConstants.C_OPERATOR + EDITOR_BOLD_SUFFIX; - + /** * A named preference that controls whether operators are rendered in italic. *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_OPERATOR_ITALIC= ICColorConstants.C_OPERATOR + EDITOR_ITALIC_SUFFIX; - + /** * A named preference that holds the color used to render numbers. *

* Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 4.0 */ - public final static String EDITOR_C_NUMBER_COLOR= ICColorConstants.C_NUMBER; + public final static String EDITOR_C_NUMBER_COLOR= ICColorConstants.C_NUMBER; /** * A named preference that controls whether number are rendered in bold. *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_NUMBER_BOLD= ICColorConstants.C_NUMBER + EDITOR_BOLD_SUFFIX; @@ -402,30 +402,30 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_NUMBER_ITALIC= ICColorConstants.C_NUMBER + EDITOR_ITALIC_SUFFIX; - + /** * A named preference that holds the color used to render braces. *

* Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 4.0 */ - public final static String EDITOR_C_BRACES_COLOR= ICColorConstants.C_BRACES; + public final static String EDITOR_C_BRACES_COLOR= ICColorConstants.C_BRACES; /** * A named preference that controls whether braces are rendered in bold. *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_BRACES_BOLD= ICColorConstants.C_BRACES + EDITOR_BOLD_SUFFIX; @@ -435,18 +435,18 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_BRACES_ITALIC= ICColorConstants.C_BRACES + EDITOR_ITALIC_SUFFIX; - + /** * A named preference that holds the color used to render C/C++ default text. *

* Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 4.0 @@ -458,7 +458,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_DEFAULT_BOLD= ICColorConstants.C_DEFAULT + EDITOR_BOLD_SUFFIX; @@ -468,7 +468,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public final static String EDITOR_C_DEFAULT_ITALIC= ICColorConstants.C_DEFAULT + EDITOR_ITALIC_SUFFIX; @@ -479,7 +479,7 @@ public class PreferenceConstants { * Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 5.0 @@ -491,7 +491,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 5.0 */ public final static String EDITOR_ASM_LABEL_BOLD= ICColorConstants.ASM_LABEL + EDITOR_BOLD_SUFFIX; @@ -501,7 +501,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 5.0 */ public final static String EDITOR_ASM_LABEL_ITALIC= ICColorConstants.ASM_LABEL + EDITOR_ITALIC_SUFFIX; @@ -512,7 +512,7 @@ public class PreferenceConstants { * Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 5.0 @@ -524,7 +524,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 5.0 */ public final static String EDITOR_ASM_DIRECTIVE_BOLD= ICColorConstants.ASM_DIRECTIVE + EDITOR_BOLD_SUFFIX; @@ -534,15 +534,15 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 5.0 */ public final static String EDITOR_ASM_DIRECTIVE_ITALIC= ICColorConstants.ASM_DIRECTIVE + EDITOR_ITALIC_SUFFIX; /** - * The symbolic font name for the C/C++ editor text font + * The symbolic font name for the C/C++ editor text font * (value "org.eclipse.cdt.ui.editors.textfont"). - * + * * @since 4.0 */ public final static String EDITOR_TEXT_FONT= "org.eclipse.cdt.ui.editors.textfont"; //$NON-NLS-1$ @@ -578,14 +578,14 @@ public class PreferenceConstants { *

*/ public static final String EDITOR_SHOW_SEGMENTS= "org.eclipse.cdt.ui.editor.showSegments"; //$NON-NLS-1$ - + /** * A named preference that holds the color used to render task tags. *

* Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter */ @@ -598,7 +598,7 @@ public class PreferenceConstants { *

*/ public final static String EDITOR_TASK_TAG_BOLD= ICColorConstants.TASK_TAG + EDITOR_BOLD_SUFFIX; - + /** * A named preference that controls whether task tags are rendered in italic. *

@@ -633,7 +633,7 @@ public class PreferenceConstants { * A named preference that defines the key for the hover modifier state masks. * The value is only used if the value of EDITOR_TEXT_HOVER_MODIFIERS * cannot be resolved to valid SWT modifier bits. - * + * * @see #EDITOR_TEXT_HOVER_MODIFIERS */ public static final String EDITOR_TEXT_HOVER_MODIFIER_MASKS= "hoverModifierMasks"; //$NON-NLS-1$ @@ -732,16 +732,16 @@ public class PreferenceConstants { */ public static final String OUTLINE_GROUP_NAMESPACES= "org.eclipse.cdt.ui.outline.groupnamespaces"; //$NON-NLS-1$ - + /** - * A named preference that controls whether the outline view + * A named preference that controls whether the outline view * selection should stay in sync with with the element at the current cursor position. *

* Value is of type Boolean. *

*/ public static final String OUTLINE_LINK_TO_EDITOR = "org.eclipse.cdt.ui.outline.linktoeditor"; //$NON-NLS-1$ - + /** * A named preference that controls if the CView. *

@@ -756,7 +756,7 @@ public class PreferenceConstants { *

* Value is of type String, a "\0"-separated list of identifiers. *

- * + * * @since 4.0 */ public static final String CODEASSIST_EXCLUDED_CATEGORIES= "content_assist_disabled_computers"; //$NON-NLS-1$ @@ -766,7 +766,7 @@ public class PreferenceConstants { *

* Value is of type String, a "\0"-separated list of identifiers. *

- * + * * @since 4.0 */ public static final String CODEASSIST_CATEGORY_ORDER= "content_assist_category_order"; //$NON-NLS-1$ @@ -776,25 +776,25 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * */ public static final String EDITOR_FOLDING_ENABLED= "editor_folding_enabled"; //$NON-NLS-1$ - + /** * A named preference that stores the configured folding provider. *

* Value is of type String. *

- * + * */ public static final String EDITOR_FOLDING_PROVIDER= "editor_folding_provider"; //$NON-NLS-1$ - + /** * A named preference that stores the value for Structure folding for the default folding provider. *

* Value is of type Boolean. *

- * + * * @since 3.0 */ public static final String EDITOR_FOLDING_STRUCTURES= "editor_folding_default_structures"; //$NON-NLS-1$ @@ -804,7 +804,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 3.0 */ public static final String EDITOR_FOLDING_FUNCTIONS= "editor_folding_default_functions"; //$NON-NLS-1$ @@ -814,7 +814,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 3.0 */ public static final String EDITOR_FOLDING_METHODS= "editor_folding_default_methods"; //$NON-NLS-1$ @@ -824,7 +824,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 3.0 */ public static final String EDITOR_FOLDING_MACROS= "editor_folding_default_macros"; //$NON-NLS-1$ @@ -834,7 +834,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public static final String EDITOR_FOLDING_COMMENTS= "editor_folding_default_comments"; //$NON-NLS-1$ @@ -844,7 +844,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public static final String EDITOR_FOLDING_HEADERS= "editor_folding_default_headers"; //$NON-NLS-1$ @@ -854,7 +854,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public static final String EDITOR_FOLDING_INACTIVE_CODE= "editor_folding_default_inactive"; //$NON-NLS-1$ @@ -864,11 +864,11 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 4.0 */ public static final String EDITOR_FOLDING_PREPROCESSOR_BRANCHES_ENABLED= "editor_folding_preprocessor_enabled"; //$NON-NLS-1$ - + /** * A named preference that controls if templates are formatted when applied. *

@@ -876,7 +876,7 @@ public class PreferenceConstants { *

* * @since 2.1 - */ + */ public static final String TEMPLATES_USE_CODEFORMATTER= "org.eclipse.cdt.ui.text.templates.format"; //$NON-NLS-1$ /** @@ -886,15 +886,15 @@ public class PreferenceConstants { *

* * @since 4.0 - */ + */ public static final String FORMATTER_PROFILE = "formatter_profile"; //$NON-NLS-1$ - /** + /** * Preference key for whether to ensure a newline at the end of files when saving. - * + * * @since 4.0 */ - public final static String ENSURE_NEWLINE_AT_EOF = "ensureNewlineAtEOF"; //$NON-NLS-1$ + public final static String ENSURE_NEWLINE_AT_EOF = "ensureNewlineAtEOF"; //$NON-NLS-1$ /** * A named preference that defines whether the hint to make hover sticky should be shown. @@ -906,18 +906,18 @@ public class PreferenceConstants { /** * A named preference prefix for semantic highlighting preferences. - * + * * @since 4.0 */ public static final String EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX="semanticHighlighting."; //$NON-NLS-1$ - + /** * A named preference suffix that controls a semantic highlighting's color. *

* Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter * @since 4.0 @@ -929,7 +929,7 @@ public class PreferenceConstants { *

* Value is of type Boolean: true if bold. *

- * + * * @since 4.0 */ public static final String EDITOR_SEMANTIC_HIGHLIGHTING_BOLD_SUFFIX=".bold"; //$NON-NLS-1$ @@ -939,27 +939,27 @@ public class PreferenceConstants { *

* Value is of type Boolean: true if italic. *

- * + * * @since 4.0 */ public static final String EDITOR_SEMANTIC_HIGHLIGHTING_ITALIC_SUFFIX=".italic"; //$NON-NLS-1$ - + /** * A named preference suffix that controls if semantic highlighting has the text attribute strikethrough. *

* Value is of type Boolean: true if strikethrough. *

- * + * * @since 4.0 */ public static final String EDITOR_SEMANTIC_HIGHLIGHTING_STRIKETHROUGH_SUFFIX=".strikethrough"; //$NON-NLS-1$ - + /** * A named preference suffix that controls if semantic highlighting has the text attribute underline. *

* Value is of type Boolean: true if underline. *

- * + * * @since 4.0 */ public static final String EDITOR_SEMANTIC_HIGHLIGHTING_UNDERLINE_SUFFIX=".underline"; //$NON-NLS-1$ @@ -969,7 +969,7 @@ public class PreferenceConstants { *

* Value is of type Boolean: true if enabled. *

- * + * * @since 4.0 */ public static final String EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED_SUFFIX=".enabled"; //$NON-NLS-1$ @@ -979,7 +979,7 @@ public class PreferenceConstants { *

* Value is of type Boolean: true if enabled. *

- * + * * @since 4.0 */ public static final String EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED= "semanticHighlighting.enabled"; //$NON-NLS-1$ @@ -990,7 +990,7 @@ public class PreferenceConstants { * Value is of type Boolean: if true light bulbs are shown * for quick assists. *

- * + * * @since 5.0 */ public static final String EDITOR_QUICKASSIST_LIGHTBULB="org.eclipse.cdt.quickassist.lightbulb"; //$NON-NLS-1$ @@ -1001,10 +1001,10 @@ public class PreferenceConstants { * Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter - * + * * @since 5.0 */ public final static String CODEASSIST_PROPOSALS_BACKGROUND= "content_assist_proposals_background"; //$NON-NLS-1$ @@ -1014,13 +1014,41 @@ public class PreferenceConstants { * Value is of type String. A RGB color value encoded as a string * using class PreferenceConverter *

- * + * * @see org.eclipse.jface.resource.StringConverter * @see org.eclipse.jface.preference.PreferenceConverter - * + * * @since 5.0 */ public final static String CODEASSIST_PROPOSALS_FOREGROUND= "content_assist_proposals_foreground"; //$NON-NLS-1$ + + /** + * A named preference that holds the background color used for parameter hints. + *

+ * Value is of type String. A RGB color value encoded as a string + * using class PreferenceConverter + *

+ * + * @see org.eclipse.jface.resource.StringConverter + * @see org.eclipse.jface.preference.PreferenceConverter + * + * @since 5.0 + */ + public final static String CODEASSIST_PARAMETERS_BACKGROUND= "content_assist_parameters_background"; //$NON-NLS-1$ + + /** + * A named preference that holds the foreground color used in the code assist selection dialog. + *

+ * Value is of type String. A RGB color value encoded as a string + * using class PreferenceConverter + *

+ * + * @see org.eclipse.jface.resource.StringConverter + * @see org.eclipse.jface.preference.PreferenceConverter + * + * @since 5.0 + */ + public final static String CODEASSIST_PARAMETERS_FOREGROUND= "content_assist_parameters_foreground"; //$NON-NLS-1$ /** * A named preference that controls whether words containing digits should @@ -1028,7 +1056,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 5.0 */ public final static String SPELLING_IGNORE_DIGITS= "spelling_ignore_digits"; //$NON-NLS-1$ @@ -1039,7 +1067,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 5.0 */ public final static String SPELLING_IGNORE_MIXED= "spelling_ignore_mixed"; //$NON-NLS-1$ @@ -1050,7 +1078,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 5.0 */ public final static String SPELLING_IGNORE_SENTENCE= "spelling_ignore_sentence"; //$NON-NLS-1$ @@ -1061,7 +1089,7 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 5.0 */ public final static String SPELLING_IGNORE_UPPER= "spelling_ignore_upper"; //$NON-NLS-1$ @@ -1072,40 +1100,40 @@ public class PreferenceConstants { *

* Value is of type Boolean. *

- * + * * @since 5.0 */ public final static String SPELLING_IGNORE_URLS= "spelling_ignore_urls"; //$NON-NLS-1$ - + /** * A named preference that controls whether single letters * should be ignored during spell checking. *

* Value is of type Boolean. *

- * + * * @since 5.0 */ public final static String SPELLING_IGNORE_SINGLE_LETTERS= "spelling_ignore_single_letters"; //$NON-NLS-1$ - + /** * A named preference that controls whether string literals * should be ignored during spell checking. *

* Value is of type Boolean. *

- * + * * @since 5.0 */ public final static String SPELLING_IGNORE_STRING_LITERALS= "spelling_ignore_string_literals"; //$NON-NLS-1$ - + /** * A named preference that controls whether non-letters at word boundaries * should be ignored during spell checking. *

* Value is of type Boolean. *

- * + * * @since 5.0 */ public final static String SPELLING_IGNORE_NON_LETTERS= "spelling_ignore_non_letters"; //$NON-NLS-1$ @@ -1115,7 +1143,7 @@ public class PreferenceConstants { *

* Value is of type String. *

- * + * * @since 5.0 */ public final static String SPELLING_LOCALE= "spelling_locale"; //$NON-NLS-1$ @@ -1126,7 +1154,7 @@ public class PreferenceConstants { *

* Value is of type Integer. *

- * + * * @since 5.0 */ public final static String SPELLING_PROPOSAL_THRESHOLD= "spelling_proposal_threshold"; //$NON-NLS-1$ @@ -1137,7 +1165,7 @@ public class PreferenceConstants { *

* Value is of type Integer. *

- * + * * @since 5.0 */ public final static String SPELLING_PROBLEMS_THRESHOLD= "spelling_problems_threshold"; //$NON-NLS-1$ @@ -1147,30 +1175,30 @@ public class PreferenceConstants { *

* Value is of type Integer. *

- * + * * @since 5.0 */ public final static String SPELLING_USER_DICTIONARY= "spelling_user_dictionary"; //$NON-NLS-1$ - + /** * A named preference that specifies encoding of the workspace user dictionary. *

* Value is of type String. *

- * + * * @since 5.0 */ public final static String SPELLING_USER_DICTIONARY_ENCODING= "spelling_user_dictionary_encoding"; //$NON-NLS-1$ /** * A named preference that specifies whether spelling dictionaries are available to content assist. - * + * * Note: This is currently not supported because the spelling engine * cannot return word proposals but only correction proposals. *

* Value is of type Boolean. *

- * + * * @since 5.0 */ public final static String SPELLING_ENABLE_CONTENTASSIST= "spelling_enable_contentassist"; //$NON-NLS-1$ @@ -1185,9 +1213,36 @@ public class PreferenceConstants { */ public static final String CODEGEN_ADD_COMMENTS= "org.eclipse.cdt.ui.add_comments"; //$NON-NLS-1$ + /** + * A named preference that holds the source hover background color. + *

+ * Value is of type String. A RGB color value encoded as a string + * using class PreferenceConverter + *

+ * + * @see org.eclipse.jface.resource.StringConverter + * @see org.eclipse.jface.preference.PreferenceConverter + * @since 5.0 + */ + public final static String EDITOR_SOURCE_HOVER_BACKGROUND_COLOR= "sourceHoverBackgroundColor"; //$NON-NLS-1$ + + /** + * A named preference that tells whether to use the system + * default color ({@link SWT#COLOR_INFO_BACKGROUND}) for + * the source hover background color. + *

+ * Value is of type Boolean. + *

+ * + * @see org.eclipse.jface.resource.StringConverter + * @see org.eclipse.jface.preference.PreferenceConverter + * @since 5.0 + */ + public final static String EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT= "sourceHoverBackgroundColor.SystemDefault"; //$NON-NLS-1$ + /** * Returns the CDT-UI preference store. - * + * * @return the CDT-UI preference store */ public static IPreferenceStore getPreferenceStore() { @@ -1196,7 +1251,7 @@ public class PreferenceConstants { /** * Initializes the given preference store with the default values. - * + * * @param store the preference store to be initialized */ public static void initializeDefaultValues(IPreferenceStore store) { @@ -1205,16 +1260,18 @@ public class PreferenceConstants { store.setDefault(PreferenceConstants.EDITOR_CORRECTION_INDICATION, false); store.setDefault(PreferenceConstants.EDITOR_SHOW_SEGMENTS, false); store.setDefault(PreferenceConstants.PREF_SHOW_CU_CHILDREN, true); - + // This option has to be turned on for the spelling checker too work. - // As of 4.0, it doesn't produce false positives any more. + // As of 4.0, it doesn't produce false positives any more. store.setDefault(PreferenceConstants.EDITOR_EVALUATE_TEMPORARY_PROBLEMS, true); - + int sourceHoverModifier= SWT.MOD2; String sourceHoverModifierName= Action.findModifierString(sourceHoverModifier); // Shift store.setDefault(PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIERS, "org.eclipse.cdt.ui.BestMatchHover;0;org.eclipse.cdt.ui.CSourceHover;" + sourceHoverModifierName); //$NON-NLS-1$ store.setDefault(PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIER_MASKS, "org.eclipse.cdt.ui.BestMatchHover;0;org.eclipse.cdt.ui.CSourceHover;" + sourceHoverModifier); //$NON-NLS-1$ - + + store.setDefault(EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT, true); + // coloring PreferenceConverter.setDefault(store, EDITOR_MULTI_LINE_COMMENT_COLOR, new RGB(63, 127, 95)); store.setDefault(EDITOR_MULTI_LINE_COMMENT_BOLD, false); @@ -1297,23 +1354,30 @@ public class PreferenceConstants { store.setDefault(PreferenceConstants.EDITOR_SMART_TAB, true); store.setDefault(PreferenceConstants.EDITOR_WRAP_STRINGS, true); store.setDefault(PreferenceConstants.EDITOR_ESCAPE_STRINGS, false); - + store.setDefault(PreferenceConstants.ENSURE_NEWLINE_AT_EOF, false); - + // content assist store.setDefault(PreferenceConstants.CODEASSIST_EXCLUDED_CATEGORIES, "org.eclipse.cdt.ui.textProposalCategory\0"); //$NON-NLS-1$ store.setDefault(PreferenceConstants.CODEASSIST_CATEGORY_ORDER, "org.eclipse.cdt.ui.parserProposalCategory:65539\0org.eclipse.cdt.ui.textProposalCategory:65541\0org.eclipse.cdt.ui.templateProposalCategory:2\0"); //$NON-NLS-1$ - setDefaultAndFireEvent( store, - PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND, + PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND, findRGB(registry, ICThemeConstants.CODEASSIST_PROPOSALS_BACKGROUND, new RGB(255, 255, 255))); setDefaultAndFireEvent( store, - PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND, + 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))); + // spell checking store.setDefault(PreferenceConstants.SPELLING_LOCALE, "en_US"); //$NON-NLS-1$ String isInitializedKey= "spelling_locale_initialized"; //$NON-NLS-1$ @@ -1333,10 +1397,10 @@ public class PreferenceConstants { store.setDefault(PreferenceConstants.SPELLING_IGNORE_STRING_LITERALS, true); store.setDefault(PreferenceConstants.SPELLING_IGNORE_NON_LETTERS, true); store.setDefault(PreferenceConstants.SPELLING_USER_DICTIONARY, ""); //$NON-NLS-1$ - + // Note: For backwards compatibility we must use the property and not the workspace default store.setDefault(PreferenceConstants.SPELLING_USER_DICTIONARY_ENCODING, System.getProperty("file.encoding")); //$NON-NLS-1$ - + store.setDefault(PreferenceConstants.SPELLING_PROPOSAL_THRESHOLD, 20); store.setDefault(PreferenceConstants.SPELLING_PROBLEMS_THRESHOLD, 100); /* @@ -1344,7 +1408,7 @@ public class PreferenceConstants { * cannot return word proposals but only correction proposals. */ store.setToDefault(PreferenceConstants.SPELLING_ENABLE_CONTENTASSIST); - + // codegen store.setDefault(PreferenceConstants.CODEGEN_ADD_COMMENTS, false); } @@ -1374,11 +1438,11 @@ public class PreferenceConstants { return new DefaultScope().getNode(CUIPlugin.PLUGIN_ID).get(key, null); } - + /** * 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 @@ -1388,16 +1452,16 @@ public class PreferenceConstants { 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