can I invalidate FoldingBuilder

Answered

Hi,

I've implemented a FoldingBuilder for a custom language. 
I'd like to invalidate the folding for the file if certain instances of Psi element change. 
i.e.

if (psiElement instanceof XXX) { 
    triggerFoldingAgain(); 
}

Also I'd like to invalidate the folding in case *.properties file changes.

 

the folding text depends on either properties file or other psielements within the file. 

Is this doable?

1 comment
Comment actions Permalink

You can pass in dependencies in FoldingDescriptor CTOR.

0

Please sign in to leave a comment.