I have a simple Inspection that provides a QuickFix. The fix changes the PsiElement successfully and it basically does only this
MathematicaPsiElementFactory factory = new MathematicaPsiElementFactory(project);
final Expression epxr = factory.createExpressionFromText("1;");
final PsiElement semicolon = epxr.getLastChild();
However, after the quickfix is applied, the editor still shows the error. I tried commiting the document but it doesn't help. Note that when I write a string into the document instead of changing the PsiElement the inspection is re-run.
What am I doing wrong?
Btw, I checked several implementations of QuickFix in the Idea source and they all do it like I do.