mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
[java] IDEA-354964 Migrate standard descriptors like JAVA_21 to TYPE_USE annotations
- extract tests, which require old annotations - return old name to method to add annotations GitOrigin-RevId: c559cea10f942f72d5a19176d3ee808d46ad5dd2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
02a2f7bc86
commit
092062f856
@@ -98,7 +98,7 @@ public abstract class LightJavaCodeInsightTestCase extends LightPlatformCodeInsi
|
||||
@Override
|
||||
protected void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) {
|
||||
if (languageLevel.isAtLeast(LanguageLevel.JDK_1_8)) {
|
||||
DefaultLightProjectDescriptor.addJetBrainsAnnotationsJava8AndHigher(model);
|
||||
DefaultLightProjectDescriptor.addJetBrainsAnnotationsWithTypeUse(model);
|
||||
}
|
||||
else {
|
||||
DefaultLightProjectDescriptor.addJetBrainsAnnotations(model);
|
||||
|
||||
@@ -73,11 +73,11 @@ public class DefaultLightProjectDescriptor extends LightProjectDescriptor {
|
||||
return withRepositoryLibrary(JETBRAINS_ANNOTATIONS_COORDINATES);
|
||||
}
|
||||
|
||||
public DefaultLightProjectDescriptor withJetBrainsAnnotationsJava8AndHigher() {
|
||||
public DefaultLightProjectDescriptor withJetBrainsAnnotationsWithTypeUse() {
|
||||
return withRepositoryLibrary(JETBRAINS_ANNOTATIONS_COORDINATES_JAVA_8);
|
||||
}
|
||||
|
||||
public static void addJetBrainsAnnotationsJava8AndHigher(ModifiableRootModel model) {
|
||||
public static void addJetBrainsAnnotationsWithTypeUse(ModifiableRootModel model) {
|
||||
MavenDependencyUtil.addFromMaven(model, JETBRAINS_ANNOTATIONS_COORDINATES_JAVA_8);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public abstract class LightJavaCodeInsightFixtureTestCase extends UsefulTestCase
|
||||
public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) {
|
||||
model.getModuleExtension(LanguageLevelModuleExtension.class).setLanguageLevel(myLanguageLevel);
|
||||
if (myLanguageLevel.isAtLeast(LanguageLevel.JDK_1_8)) {
|
||||
addJetBrainsAnnotationsJava8AndHigher(model);
|
||||
addJetBrainsAnnotationsWithTypeUse(model);
|
||||
}
|
||||
else {
|
||||
addJetBrainsAnnotations(model);
|
||||
|
||||
Reference in New Issue
Block a user