Changeset 3872


Ignore:
Timestamp:
Jul 23, 2008, 9:06:47 PM (12 years ago)
Author:
yura
Message:
Location:
devel-tools/trunk/eclipse/org.refal.rfpdt.ui/src/org/refal/rfpdt/ui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • devel-tools/trunk/eclipse/org.refal.rfpdt.ui/src/org/refal/rfpdt/ui/preferences/IColorPreferences.java

    r3871 r3872  
    22
    33public interface IColorPreferences {
    4     public static final String SYMBOL = "Symbol";
    5     public static final String KEYWORD = "Keyword";
    6     public static final String IDENTIFIER_USE = "Identifier_use";
    7     public static final String IDENTIFIER_DEFINITION = "Identifier_definition";
    8     public static final String VARIABLE_TYPE = "Variable_type";
    9     public static final String VARIABLE_DEFINITION = "Variable_definition";
    10     public static final String VARIABLE_USE = "Variable_use";
    11     public static final String COMMENT = "Comment";
    12     public static final String OTHER_SYMBOLS = "Other_symbols";
     4    public static final String SYMBOL = IPreferenceConstants.PREFIX + "symbol";
     5    public static final String KEYWORD = IPreferenceConstants.PREFIX + "keyword";
     6    public static final String IDENTIFIER_DEFINITION = IPreferenceConstants.PREFIX + "identifierDefinition";
     7    public static final String IDENTIFIER_USE = IPreferenceConstants.PREFIX + "identifierUse";
     8    public static final String VARIABLE_TYPE = IPreferenceConstants.PREFIX + "variableType";
     9    public static final String VARIABLE_DEFINITION = IPreferenceConstants.PREFIX + "variableDefinition";
     10    public static final String VARIABLE_USE = IPreferenceConstants.PREFIX + "variableUse";
     11    public static final String COMMENT = IPreferenceConstants.PREFIX + "comment";
     12    public static final String OTHER_SYMBOLS = IPreferenceConstants.PREFIX + "otherSymbols";
    1313}
  • devel-tools/trunk/eclipse/org.refal.rfpdt.ui/src/org/refal/rfpdt/ui/preferences/SyntaxColoringPreferencePage.java

    r3871 r3872  
    8989        booleanStore = new HashMap<String, Boolean>(keys.length * 4);
    9090        for (String k : keys) {
    91             rgbStore.put(IPreferenceConstants.PREFIX + k + ".color", null); //$NON-NLS-1$
    92             booleanStore.put(IPreferenceConstants.PREFIX + k + ".bold", null); //$NON-NLS-1$
    93             booleanStore.put(IPreferenceConstants.PREFIX + k + ".italic", null); //$NON-NLS-1$
    94             booleanStore.put(IPreferenceConstants.PREFIX + k + ".strikethrough", null); //$NON-NLS-1$
    95             booleanStore.put(IPreferenceConstants.PREFIX + k + ".underlined", null); //$NON-NLS-1$
     91            rgbStore.put(k + ".color", null); //$NON-NLS-1$
     92            booleanStore.put(k + ".bold", null); //$NON-NLS-1$
     93            booleanStore.put(k + ".italic", null); //$NON-NLS-1$
     94            booleanStore.put(k + ".strikethrough", null); //$NON-NLS-1$
     95            booleanStore.put(k + ".underlined", null); //$NON-NLS-1$
    9696        }
    9797        IPreferenceStore store = getPreferenceStore();
     
    212212
    213213    private void setPreferenceName (String key) {
    214         colorEditor.setPreferenceName(IPreferenceConstants.PREFIX + key + ".color"); //$NON-NLS-1$
    215         boldEditor.setPreferenceName(IPreferenceConstants.PREFIX + key + ".bold"); //$NON-NLS-1$
    216         italicEditor.setPreferenceName(IPreferenceConstants.PREFIX + key + ".italic"); //$NON-NLS-1$
    217         strikeEditor.setPreferenceName(IPreferenceConstants.PREFIX + key + ".strikethrough"); //$NON-NLS-1$
    218         underlinedEditor.setPreferenceName(IPreferenceConstants.PREFIX + key + ".underlined"); //$NON-NLS-1$
     214        colorEditor.setPreferenceName(key + ".color"); //$NON-NLS-1$
     215        boldEditor.setPreferenceName(key + ".bold"); //$NON-NLS-1$
     216        italicEditor.setPreferenceName(key + ".italic"); //$NON-NLS-1$
     217        strikeEditor.setPreferenceName(key + ".strikethrough"); //$NON-NLS-1$
     218        underlinedEditor.setPreferenceName(key + ".underlined"); //$NON-NLS-1$
    219219    }
    220220
  • devel-tools/trunk/eclipse/org.refal.rfpdt.ui/src/org/refal/rfpdt/ui/scanner/ColorScanner.java

    r3871 r3872  
    2020import org.refal.rfpdt.editor.RfpEditor;
    2121import org.refal.rfpdt.ui.preferences.IColorPreferences;
    22 import org.refal.rfpdt.ui.preferences.IPreferenceConstants;
    2322
    2423public class ColorScanner implements ITokenScanner {
     
    4140            return null;
    4241        Color color = colorManager.getColor(
    43                 PreferenceConverter.getColor(store, IPreferenceConstants.PREFIX + key + ".color"));
    44         int style = store.getBoolean(IPreferenceConstants.PREFIX + key + ".bold") ? SWT.BOLD : SWT.NORMAL;
    45         if (store.getBoolean(IPreferenceConstants.PREFIX + key + ".italic"))
     42                PreferenceConverter.getColor(store, key + ".color"));
     43        int style = store.getBoolean(key + ".bold") ? SWT.BOLD : SWT.NORMAL;
     44        if (store.getBoolean(key + ".italic"))
    4645            style |= SWT.ITALIC;
    47         if (store.getBoolean(IPreferenceConstants.PREFIX + key + ".strikethrough"))
     46        if (store.getBoolean(key + ".strikethrough"))
    4847            style |= TextAttribute.STRIKETHROUGH;
    49         if (store.getBoolean(IPreferenceConstants.PREFIX + key + ".underlined"))
     48        if (store.getBoolean(key + ".underlined"))
    5049            style |= TextAttribute.UNDERLINE;
    5150        return new TextAttribute(color, null, style);
Note: See TracChangeset for help on using the changeset viewer.