|
From: Christopher W. <caw...@us...> - 2006-04-20 21:55:53
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10318/src/org/rubypeople/rdt/ui Modified Files: PreferenceConstants.java Log Message: add support for highlighting matching brackets (ticket #106) Index: PreferenceConstants.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/PreferenceConstants.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** PreferenceConstants.java 12 Apr 2006 21:26:25 -0000 1.15 --- PreferenceConstants.java 20 Apr 2006 21:55:43 -0000 1.16 *************** *** 3,6 **** --- 3,8 ---- import org.eclipse.core.runtime.IPath; import org.eclipse.jface.preference.IPreferenceStore; + import org.eclipse.jface.preference.PreferenceConverter; + import org.eclipse.swt.graphics.RGB; import org.rubypeople.rdt.internal.launching.RubyInterpreter; import org.rubypeople.rdt.internal.launching.RubyRuntime; *************** *** 296,299 **** --- 298,321 ---- public static final String EDITOR_UNDERLINE_SUFFIX= "_underline"; //$NON-NLS-1$ + /** + * A named preference that controls whether bracket matching highlighting is turned on or off. + * <p> + * Value is of type <code>Boolean</code>. + * </p> + */ + public final static String EDITOR_MATCHING_BRACKETS= "matchingBrackets"; //$NON-NLS-1$ + + /** + * A named preference that holds the color used to highlight matching brackets. + * <p> + * Value is of type <code>String</code>. A RGB color value encoded as a string + * using class <code>PreferenceConverter</code> + * </p> + * + * @see org.eclipse.jface.resource.StringConverter + * @see org.eclipse.jface.preference.PreferenceConverter + */ + public final static String EDITOR_MATCHING_BRACKETS_COLOR= "matchingBracketsColor"; //$NON-NLS-1$ + public static void initializeDefaultValues(IPreferenceStore store) { store.setDefault(PreferenceConstants.EDITOR_SHOW_SEGMENTS, false); *************** *** 343,346 **** --- 365,373 ---- store.setDefault(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE, true); + + // RubyEditorPreferencePage + store.setDefault(PreferenceConstants.EDITOR_MATCHING_BRACKETS, true); + PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR, new RGB(192, 192,192)); + } |