本文整理汇总了Java中org.eclipse.jdt.ui.PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED_SUFFIX属性的典型用法代码示例。如果您正苦于以下问题:Java PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED_SUFFIX属性的具体用法?Java PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED_SUFFIX怎么用?Java PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED_SUFFIX使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.ui.PreferenceConstants
的用法示例。
在下文中一共展示了PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED_SUFFIX属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: convertMethodHighlightingPreferences
/**
* In 3.0, methods were highlighted by a rule-based word matcher that
* matched any identifier that was followed by possibly white space and a
* left parenthesis.
* <p>
* With generics, this does not work any longer for constructors of generic
* types, and the highlighting has been moved to be a semantic highlighting.
* Because different preference key naming schemes are used, we have to
* migrate the old settings to the new ones, which is done here. Nothing
* needs to be done if the old settings were set to the default values.
* </p>
*
* @param store the preference store to migrate
* @since 3.1
*/
private static void convertMethodHighlightingPreferences(IPreferenceStore store) {
String colorkey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + METHOD + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_COLOR_SUFFIX;
String boldkey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + METHOD + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_BOLD_SUFFIX;
String italickey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + METHOD + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ITALIC_SUFFIX;
String enabledkey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + METHOD + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED_SUFFIX;
@SuppressWarnings("deprecation") String oldColorkey= PreferenceConstants.EDITOR_JAVA_METHOD_NAME_COLOR;
@SuppressWarnings("deprecation") String oldBoldkey= PreferenceConstants.EDITOR_JAVA_METHOD_NAME_BOLD;
@SuppressWarnings("deprecation") String oldItalickey= PreferenceConstants.EDITOR_JAVA_METHOD_NAME_ITALIC;
if (conditionalReset(store, oldColorkey, colorkey)
|| conditionalReset(store, oldBoldkey, boldkey)
|| conditionalReset(store, oldItalickey, italickey)) {
store.setValue(enabledkey, true);
}
}
示例2: convertAnnotationHighlightingPreferences
/**
* In 3.1, annotations were highlighted by a rule-based word matcher that matched any identifier
* preceded by an '@' sign and possibly white space.
* <p>
* This does not work when there is a comment between the '@' and the annotation, results in
* stale highlighting if there is a new line between the '@' and the annotation, and does not
* work for highlighting annotation declarations. Because different preference key naming
* schemes are used, we have to migrate the old settings to the new ones, which is done here.
* Nothing needs to be done if the old settings were set to the default values.
* </p>
*
* @param store the preference store to migrate
* @since 3.2
*/
private static void convertAnnotationHighlightingPreferences(IPreferenceStore store) {
String colorkey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + ANNOTATION + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_COLOR_SUFFIX;
String boldkey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + ANNOTATION + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_BOLD_SUFFIX;
String italickey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + ANNOTATION + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ITALIC_SUFFIX;
String strikethroughKey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + ANNOTATION + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_STRIKETHROUGH_SUFFIX;
String underlineKey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + ANNOTATION + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_UNDERLINE_SUFFIX;
String enabledkey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + ANNOTATION + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED_SUFFIX;
@SuppressWarnings("deprecation") String oldColorkey= PreferenceConstants.EDITOR_JAVA_ANNOTATION_COLOR;
@SuppressWarnings("deprecation") String oldBoldkey= PreferenceConstants.EDITOR_JAVA_ANNOTATION_BOLD;
@SuppressWarnings("deprecation") String oldItalickey= PreferenceConstants.EDITOR_JAVA_ANNOTATION_ITALIC;
@SuppressWarnings("deprecation") String oldStrikethroughKey= PreferenceConstants.EDITOR_JAVA_ANNOTATION_STRIKETHROUGH;
@SuppressWarnings("deprecation") String oldUnderlineKey= PreferenceConstants.EDITOR_JAVA_ANNOTATION_UNDERLINE;
if (conditionalReset(store, oldColorkey, colorkey)
|| conditionalReset(store, oldBoldkey, boldkey)
|| conditionalReset(store, oldItalickey, italickey)
|| conditionalReset(store, oldStrikethroughKey, strikethroughKey)
|| conditionalReset(store, oldUnderlineKey, underlineKey)) {
store.setValue(enabledkey, true);
}
}
示例3: convertMethodHighlightingPreferences
/**
* In 3.0, methods were highlighted by a rule-based word matcher that
* matched any identifier that was followed by possibly white space and a
* left parenthesis.
* <p>
* With generics, this does not work any longer for constructors of generic
* types, and the highlighting has been moved to be a semantic highlighting.
* Because different preference key naming schemes are used, we have to
* migrate the old settings to the new ones, which is done here. Nothing
* needs to be done if the old settings were set to the default values.
* </p>
*
* @param store the preference store to migrate
* @since 3.1
*/
private static void convertMethodHighlightingPreferences(IPreferenceStore store) {
String colorkey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + METHOD + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_COLOR_SUFFIX;
String boldkey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + METHOD + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_BOLD_SUFFIX;
String italickey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + METHOD + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ITALIC_SUFFIX;
String enabledkey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + METHOD + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED_SUFFIX;
String oldColorkey= PreferenceConstants.EDITOR_JAVA_METHOD_NAME_COLOR;
String oldBoldkey= PreferenceConstants.EDITOR_JAVA_METHOD_NAME_BOLD;
String oldItalickey= PreferenceConstants.EDITOR_JAVA_METHOD_NAME_ITALIC;
if (conditionalReset(store, oldColorkey, colorkey)
|| conditionalReset(store, oldBoldkey, boldkey)
|| conditionalReset(store, oldItalickey, italickey)) {
store.setValue(enabledkey, true);
}
}
示例4: convertAnnotationHighlightingPreferences
/**
* In 3.1, annotations were highlighted by a rule-based word matcher that matched any identifier
* preceded by an '@' sign and possibly white space.
* <p>
* This does not work when there is a comment between the '@' and the annotation, results in
* stale highlighting if there is a new line between the '@' and the annotation, and does not
* work for highlighting annotation declarations. Because different preference key naming
* schemes are used, we have to migrate the old settings to the new ones, which is done here.
* Nothing needs to be done if the old settings were set to the default values.
* </p>
*
* @param store the preference store to migrate
* @since 3.2
*/
private static void convertAnnotationHighlightingPreferences(IPreferenceStore store) {
String colorkey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + ANNOTATION + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_COLOR_SUFFIX;
String boldkey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + ANNOTATION + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_BOLD_SUFFIX;
String italickey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + ANNOTATION + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ITALIC_SUFFIX;
String strikethroughKey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + ANNOTATION + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_STRIKETHROUGH_SUFFIX;
String underlineKey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + ANNOTATION + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_UNDERLINE_SUFFIX;
String enabledkey= PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + ANNOTATION + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED_SUFFIX;
String oldColorkey= PreferenceConstants.EDITOR_JAVA_ANNOTATION_COLOR;
String oldBoldkey= PreferenceConstants.EDITOR_JAVA_ANNOTATION_BOLD;
String oldItalickey= PreferenceConstants.EDITOR_JAVA_ANNOTATION_ITALIC;
String oldStrikethroughKey= PreferenceConstants.EDITOR_JAVA_ANNOTATION_STRIKETHROUGH;
String oldUnderlineKey= PreferenceConstants.EDITOR_JAVA_ANNOTATION_UNDERLINE;
if (conditionalReset(store, oldColorkey, colorkey)
|| conditionalReset(store, oldBoldkey, boldkey)
|| conditionalReset(store, oldItalickey, italickey)
|| conditionalReset(store, oldStrikethroughKey, strikethroughKey)
|| conditionalReset(store, oldUnderlineKey, underlineKey)) {
store.setValue(enabledkey, true);
}
}
示例5: getEnabledPreferenceKey
/**
* A named preference that controls if the given semantic highlighting is enabled.
*
* @param semanticHighlighting the semantic highlighting
* @return the enabled preference key
*/
public static String getEnabledPreferenceKey(SemanticHighlighting semanticHighlighting) {
return PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + semanticHighlighting.getPreferenceKey() + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED_SUFFIX;
}