@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);
/** * 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); } }
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);
@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);
/** * 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); } }
/** * 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); } }