### Eclipse Workspace Patch 1.0 #P org.eclipse.dltk.python.ui Index: src/org/eclipse/dltk/python/internal/ui/preferences/PythonEditorColoringConfigurationBlock.java =================================================================== RCS file: /opt/org.eclipse.dltk/org.eclipse.dltk/python/plugins/org.eclipse.dltk.python.ui/src/org/eclipse/dltk/python/internal/ui/preferences/PythonEditorColoringConfigurationBlock.java,v retrieving revision 1.5 diff -u -r1.5 PythonEditorColoringConfigurationBlock.java --- src/org/eclipse/dltk/python/internal/ui/preferences/PythonEditorColoringConfigurationBlock.java 2 Jun 2007 20:32:32 -0000 1.5 +++ src/org/eclipse/dltk/python/internal/ui/preferences/PythonEditorColoringConfigurationBlock.java 19 Jun 2007 15:26:37 -0000 @@ -46,6 +46,9 @@ { PreferencesMessages.DLTKEditorPreferencePage_keywords, PythonPreferenceConstants.EDITOR_KEYWORD_COLOR, sCoreCategory }, + { PreferencesMessages.DLTKEditorPreferencePage_returnKeyword, + PythonPreferenceConstants.EDITOR_KEYWORD_RETURN_COLOR, sCoreCategory }, + { PreferencesMessages.DLTKEditorPreferencePage_strings, PythonPreferenceConstants.EDITOR_STRING_COLOR, sCoreCategory }, #P org.eclipse.dltk.tcl.ui Index: src/org/eclipse/dltk/tcl/internal/ui/text/TclColorConstants.java =================================================================== RCS file: /cvsroot/technology/org.eclipse.dltk/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclColorConstants.java,v retrieving revision 1.2 diff -u -r1.2 TclColorConstants.java --- src/org/eclipse/dltk/tcl/internal/ui/text/TclColorConstants.java 2 May 2007 15:04:11 -0000 1.2 +++ src/org/eclipse/dltk/tcl/internal/ui/text/TclColorConstants.java 19 Jun 2007 15:26:54 -0000 @@ -41,6 +41,11 @@ */ public static final String TCL_KEYWORD = DLTKColorConstants.DLTK_KEYWORD; + /** + * The color key for TCL 'return' keyword (value "tcl_return"). + */ + public static final String TCL_KEYWORD_RETURN = DLTKColorConstants.DLTK_KEYWORD_RETURN; //$NON-NLS-1$ + /** * The color key for TCL code (value "tcl_default"). */ Index: src/org/eclipse/dltk/tcl/internal/ui/text/TclCodeScanner.java =================================================================== RCS file: /cvsroot/technology/org.eclipse.dltk/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/text/TclCodeScanner.java,v retrieving revision 1.3 diff -u -r1.3 TclCodeScanner.java --- src/org/eclipse/dltk/tcl/internal/ui/text/TclCodeScanner.java 18 Jun 2007 13:52:23 -0000 1.3 +++ src/org/eclipse/dltk/tcl/internal/ui/text/TclCodeScanner.java 19 Jun 2007 15:26:54 -0000 @@ -16,6 +16,7 @@ import org.eclipse.dltk.tcl.internal.ui.rules.TclCommentRule; import org.eclipse.dltk.tcl.internal.ui.rules.TclFloatNumberRule; import org.eclipse.dltk.tcl.internal.ui.rules.TclVariableRule; +import org.eclipse.dltk.tcl.ui.TclPreferenceConstants; import org.eclipse.dltk.ui.text.AbstractScriptScanner; import org.eclipse.dltk.ui.text.IColorManager; import org.eclipse.jface.preference.IPreferenceStore; @@ -30,10 +31,13 @@ TclColorConstants.TCL_SINGLE_LINE_COMMENT, TclColorConstants.TCL_DEFAULT, TclColorConstants.TCL_KEYWORD, + TclColorConstants.TCL_KEYWORD_RETURN, TclColorConstants.TCL_NUMBER, TclColorConstants.TCL_VARIABLE, }; + private static String returnKeyword = "return"; + public TclCodeScanner(IColorManager manager, IPreferenceStore store) { super(manager, store); initialize(); @@ -67,6 +71,10 @@ for( int i = 0; i < keywords.length; i++ ) { wordRule.addWord(keywords[i], keyword); } + + IToken returnToken = getToken(TclPreferenceConstants.EDITOR_KEYWORD_RETURN_COLOR); + wordRule.addWord(returnKeyword, returnToken); + rules.add(wordRule); setDefaultReturnToken(other); Index: src/org/eclipse/dltk/tcl/ui/TclPreferenceConstants.java =================================================================== RCS file: /cvsroot/technology/org.eclipse.dltk/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/ui/TclPreferenceConstants.java,v retrieving revision 1.5 diff -u -r1.5 TclPreferenceConstants.java --- src/org/eclipse/dltk/tcl/ui/TclPreferenceConstants.java 15 Jun 2007 08:34:48 -0000 1.5 +++ src/org/eclipse/dltk/tcl/ui/TclPreferenceConstants.java 19 Jun 2007 15:26:54 -0000 @@ -19,6 +19,56 @@ public class TclPreferenceConstants extends PreferenceConstants { + /** + * A named preference that holds the color used to render keyword. + *

+ * Value is of type String. A RGB color value encoded as a string using class PreferenceConverter + *

+ * + * @see org.eclipse.jface.resource.StringConverter + * @see org.eclipse.jface.preference.PreferenceConverter + */ + public final static String EDITOR_KEYWORD_RETURN_COLOR = TclColorConstants.TCL_KEYWORD_RETURN; + + /** + * A named preference that controls whether kwyword are rendered in bold. + *

+ * Value is of type Boolean. If true single line comments are rendered in bold. If false the are + * rendered using no font style attribute. + *

+ */ + public final static String EDITOR_KEYWORD_RETURN_BOLD = TclColorConstants.TCL_KEYWORD_RETURN + EDITOR_BOLD_SUFFIX; + + /** + * A named preference that controls whether keyword are rendered in italic. + *

+ * Value is of type Boolean. If true single line comments are rendered in italic. If false the + * are rendered using no italic font style attribute. + *

+ */ + public final static String EDITOR_KEYWORD_RETURN_ITALIC = TclColorConstants.TCL_KEYWORD_RETURN + EDITOR_ITALIC_SUFFIX; + + /** + * A named preference that controls whether single line comments are rendered in strikethrough. + *

+ * Value is of type Boolean. If true single line comments are rendered in strikethrough. If false + * the are rendered using no italic font style attribute. + *

+ */ + public final static String EDITOR_KEYWORD_RETURN_STRIKETHROUGH = TclColorConstants.TCL_KEYWORD_RETURN + EDITOR_STRIKETHROUGH_SUFFIX; + + /** + * A named preference that controls whether keyword are rendered in underline. + *

+ * Value is of type Boolean. If true single line comments are rendered in underline. If false + * the are rendered using no italic font style attribute. + *

+ * + * + */ + public final static String EDITOR_KEYWORD_RETURN_UNDERLINE = TclColorConstants.TCL_KEYWORD_RETURN + EDITOR_UNDERLINE_SUFFIX; + + /** * A named preference that holds the color used to render single line * comments. @@ -393,6 +443,10 @@ PreferenceConverter.setDefault(store, TclPreferenceConstants.EDITOR_KEYWORD_COLOR, new RGB(127, 0, 85)); + PreferenceConverter.setDefault( store, + TclPreferenceConstants.EDITOR_KEYWORD_RETURN_COLOR, + new RGB( 127, 0, 85 ) ); + PreferenceConverter .setDefault(store, TclPreferenceConstants.EDITOR_STRING_COLOR, new RGB(42, 0, 255)); @@ -413,6 +467,8 @@ store.setDefault(TclPreferenceConstants.EDITOR_KEYWORD_BOLD, true); store.setDefault(TclPreferenceConstants.EDITOR_KEYWORD_ITALIC, false); + store.setDefault(TclPreferenceConstants.EDITOR_KEYWORD_RETURN_BOLD, true ); + store.setDefault(TclPreferenceConstants.EDITOR_KEYWORD_RETURN_ITALIC, false ); store.setDefault(TclPreferenceConstants.EDITOR_CLOSE_STRINGS, true); store.setDefault(TclPreferenceConstants.EDITOR_CLOSE_BRACKETS, true); Index: src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorColoringConfigurationBlock.java =================================================================== RCS file: /cvsroot/technology/org.eclipse.dltk/tcl/plugins/org.eclipse.dltk.tcl.ui/src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorColoringConfigurationBlock.java,v retrieving revision 1.4 diff -u -r1.4 TclEditorColoringConfigurationBlock.java --- src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorColoringConfigurationBlock.java 2 Jun 2007 20:32:28 -0000 1.4 +++ src/org/eclipse/dltk/tcl/internal/ui/preferences/TclEditorColoringConfigurationBlock.java 19 Jun 2007 15:26:54 -0000 @@ -46,6 +46,9 @@ { PreferencesMessages.DLTKEditorPreferencePage_keywords, TclPreferenceConstants.EDITOR_KEYWORD_COLOR, sCoreCategory }, + { PreferencesMessages.DLTKEditorPreferencePage_returnKeyword, + TclPreferenceConstants.EDITOR_KEYWORD_RETURN_COLOR, sCoreCategory }, + { PreferencesMessages.DLTKEditorPreferencePage_strings, TclPreferenceConstants.EDITOR_STRING_COLOR, sCoreCategory }, #P org.eclipse.dltk.ruby.ui Index: src/org/eclipse/dltk/ruby/internal/ui/preferences/RubyEditorColoringConfigurationBlock.java =================================================================== RCS file: /cvsroot/technology/org.eclipse.dltk/ruby/plugins/org.eclipse.dltk.ruby.ui/src/org/eclipse/dltk/ruby/internal/ui/preferences/RubyEditorColoringConfigurationBlock.java,v retrieving revision 1.5 diff -u -r1.5 RubyEditorColoringConfigurationBlock.java --- src/org/eclipse/dltk/ruby/internal/ui/preferences/RubyEditorColoringConfigurationBlock.java 2 Jun 2007 20:32:22 -0000 1.5 +++ src/org/eclipse/dltk/ruby/internal/ui/preferences/RubyEditorColoringConfigurationBlock.java 19 Jun 2007 15:26:55 -0000 @@ -50,10 +50,13 @@ { PreferencesMessages.DLTKEditorPreferencePage_keywords, RubyPreferenceConstants.EDITOR_KEYWORD_COLOR, sCoreCategory }, + + { PreferencesMessages.DLTKEditorPreferencePage_returnKeyword, + RubyPreferenceConstants.EDITOR_KEYWORD_RETURN_COLOR, sCoreCategory }, { PreferencesMessages.DLTKEditorPreferencePage_strings, RubyPreferenceConstants.EDITOR_STRING_COLOR, sCoreCategory }, - + { PreferencesMessages.DLTKEditorPreferencePage_numbers, RubyPreferenceConstants.EDITOR_NUMBER_COLOR, sCoreCategory },