mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
[java-highlighting] IDEA-339935 JEP 463
- rename unnamed classes to implicitly declared classes GitOrigin-RevId: 2c6d7f16a1dc6d2371b8f8b5f5675246c9bc99f9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9e479dc1a2
commit
3f86cf9292
@@ -48,7 +48,7 @@
|
||||
<stubIndex implementation="com.intellij.psi.impl.java.stubs.index.JavaFieldNameIndex"/>
|
||||
<stubIndex implementation="com.intellij.psi.impl.java.stubs.index.JavaAnonymousClassBaseRefOccurenceIndex"/>
|
||||
<stubIndex implementation="com.intellij.psi.impl.java.stubs.index.JavaAnnotationIndex"/>
|
||||
<stubIndex implementation="com.intellij.psi.impl.java.stubs.index.JavaUnnamedClassIndex"/>
|
||||
<stubIndex implementation="com.intellij.psi.impl.java.stubs.index.JavaImplicitClassIndex"/>
|
||||
<java.shortNamesCache implementation="com.intellij.psi.impl.PsiShortNamesCacheImpl"/>
|
||||
<java.staticMethodNamesCache implementation="com.intellij.psi.impl.JavaStaticMethodNameCacheImpl" order="first"/>
|
||||
<projectService serviceInterface="com.intellij.psi.search.PsiShortNamesCache"
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.psi.impl.java.stubs.index;
|
||||
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.PsiImplicitClass;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.psi.stubs.StringStubIndexExtension;
|
||||
import com.intellij.psi.stubs.StubIndex;
|
||||
import com.intellij.psi.stubs.StubIndexKey;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class JavaImplicitClassIndex extends StringStubIndexExtension<PsiImplicitClass> {
|
||||
private static final JavaImplicitClassIndex ourInstance = new JavaImplicitClassIndex();
|
||||
|
||||
public static JavaImplicitClassIndex getInstance() {
|
||||
return ourInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull StubIndexKey<String, PsiImplicitClass> getKey() {
|
||||
return JavaStubIndexKeys.IMPLICIT_CLASSES;
|
||||
}
|
||||
|
||||
public Collection<String> getAllClasses(@NotNull Project project) {
|
||||
return StubIndex.getInstance().getAllKeys(getKey(), project);
|
||||
}
|
||||
|
||||
public @NotNull Collection<PsiImplicitClass> getElements(@NotNull String key,
|
||||
@NotNull Project project,
|
||||
@Nullable GlobalSearchScope scope) {
|
||||
return StubIndex.getElements(JavaStubIndexKeys.IMPLICIT_CLASSES, key, project, scope, PsiImplicitClass.class);
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.psi.impl.java.stubs.index;
|
||||
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.PsiUnnamedClass;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.psi.stubs.StringStubIndexExtension;
|
||||
import com.intellij.psi.stubs.StubIndex;
|
||||
import com.intellij.psi.stubs.StubIndexKey;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class JavaUnnamedClassIndex extends StringStubIndexExtension<PsiUnnamedClass> {
|
||||
private static final JavaUnnamedClassIndex ourInstance = new JavaUnnamedClassIndex();
|
||||
|
||||
public static JavaUnnamedClassIndex getInstance() {
|
||||
return ourInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull StubIndexKey<String, PsiUnnamedClass> getKey() {
|
||||
return JavaStubIndexKeys.UNNAMED_CLASSES;
|
||||
}
|
||||
|
||||
public Collection<String> getAllClasses(@NotNull Project project) {
|
||||
return StubIndex.getInstance().getAllKeys(getKey(), project);
|
||||
}
|
||||
|
||||
public @NotNull Collection<PsiUnnamedClass> getElements(@NotNull String key, @NotNull Project project, @Nullable GlobalSearchScope scope) {
|
||||
return StubIndex.getElements(JavaStubIndexKeys.UNNAMED_CLASSES, key, project, scope, PsiUnnamedClass.class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user