From: Christopher W. <cwi...@ro...> - 2006-06-19 21:48:50
|
On Jun 19, 2006, at 11:59 AM, Mirko Stocker wrote: > Hi! > > Since I fixed a lot of position-errors in the jruby-ast, the > highlighting of > selected outline elements (don't know how to call it, I hope you > know what I > mean) isn't correct anymore. I think I once saw method you guys are > using to > calculate the correct positions, but I can't find it anymore :-) > Does anybody > know where I can fix this? We do the selection handling in RubyAbstractEditor for the outline: org.rubypeople.rdt.internal.ui.rubyeditor.RubyAbstractEditor.setSelectio n() We create the positions in RubyScriptSturctureBuilder: org.rubypeople.rdt.internal.core.RubyScriptStructureBuilder I had some hacks in to fix positions before, but I'm not sure where they are now. If anything they ought to be closest to parsing which is the structure builder, maybe I managed to catch all the cases in the setKeywordRange and setTokenRange methods... In any case, I know that lack of CommentNodes was causing some off-by- one position problems before. JRuby's parser would eat up lines with only comments and carriage returns on it, and our offsets would end up off by the number of carriage returns eaten. BTW, Do you want to be added as an RDT developer so you can directly apply patches to our codebase and then use svn:externals to keep in sync? Thanks, Chris |