mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[wobbler] try to minimize damage to platform
GitOrigin-RevId: fcde18b0895f44e4ddd15d32d18bf97faf686303
This commit is contained in:
committed by
intellij-monorepo-bot
parent
76a0e8cdea
commit
dbdb5fc964
+10
-13
@@ -131,21 +131,18 @@ public class JavaFileManagerImpl implements JavaFileManager, Disposable {
|
||||
return bestClass;
|
||||
}
|
||||
|
||||
protected boolean hasAcceptablePackage(@NotNull VirtualFile vFile) {
|
||||
private boolean hasAcceptablePackage(@NotNull VirtualFile vFile) {
|
||||
if (FileTypeRegistry.getInstance().isFileOfType(vFile, JavaClassFileType.INSTANCE)) {
|
||||
// See IDEADEV-5626
|
||||
var prm = ProjectRootManager.getInstance(myManager.getProject());
|
||||
if (prm != null) {
|
||||
ProjectFileIndex index = prm.getFileIndex();
|
||||
boolean checkMultiRelease = index.isInLibrary(vFile);
|
||||
VirtualFile root = index.getClassRootForFile(vFile);
|
||||
VirtualFile parent = vFile.getParent();
|
||||
PsiNameHelper nameHelper = PsiNameHelper.getInstance(myManager.getProject());
|
||||
while (parent != null && !Comparing.equal(parent, root) &&
|
||||
(!checkMultiRelease || JavaMultiReleaseUtil.getVersionForVersionRoot(root, parent) == null)) {
|
||||
if (!nameHelper.isIdentifier(parent.getName())) return false;
|
||||
parent = parent.getParent();
|
||||
}
|
||||
ProjectFileIndex index = ProjectRootManager.getInstance(myManager.getProject()).getFileIndex();
|
||||
boolean checkMultiRelease = index.isInLibrary(vFile);
|
||||
VirtualFile root = index.getClassRootForFile(vFile);
|
||||
VirtualFile parent = vFile.getParent();
|
||||
PsiNameHelper nameHelper = PsiNameHelper.getInstance(myManager.getProject());
|
||||
while (parent != null && !Comparing.equal(parent, root) &&
|
||||
(!checkMultiRelease || JavaMultiReleaseUtil.getVersionForVersionRoot(root, parent) == null)) {
|
||||
if (!nameHelper.isIdentifier(parent.getName())) return false;
|
||||
parent = parent.getParent();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ public final class ClassFileDecompilers {
|
||||
return ApplicationManager.getApplication().getService(ClassFileDecompilers.class);
|
||||
}
|
||||
|
||||
public static final ExtensionPointName<Decompiler> EP_NAME = new ExtensionPointName<>("com.intellij.psi.classFileDecompiler");
|
||||
public final ExtensionPointName<Decompiler> EP_NAME = new ExtensionPointName<>("com.intellij.psi.classFileDecompiler");
|
||||
|
||||
private ClassFileDecompilers() {
|
||||
Application app = ApplicationManager.getApplication();
|
||||
|
||||
@@ -102,8 +102,7 @@ public class JavaFileElementType extends ILightStubFileElementType<PsiJavaFileSt
|
||||
}
|
||||
|
||||
@Override
|
||||
public void indexStub(@NotNull PsiJavaFileStub stub, @NotNull IndexSink sink) {
|
||||
}
|
||||
public void indexStub(@NotNull PsiJavaFileStub stub, @NotNull IndexSink sink) { }
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static void setTestStubVersionModifier(int modifier) {
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import com.intellij.psi.stubs.StringStubIndexExtension
|
||||
import com.intellij.psi.stubs.StubIndexKey
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
|
||||
class KotlinFileFacadeShortNameIndex internal constructor(): StringStubIndexExtension<KtFile>() {
|
||||
class KotlinFileFacadeShortNameIndex internal constructor() : StringStubIndexExtension<KtFile>() {
|
||||
companion object Helper : KotlinStringStubIndexHelper<KtFile>(KtFile::class.java) {
|
||||
override val indexKey: StubIndexKey<String, KtFile> =
|
||||
StubIndexKey.createIndexKey("org.jetbrains.kotlin.idea.stubindex.KotlinFileFacadeShortNameIndex")
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import com.intellij.psi.stubs.StringStubIndexExtension
|
||||
import com.intellij.psi.stubs.StubIndexKey
|
||||
import org.jetbrains.kotlin.psi.KtClassOrObject
|
||||
|
||||
class KotlinFullClassNameIndex internal constructor(): StringStubIndexExtension<KtClassOrObject>() {
|
||||
class KotlinFullClassNameIndex internal constructor() : StringStubIndexExtension<KtClassOrObject>() {
|
||||
companion object Helper : KotlinStringStubIndexHelper<KtClassOrObject>(KtClassOrObject::class.java) {
|
||||
@JvmField
|
||||
@Deprecated("Use the Helper object instead", level = DeprecationLevel.ERROR)
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import com.intellij.psi.stubs.StringStubIndexExtension
|
||||
import com.intellij.psi.stubs.StubIndexKey
|
||||
import org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
|
||||
class KotlinFunctionShortNameIndex internal constructor(): StringStubIndexExtension<KtNamedFunction>() {
|
||||
class KotlinFunctionShortNameIndex internal constructor() : StringStubIndexExtension<KtNamedFunction>() {
|
||||
companion object Helper : KotlinStringStubIndexHelper<KtNamedFunction>(KtNamedFunction::class.java) {
|
||||
override val indexKey: StubIndexKey<String, KtNamedFunction> =
|
||||
StubIndexKey.createIndexKey("org.jetbrains.kotlin.idea.stubindex.KotlinFunctionShortNameIndex")
|
||||
|
||||
Reference in New Issue
Block a user