本文整理汇总了Java中org.eclipse.jdt.ui.PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_UNDERLINE_SUFFIX属性的典型用法代码示例。如果您正苦于以下问题:Java PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_UNDERLINE_SUFFIX属性的具体用法?Java PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_UNDERLINE_SUFFIX怎么用?Java PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_UNDERLINE_SUFFIX使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jdt.ui.PreferenceConstants
的用法示例。
在下文中一共展示了PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_UNDERLINE_SUFFIX属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
}
示例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;
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);
}
}
示例3: getUnderlineKey
@Override
protected String getUnderlineKey(String colorKey) {
if ((ANNOTATION_COLOR_KEY).equals(colorKey))
return ANNOTATION_BASE_KEY + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_UNDERLINE_SUFFIX;
return super.getUnderlineKey(colorKey);
}
示例4: getUnderlinePreferenceKey
/**
* A named preference that controls if the given semantic highlighting has the text attribute underline.
*
* @param semanticHighlighting the semantic highlighting
* @return the underline preference key
* @since 3.1
*/
public static String getUnderlinePreferenceKey(SemanticHighlighting semanticHighlighting) {
return PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + semanticHighlighting.getPreferenceKey() + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_UNDERLINE_SUFFIX;
}