org.eclipse.cdt.internal.ui.editor
Class SemanticHighlightings

java.lang.Object
  extended by org.eclipse.cdt.internal.ui.editor.SemanticHighlightings

public class SemanticHighlightings
extends java.lang.Object

Semantic highlightings. Derived from JDT.

Since:
4.0

Field Summary
static java.lang.String CLASS
          A named preference part that controls the highlighting of classes.
static java.lang.String ENUM
          A named preference part that controls the highlighting of enums.
static java.lang.String ENUMERATOR
          A named preference part that controls the highlighting of enumerators.
static java.lang.String EXTERNAL_SDK
          A named preference part that controls the highlighting of external SDK.
static java.lang.String FIELD
          A named preference part that controls the highlighting of fields.
static java.lang.String FUNCTION
          A named preference part that controls the highlighting of functions.
static java.lang.String FUNCTION_DECLARATION
          A named preference part that controls the highlighting of function declarations.
static java.lang.String GLOBAL_VARIABLE
          A named preference part that controls the highlighting of global variables.
static java.lang.String LABEL
          A named preference part that controls the highlighting of labels.
static java.lang.String LOCAL_VARIABLE
          A named preference part that controls the highlighting of local variable references.
static java.lang.String LOCAL_VARIABLE_DECLARATION
          A named preference part that controls the highlighting of local variables.
static java.lang.String MACRO_DEFINITION
          A named preference part that controls the highlighting of macro definitions.
static java.lang.String MACRO_REFERENCE
          A named preference part that controls the highlighting of macro references.
static java.lang.String METHOD
          A named preference part that controls the highlighting of methods.
static java.lang.String METHOD_DECLARATION
          A named preference part that controls the highlighting of method declarations.
static java.lang.String NAMESPACE
          A named preference part that controls the highlighting of namespaces.
static java.lang.String PARAMETER_VARIABLE
          A named preference part that controls the highlighting of parameter variables.
static java.lang.String PROBLEM
          A named preference part that controls the highlighting of problems.
static java.lang.String STATIC_FIELD
          A named preference part that controls the highlighting of static fields.
static java.lang.String STATIC_METHOD_INVOCATION
          A named preference part that controls the highlighting of static method invocations.
static java.lang.String TEMPLATE_PARAMETER
          A named preference part that controls the highlighting of template parameters.
static java.lang.String TYPEDEF
          A named preference part that controls the highlighting of typedefs.
 
Method Summary
static boolean affectsEnablement(org.eclipse.jface.preference.IPreferenceStore store, org.eclipse.jface.util.PropertyChangeEvent event)
          Tests whether event in store affects the enablement of semantic highlighting.
static java.lang.String getBoldPreferenceKey(SemanticHighlighting semanticHighlighting)
          A named preference that controls if the given semantic highlighting has the text attribute bold.
static java.lang.String getColorPreferenceKey(SemanticHighlighting semanticHighlighting)
          A named preference that controls the given semantic highlighting's color.
static java.lang.String getEnabledPreferenceKey(SemanticHighlighting semanticHighlighting)
          A named preference that controls if the given semantic highlighting is enabled.
static java.lang.String getItalicPreferenceKey(SemanticHighlighting semanticHighlighting)
          A named preference that controls if the given semantic highlighting has the text attribute italic.
static SemanticHighlighting[] getSemanticHighlightings()
           
static java.lang.String getStrikethroughPreferenceKey(SemanticHighlighting semanticHighlighting)
          A named preference that controls if the given semantic highlighting has the text attribute strikethrough.
static java.lang.String getUnderlinePreferenceKey(SemanticHighlighting semanticHighlighting)
          A named preference that controls if the given semantic highlighting has the text attribute underline.
static void initDefaults(org.eclipse.jface.preference.IPreferenceStore store)
          Initialize default preferences in the given preference store.
static boolean isEnabled(org.eclipse.jface.preference.IPreferenceStore store)
          Tests whether semantic highlighting is currently enabled.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATIC_FIELD

public static final java.lang.String STATIC_FIELD
A named preference part that controls the highlighting of static fields.

See Also:
Constant Field Values

FIELD

public static final java.lang.String FIELD
A named preference part that controls the highlighting of fields.

See Also:
Constant Field Values

METHOD_DECLARATION

public static final java.lang.String METHOD_DECLARATION
A named preference part that controls the highlighting of method declarations.

See Also:
Constant Field Values

STATIC_METHOD_INVOCATION

public static final java.lang.String STATIC_METHOD_INVOCATION
A named preference part that controls the highlighting of static method invocations.

See Also:
Constant Field Values

FUNCTION_DECLARATION

public static final java.lang.String FUNCTION_DECLARATION
A named preference part that controls the highlighting of function declarations.

See Also:
Constant Field Values

FUNCTION

public static final java.lang.String FUNCTION
A named preference part that controls the highlighting of functions.

See Also:
Constant Field Values

LOCAL_VARIABLE_DECLARATION

public static final java.lang.String LOCAL_VARIABLE_DECLARATION
A named preference part that controls the highlighting of local variables.

See Also:
Constant Field Values

LOCAL_VARIABLE

public static final java.lang.String LOCAL_VARIABLE
A named preference part that controls the highlighting of local variable references.

See Also:
Constant Field Values

GLOBAL_VARIABLE

public static final java.lang.String GLOBAL_VARIABLE
A named preference part that controls the highlighting of global variables.

See Also:
Constant Field Values

PARAMETER_VARIABLE

public static final java.lang.String PARAMETER_VARIABLE
A named preference part that controls the highlighting of parameter variables.

See Also:
Constant Field Values

TEMPLATE_PARAMETER

public static final java.lang.String TEMPLATE_PARAMETER
A named preference part that controls the highlighting of template parameters.

See Also:
Constant Field Values

METHOD

public static final java.lang.String METHOD
A named preference part that controls the highlighting of methods.

See Also:
Constant Field Values

CLASS

public static final java.lang.String CLASS
A named preference part that controls the highlighting of classes.

See Also:
Constant Field Values

ENUM

public static final java.lang.String ENUM
A named preference part that controls the highlighting of enums.

See Also:
Constant Field Values

MACRO_REFERENCE

public static final java.lang.String MACRO_REFERENCE
A named preference part that controls the highlighting of macro references.

See Also:
Constant Field Values

MACRO_DEFINITION

public static final java.lang.String MACRO_DEFINITION
A named preference part that controls the highlighting of macro definitions.

See Also:
Constant Field Values

TYPEDEF

public static final java.lang.String TYPEDEF
A named preference part that controls the highlighting of typedefs.

See Also:
Constant Field Values

NAMESPACE

public static final java.lang.String NAMESPACE
A named preference part that controls the highlighting of namespaces.

See Also:
Constant Field Values

LABEL

public static final java.lang.String LABEL
A named preference part that controls the highlighting of labels.

See Also:
Constant Field Values

ENUMERATOR

public static final java.lang.String ENUMERATOR
A named preference part that controls the highlighting of enumerators.

See Also:
Constant Field Values

PROBLEM

public static final java.lang.String PROBLEM
A named preference part that controls the highlighting of problems.

See Also:
Constant Field Values

EXTERNAL_SDK

public static final java.lang.String EXTERNAL_SDK
A named preference part that controls the highlighting of external SDK.

See Also:
Constant Field Values
Method Detail

getColorPreferenceKey

public static java.lang.String getColorPreferenceKey(SemanticHighlighting semanticHighlighting)
A named preference that controls the given semantic highlighting's color.

Parameters:
semanticHighlighting - the semantic highlighting
Returns:
the color preference key

getBoldPreferenceKey

public static java.lang.String getBoldPreferenceKey(SemanticHighlighting semanticHighlighting)
A named preference that controls if the given semantic highlighting has the text attribute bold.

Parameters:
semanticHighlighting - the semantic highlighting
Returns:
the bold preference key

getItalicPreferenceKey

public static java.lang.String getItalicPreferenceKey(SemanticHighlighting semanticHighlighting)
A named preference that controls if the given semantic highlighting has the text attribute italic.

Parameters:
semanticHighlighting - the semantic highlighting
Returns:
the italic preference key

getStrikethroughPreferenceKey

public static java.lang.String getStrikethroughPreferenceKey(SemanticHighlighting semanticHighlighting)
A named preference that controls if the given semantic highlighting has the text attribute strikethrough.

Parameters:
semanticHighlighting - the semantic highlighting
Returns:
the strikethrough preference key

getUnderlinePreferenceKey

public static java.lang.String getUnderlinePreferenceKey(SemanticHighlighting semanticHighlighting)
A named preference that controls if the given semantic highlighting has the text attribute underline.

Parameters:
semanticHighlighting - the semantic highlighting
Returns:
the underline preference key

getEnabledPreferenceKey

public static java.lang.String getEnabledPreferenceKey(SemanticHighlighting semanticHighlighting)
A named preference that controls if the given semantic highlighting is enabled.

Parameters:
semanticHighlighting - the semantic highlighting
Returns:
the enabled preference key

getSemanticHighlightings

public static SemanticHighlighting[] getSemanticHighlightings()
Returns:
The semantic highlightings, the order defines the precedence of matches, the first match wins.

initDefaults

public static void initDefaults(org.eclipse.jface.preference.IPreferenceStore store)
Initialize default preferences in the given preference store.

Parameters:
store - The preference store

affectsEnablement

public static boolean affectsEnablement(org.eclipse.jface.preference.IPreferenceStore store,
                                        org.eclipse.jface.util.PropertyChangeEvent event)
Tests whether event in store affects the enablement of semantic highlighting.

Parameters:
store - the preference store where event was observed
event - the property change under examination
Returns:
true if event changed semantic highlighting enablement, false if it did not

isEnabled

public static boolean isEnabled(org.eclipse.jface.preference.IPreferenceStore store)
Tests whether semantic highlighting is currently enabled.

Parameters:
store - the preference store to consult
Returns:
true if semantic highlighting is enabled, false if it is not