[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] Re: Incremental parsing in JDT

Orly Goren wrote:
Thanks! this info is very helpful.

Is this parsing done when there is request for code assist, or is there some thread running the parser in the background? Is there some caching done to be used when next parsing this file?

This parsing is done when there is a code assist request. The result of this parse isn't keep and disappear after the code assist request.


Is the code assist completions based upon the parsing alone, or also on some Indexer (like it is for CDT)? If it is based also on the Indexer, what is the indexer results for? i.e. what are they different from the parser results), and what is the information kept in the indexer..


The Search indexes are used to find types proposals when a simple name is completed. Code assist can also use the eclipse Java Model. So code assist doesn't use caching for the completed compilation unit but benefit from the Search caching (indexes) and Java Model caching for all other compilation units.


Is there any connection between the parsing done for code assist and the parsing done for syntax error highlighting? (I assume not since the parser done for code assist doesn't enter function declarations...)

There is no connection between these parsing. However the both parser classes inherit from the same class: Parser. Code assist parser is CompletionParser and the syntax error highlighting parser is SourceElementPaser.


Is the parsing done for syntax-error highlighting done in the background? Is it run repeatedly on edited files (when parser finishes, it is rerun)?

The syntax error highlighting can be done when you build or when you modify the content of a compilation unit (the reconcile). I believe that both are done in background.



Lot's of questions...

Thanks!!!
Orly



David