Intellij plugin api method forcePsiPostprocessAndRestoreElement purpose -
Intellij plugin api method forcePsiPostprocessAndRestoreElement purpose -
i'm trying modify plugin supports older version of thought (ic-129). 1 of problems i've faced uses forcepsipostprocessandrestoreelement
codeinsightutilcore
class not exist in older sdk. after reading source code still don't understand method doing. can explain it's meaning or(and) point old way of doing same thing?
when modifying psi, formatting applied @ end of write action or @ explicit phone call of dopostponedoperationsandunblockdocument. phone call may necessary if need modify document, otherwise you'll assertion psi modification not yet finish (formatting missing). since formatting alter document , psi, psielement have might invalidated, or @ to the lowest degree range changed.
forcepsipostprocessandrestoreelement performs postponed formatting , tries find in updated tree psielement corresponding 1 you've held before, might need farther processing.
alternatively, can create smartpsielementpointer element , hope survive formatter modifications (usually will).
intellij-idea idea-plugin
Comments
Post a Comment