Please explain daemons

I've did some experiments with QFs, highlightings and code refactoring and
all is working pretty well.

However I would like to receive some explanations about the overall Daemon
architecture, FullRehighlightingRequired, rules of ranges invalidations and
overall best practices in this area. For example, I've did something like
this highlighting:
http://www.intellij.net/tracker/resharper/viewSCR?publicId=8699
but as I have the following code in process execute method:

if (!_process.FullRehighlightingRequired)
return null;

I loose highlighting when I change something inside a method. I assume it
only invalidates method's region, but I would like to have a better description.


Thanks in advance.

Sincerely,
Ilya Ryzhenkov


1 comment

1) Daemon is the backgrounf code analyzer
2) Daemon analysis consists of a set of "stages", plugins could create new
stages by thei own
3) When each stage completes, the core recieves from it new highlightings
and the range in the document which was re-analyzed. Normally, the whole
document is reanalyzed, so "FullRehighlightingRequired = true" . This is the
cosy shortcut for the renage set with the single range covering whole
document.

Upon recieveing this info from stage, core removes all highlightings,
produced by this stage from previous run, and sets new ones into document.

The range set is implemented for performance issues. For example, when you
type in some method, daemon will not run static control flow analysis for
other methods, etc.

So the right way for the lightweight stage is to set
FullRehighlightingRequired = true and analyze the whole file on each run

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Ilya Ryzhenkov" <orangy@netix.ru> wrote in message
news:5992f43be1e058c7da066eb0a8cc@news.jetbrains.com...

I've did some experiments with QFs, highlightings and code refactoring and
all is working pretty well.

>

However I would like to receive some explanations about the overall Daemon
architecture, FullRehighlightingRequired, rules of ranges invalidations
and overall best practices in this area. For example, I've did something
like this highlighting:
http://www.intellij.net/tracker/resharper/viewSCR?publicId=8699
but as I have the following code in process execute method:

>

if (!_process.FullRehighlightingRequired)
return null;

>

I loose highlighting when I change something inside a method. I assume it
only invalidates method's region, but I would like to have a better
description.

>

Thanks in advance.

>

Sincerely,
Ilya Ryzhenkov

>



0

Please sign in to leave a comment.