|
From: Christopher W. <caw...@us...> - 2006-04-22 23:36:57
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22586/src/org/rubypeople/rdt/internal/ui/text Modified Files: RubyDoubleClickSelector.java RubyWordFinder.java Log Message: tweak word selection (for hover and double-clicking) - don't pick up commas Index: RubyDoubleClickSelector.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyDoubleClickSelector.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RubyDoubleClickSelector.java 12 Dec 2005 19:59:58 -0000 1.1 --- RubyDoubleClickSelector.java 22 Apr 2006 23:36:54 -0000 1.2 *************** *** 13,17 **** IRegion region = RubyWordFinder.findWord(text.getDocument(), position); if (region != null && region.getLength() != 0 ) text.setSelectedRange(region.getOffset(), region.getLength()); - } } \ No newline at end of file --- 13,16 ---- Index: RubyWordFinder.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyWordFinder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RubyWordFinder.java 12 Dec 2005 19:59:58 -0000 1.2 --- RubyWordFinder.java 22 Apr 2006 23:36:54 -0000 1.3 *************** *** 22,26 **** */ private static final char[] BOUNDARIES = { ' ', '\n', '\t', '\r', '.', '(', ')', '{', '}', '[', ! ']', '=', '*', '+', '-', '"', '\'', '#'}; public static IRegion findWord(IDocument document, int offset) { int start = -1; --- 22,26 ---- */ private static final char[] BOUNDARIES = { ' ', '\n', '\t', '\r', '.', '(', ')', '{', '}', '[', ! ']', '=', '*', '+', '-', '"', '\'', '#', ','}; public static IRegion findWord(IDocument document, int offset) { int start = -1; |