murphee, Mirko, all,
On 2/26/07, Werner Schuster (murphee) <[EMAIL PROTECTED]> wrote:
Mirko Stocker wrote:
> @the other developers: If someone can provide me with some hints how to
do an
> AST based coloring, I'd be glad to look at it. Especially the problems
with
> here documents are frustrating me...
>
Well, Step 1 would be updating an AST (reparsing) after keystrokes or
bursts of keystrokes.
It'd be best to just dump that on the reconciler thread to happen after
a few hundred milliseconds after the last keystroke.
Yeah, I'd use the existing infrastructure for this (which includes the
reconciler). You should be able to register as a listener of some sort
(probably an IElementListener on RubyCore) to be notified of whne to
re-parse.
But as I said, there's big potential problems with an AST based colorer
right now....
I haven't looked at the way heredocs are handled now (static rules, I
guess), but you could
- in the SourceViewerConfiguration.getRepresentationReconciler do
reconciler.setDamager(textRepairer, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(textRepairer, IDocument.DEFAULT_CONTENT_TYPE)
where textRepairer is a DefaultDamagerRepairer;
- this would access the AST to see where to paint heredocs;
Hm... come to think of it: is there an easier way of spotting heredocs
than looking at the AST?
Perl has heredocs, right? Has anyone taken a look at EPIC to see if they
handle them properly?
Thanks,
Chris
--
http://cwilliams.textdriven.com
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rubyeclipse-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rubyeclipse-development