public void storeHighlight(
     final IPreferenceStore store, final TokenHighlight th, HighlightStyle style) {
   if (store != null) {
     store.setValue(th.getColorKey(), StringConverter.asString(style.getColor()));
     store.setValue(th.getStylesKey(), style.getStyles());
   }
 }
예제 #2
0
  private void loadDefaultEditorColors() {
    final IPreferenceStore rootStore = getPreferenceStore();

    for (final TokenHighlight th : TokenHighlight.values()) {
      final HighlightStyle data = th.getDefaultStyle();
      rootStore.setDefault(th.getColorKey(), StringConverter.asString(data.getColor()));
      rootStore.setDefault(th.getStylesKey(), data.getStyles());
    }
  }