Disable tracking of Kotlin files by Java OOCB listener
This commit is contained in:
@@ -43,7 +43,7 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class KtFile extends PsiFileBase implements KtDeclarationContainer, KtAnnotated, KtElement, PsiClassOwner, PsiNamedElement {
|
||||
public class KtFile extends PsiFileBase implements KtDeclarationContainer, KtAnnotated, KtElement, PsiClassOwner, PsiNamedElement, PsiModifiableCodeBlock {
|
||||
|
||||
private final boolean isCompiled;
|
||||
private Boolean isScript = null;
|
||||
@@ -294,4 +294,10 @@ public class KtFile extends PsiFileBase implements KtDeclarationContainer, KtAnn
|
||||
public KtElement getPsiOrParent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldChangeModificationCount(PsiElement place) {
|
||||
// Modification count for Kotlin files is tracked entirely by KotlinCodeBlockModificationListener
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
// TRUE
|
||||
// Can't result to false as there's no body expression, so it's considered to be changes in JavaCodeBlockModificationListener.
|
||||
// FALSE
|
||||
|
||||
open class A(a: () -> Unit) {
|
||||
constructor(f: (String) -> Unit) : this({ -> f("") })
|
||||
}
|
||||
|
||||
class B: A({ s<caret> -> "1" })
|
||||
|
||||
// SKIP_ANALYZE_CHECK
|
||||
Reference in New Issue
Block a user