|
From: Christopher W. <caw...@us...> - 2005-04-01 01:59:32
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16048/src/org/rubypeople/rdt/internal/ui/text/ruby Modified Files: RubyCodeScanner.java RubyCompletionProcessor.java Log Message: highlight and partition regular expressions separately from code. Handle more ways of defining strings and regexps (like %r, %q, %Q, etc) for syntax highlighting Index: RubyCompletionProcessor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyCompletionProcessor.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RubyCompletionProcessor.java 5 Mar 2005 16:02:37 -0000 1.12 --- RubyCompletionProcessor.java 1 Apr 2005 01:59:21 -0000 1.13 *************** *** 203,210 **** suggestions.add(child.getElementName()); if(child instanceof IParent) ! suggestions.addAll(getElements((IParent)child)); } } catch (RubyModelException e) { - // TODO Auto-generated catch block e.printStackTrace(); } --- 203,209 ---- suggestions.add(child.getElementName()); if(child instanceof IParent) ! suggestions.addAll(getElements((IParent)child)); } } catch (RubyModelException e) { e.printStackTrace(); } Index: RubyCodeScanner.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyCodeScanner.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RubyCodeScanner.java 2 Mar 2005 00:56:52 -0000 1.6 --- RubyCodeScanner.java 1 Apr 2005 01:59:21 -0000 1.7 *************** *** 6,10 **** import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.text.rules.IToken; - import org.eclipse.jface.text.rules.SingleLineRule; import org.eclipse.jface.text.rules.WordRule; import org.rubypeople.rdt.internal.ui.text.IRubyColorConstants; --- 6,9 ---- *************** *** 17,21 **** protected String[] keywords; ! private static String[] fgTokenProperties = { IRubyColorConstants.RUBY_KEYWORD, IRubyColorConstants.RUBY_STRING, IRubyColorConstants.RUBY_DEFAULT // TODO Add Ability to set colors for return and operators // IRubyColorConstants.RUBY_METHOD_NAME, --- 16,20 ---- protected String[] keywords; ! private static String[] fgTokenProperties = { IRubyColorConstants.RUBY_KEYWORD, IRubyColorConstants.RUBY_DEFAULT // TODO Add Ability to set colors for return and operators // IRubyColorConstants.RUBY_METHOD_NAME, *************** *** 47,54 **** List rules = new ArrayList(); - IToken token = getToken(IRubyColorConstants.RUBY_STRING); - rules.add(new SingleLineRule("'", "'", token, '\\')); - rules.add(new SingleLineRule("/", "/", token, '\\')); - IToken defToken = getToken(IRubyColorConstants.RUBY_DEFAULT); setDefaultReturnToken(defToken); --- 46,49 ---- *************** *** 56,60 **** rules.add(wordRule); ! token = getToken(IRubyColorConstants.RUBY_KEYWORD); String[] keywords = RubyTextTools.getKeyWords(); for (int keyWordIndex = 0; keyWordIndex < keywords.length; keyWordIndex++) --- 51,55 ---- rules.add(wordRule); ! IToken token = getToken(IRubyColorConstants.RUBY_KEYWORD); String[] keywords = RubyTextTools.getKeyWords(); for (int keyWordIndex = 0; keyWordIndex < keywords.length; keyWordIndex++) |