Check PSI file validity for EA-87814

This commit is contained in:
Rustam Vishnyakov
2017-11-07 15:54:12 +03:00
parent eb4842352a
commit d103c296e3
@@ -106,6 +106,7 @@ public class ReformatCodeProcessor extends AbstractLayoutCodeProcessor {
protected FutureTask<Boolean> prepareTask(@NotNull final PsiFile file, final boolean processChangedTextOnly)
throws IncorrectOperationException
{
LOG.assertTrue(file.isValid(), "Invalid Psi file, name: " + file.getName() + " , class: " + file.getClass().getSimpleName());
return new FutureTask<>(() -> {
FormattingProgressTask.FORMATTING_CANCELLED_FLAG.set(false);
try {