mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Do not call preformat processors for invalid PSI [CR-IC-1847]
This commit is contained in:
+1
-4
@@ -255,10 +255,7 @@ public class CodeFormatterFacade {
|
||||
private static TextRange preprocess(@NotNull final ASTNode node, @NotNull TextRange range) {
|
||||
TextRange result = range;
|
||||
PsiElement psi = node.getPsi();
|
||||
if (!psi.isValid()) {
|
||||
for(PreFormatProcessor processor: Extensions.getExtensions(PreFormatProcessor.EP_NAME)) {
|
||||
result = processor.process(node, result);
|
||||
}
|
||||
if (!psi.isValid()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user