当前位置: 首页>>代码示例>>Java>>正文


Java PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX属性代码示例

本文整理汇总了Java中org.eclipse.jdt.ui.PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX属性的典型用法代码示例。如果您正苦于以下问题:Java PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX属性的具体用法?Java PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX怎么用?Java PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.jdt.ui.PreferenceConstants的用法示例。


在下文中一共展示了PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
	}

}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:32,代码来源:SemanticHighlightings.java

示例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);
	}

}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:37,代码来源:SemanticHighlightings.java

示例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);
	}

}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:32,代码来源:SemanticHighlightings.java

示例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);
	}

}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:37,代码来源:SemanticHighlightings.java

示例5: getColorPreferenceKey

/**
 * A named preference that controls the given semantic highlighting's color.
 *
 * @param semanticHighlighting the semantic highlighting
 * @return the color preference key
 */
public static String getColorPreferenceKey(SemanticHighlighting semanticHighlighting) {
	return PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + semanticHighlighting.getPreferenceKey() + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_COLOR_SUFFIX;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:SemanticHighlightings.java

示例6: getBoldPreferenceKey

/**
 * A named preference that controls if the given semantic highlighting has the text attribute bold.
 *
 * @param semanticHighlighting the semantic highlighting
 * @return the bold preference key
 */
public static String getBoldPreferenceKey(SemanticHighlighting semanticHighlighting) {
	return PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + semanticHighlighting.getPreferenceKey() + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_BOLD_SUFFIX;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:SemanticHighlightings.java

示例7: getItalicPreferenceKey

/**
 * A named preference that controls if the given semantic highlighting has the text attribute italic.
 *
 * @param semanticHighlighting the semantic highlighting
 * @return the italic preference key
 */
public static String getItalicPreferenceKey(SemanticHighlighting semanticHighlighting) {
	return PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + semanticHighlighting.getPreferenceKey() + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ITALIC_SUFFIX;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:SemanticHighlightings.java

示例8: getStrikethroughPreferenceKey

/**
 * A named preference that controls if the given semantic highlighting has the text attribute strikethrough.
 *
 * @param semanticHighlighting the semantic highlighting
 * @return the strikethrough preference key
 * @since 3.1
 */
public static String getStrikethroughPreferenceKey(SemanticHighlighting semanticHighlighting) {
	return PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + semanticHighlighting.getPreferenceKey() + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_STRIKETHROUGH_SUFFIX;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:SemanticHighlightings.java

示例9: 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;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:SemanticHighlightings.java

示例10: 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;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:SemanticHighlightings.java


注:本文中的org.eclipse.jdt.ui.PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。