public IPreferenceStore getColorPreferences() { if (twigColorPreferences != null) { return twigColorPreferences; } return PreferenceConstants.getPreferenceStore(); }
protected void handlePropertyChange(PropertyChangeEvent event) { if (event != null) { String prefKey = event.getProperty(); if (PreferenceConstants.EDITOR_NORMAL_COLOR.equals(prefKey) || PreferenceConstants.EDITOR_BOUNDARYMARKER_COLOR.equals(prefKey) || PreferenceConstants.EDITOR_STMT_BOUNDARYMARKER_COLOR.equals(prefKey) || PreferenceConstants.EDITOR_VARIABLE_COLOR.equals(prefKey) || PreferenceConstants.EDITOR_STRING_COLOR.equals(prefKey) || PreferenceConstants.EDITOR_COMMENT_COLOR.equals(prefKey) || PreferenceConstants.EDITOR_PHPDOC_COLOR.equals(prefKey) || PreferenceConstants.EDITOR_NUMBER_COLOR.equals(prefKey) || PreferenceConstants.EDITOR_KEYWORD_COLOR.equals(prefKey) || PreferenceConstants.EDITOR_TASK_COLOR.equals(prefKey)) { addTextAttribute(prefKey); } else if (PreferenceConstants.getEnabledPreferenceKey( PreferenceConstants.EDITOR_NORMAL_COLOR) .equals(prefKey) || PreferenceConstants.getEnabledPreferenceKey( PreferenceConstants.EDITOR_BOUNDARYMARKER_COLOR) .equals(prefKey) || PreferenceConstants.getEnabledPreferenceKey( PreferenceConstants.EDITOR_STMT_BOUNDARYMARKER_COLOR) .equals(prefKey) || PreferenceConstants.getEnabledPreferenceKey(PreferenceConstants.EDITOR_BLOCKNAME_COLOR) .equals(prefKey) || PreferenceConstants.getEnabledPreferenceKey(PreferenceConstants.EDITOR_HASH_COLOR) .equals(prefKey) || PreferenceConstants.getEnabledPreferenceKey(PreferenceConstants.EDITOR_VARIABLE_COLOR) .equals(prefKey) || PreferenceConstants.getEnabledPreferenceKey(PreferenceConstants.EDITOR_STRING_COLOR) .equals(prefKey) || PreferenceConstants.getEnabledPreferenceKey(PreferenceConstants.EDITOR_KEYWORD_COLOR) .equals(prefKey) || PreferenceConstants.getEnabledPreferenceKey(PreferenceConstants.EDITOR_COMMENT_COLOR) .equals(prefKey) || PreferenceConstants.getEnabledPreferenceKey(PreferenceConstants.EDITOR_PHPDOC_COLOR) .equals(prefKey) || PreferenceConstants.getEnabledPreferenceKey(PreferenceConstants.EDITOR_NUMBER_COLOR) .equals(prefKey) || PreferenceConstants.getEnabledPreferenceKey(PreferenceConstants.EDITOR_TASK_COLOR) .equals(prefKey)) { boolean enabled = getColorPreferences().getBoolean(prefKey); prefKey = prefKey.split("\\.")[1]; if (enabled) { addTextAttribute(prefKey); } else { addDefaultTextAttribute(prefKey); } } } else { loadColors(); } if (fRecHighlighter != null) { fRecHighlighter.refreshDisplay(); } }