Changeset 3872
- Timestamp:
- Jul 23, 2008, 9:06:47 PM (13 years ago)
- 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 2 2 3 3 public 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"; 13 13 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.ui/src/org/refal/rfpdt/ui/preferences/SyntaxColoringPreferencePage.java
r3871 r3872 89 89 booleanStore = new HashMap<String, Boolean>(keys.length * 4); 90 90 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$ 96 96 } 97 97 IPreferenceStore store = getPreferenceStore(); … … 212 212 213 213 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$ 219 219 } 220 220 -
devel-tools/trunk/eclipse/org.refal.rfpdt.ui/src/org/refal/rfpdt/ui/scanner/ColorScanner.java
r3871 r3872 20 20 import org.refal.rfpdt.editor.RfpEditor; 21 21 import org.refal.rfpdt.ui.preferences.IColorPreferences; 22 import org.refal.rfpdt.ui.preferences.IPreferenceConstants;23 22 24 23 public class ColorScanner implements ITokenScanner { … … 41 40 return null; 42 41 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")) 46 45 style |= SWT.ITALIC; 47 if (store.getBoolean( IPreferenceConstants.PREFIX +key + ".strikethrough"))46 if (store.getBoolean(key + ".strikethrough")) 48 47 style |= TextAttribute.STRIKETHROUGH; 49 if (store.getBoolean( IPreferenceConstants.PREFIX +key + ".underlined"))48 if (store.getBoolean(key + ".underlined")) 50 49 style |= TextAttribute.UNDERLINE; 51 50 return new TextAttribute(color, null, style);
Note: See TracChangeset
for help on using the changeset viewer.