Autoreparse action

How do I trigger a non-inspection off of an autoreparse-triggered delay?  I have work I want to do that isn't trivial, so I don't want to do it on every keystroke.  The keystroke delay seems set up for that.

4 comments

Hello Ken,

How do I trigger a non-inspection off of an autoreparse-triggered
delay?  I have work I want to do that isn't trivial, so I don't want
to do it on every keystroke.  The keystroke delay seems set up for
that.


One option is to create a highlighting pass (see the TextEditorHighlightingPassFactory
API). However, it might not be a good fit for the type of processing you're
trying to do.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

That might work.  There also seems to be some delay between the typing and and getting the PsiTreeChangeListener.childReplace, etc.

0

Hello Ken,

That might work.  There also seems to be some delay between the typing
and and getting the PsiTreeChangeListener.childReplace, etc.


The reparse usually happens as the first thing when the background code analysis
starts (300 ms after typing). That's when you get the PSI change notifications.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Ah, so that makes these change notifications the best trigger for my work — they tell me the changes, batched up based on the reparse delay.  Thanks!

0

Please sign in to leave a comment.