[devkit] IJPL-158473 move ApiSourceArchive displayName values to properties

(cherry picked from commit 634a56a5c583f2cd6f7550399210401f0e45f0d4)

IJ-CR-140104

GitOrigin-RevId: 750c8a77562680896153865b92040f461281de78
This commit is contained in:
Jakub Chrzanowski
2024-07-17 15:23:47 +02:00
committed by intellij-monorepo-bot
parent 6f8257c235
commit 6c25cc9c1d
3 changed files with 26 additions and 16 deletions

View File

@@ -4,3 +4,12 @@ attachSources.intellijPlatform.action.name=Download IntelliJ Platform sources
attachSources.intellijPlatform.action.busyText=Downloading IntelliJ Platform sources\u2026
attachSources.api.action.name=Attach {0} sources
attachSources.api.action.busyText=Attaching {0} sources\u2026
attachSources.api.action.displayName.css=CSS plugin API
attachSources.api.action.displayName.database=Database plugin API
attachSources.api.action.displayName.jam=JAM plugin API
attachSources.api.action.displayName.javaee=JavaEE plugin API
attachSources.api.action.displayName.persistence=Persistence plugin API
attachSources.api.action.displayName.spring=Spring plugin API
attachSources.api.action.displayName.springBoot=SpringBoot plugin API
attachSources.api.action.displayName.tomcat=Tomcat plugin API
attachSources.api.action.displayName.lsp=IntelliJ Platform LSP-API

View File

@@ -8,23 +8,23 @@ import java.util.function.Supplier;
final class DevKitGradleBundle {
private static final @NonNls String BUNDLE_FQN = "messages.DevKitGradleBundle";
private static final DynamicBundle BUNDLE = new DynamicBundle(DevKitGradleBundle.class, BUNDLE_FQN);
public static final @NonNls String BUNDLE = "messages.DevKitGradleBundle";
private static final DynamicBundle INSTANCE = new DynamicBundle(DevKitGradleBundle.class, BUNDLE);
private DevKitGradleBundle() {
}
public static @Nls @NotNull String message(
@PropertyKey(resourceBundle = BUNDLE_FQN) @NotNull String key,
@PropertyKey(resourceBundle = BUNDLE) @NotNull String key,
@Nullable Object @NotNull ... params
) {
return BUNDLE.getMessage(key, params);
return INSTANCE.getMessage(key, params);
}
public static @NotNull Supplier<@Nls @NotNull String> messagePointer(
@PropertyKey(resourceBundle = BUNDLE_FQN) @NotNull String key,
@PropertyKey(resourceBundle = BUNDLE) @NotNull String key,
@Nullable Object @NotNull ... params
) {
return BUNDLE.getLazyMessage(key, params);
return INSTANCE.getLazyMessage(key, params);
}
}

View File

@@ -11,6 +11,7 @@ import com.intellij.openapi.roots.LibraryOrderEntry
import com.intellij.openapi.util.ActionCallback
import com.intellij.openapi.vfs.VfsUtilCore
import com.intellij.psi.PsiFile
import org.jetbrains.annotations.PropertyKey
import org.jetbrains.idea.devkit.projectRoots.IntelliJPlatformProduct
import org.jetbrains.idea.devkit.run.ProductInfo
import org.jetbrains.idea.devkit.run.loadProductInfo
@@ -24,18 +25,18 @@ import kotlin.io.path.pathString
internal enum class ApiSourceArchive(
val id: String,
val displayName: String,
@PropertyKey(resourceBundle = DevKitGradleBundle.BUNDLE) val displayName: String,
val archiveName: String,
) {
CSS("com.intellij.css", "CSS plugin API", "src_css-api.zip"),
DATABASE("com.intellij.database", "Database plugin API", "src_database-openapi.zip"),
JAM("com.intellij.java", "JAM plugin API", "src_jam-openapi.zip"),
JAVAEE("com.intellij.javaee", "JavaEE plugin API", "src_javaee-openapi.zip"),
PERSISTENCE("com.intellij.persistence", "Persistence plugin API", "src_persistence-openapi.zip"),
SPRING("com.intellij.spring", "Spring plugin API", "src_spring-openapi.zip"),
SPRING_BOOT("com.intellij.spring.boot", "SpringBoot plugin API", "src_spring-boot-openapi.zip"),
TOMCAT("Tomcat", "Tomcat plugin API", "src_tomcat.zip"),
LSP("LSP", "IntelliJ Platform LSP-API", "src_lsp-openapi.zip"),
CSS("com.intellij.css", "attachSources.api.action.displayName.css", "src_css-api.zip"),
DATABASE("com.intellij.database", "attachSources.api.action.displayName.database", "src_database-openapi.zip"),
JAM("com.intellij.java", "attachSources.api.action.displayName.jam", "src_jam-openapi.zip"),
JAVAEE("com.intellij.javaee", "attachSources.api.action.displayName.javaee", "src_javaee-openapi.zip"),
PERSISTENCE("com.intellij.persistence", "attachSources.api.action.displayName.persistence", "src_persistence-openapi.zip"),
SPRING("com.intellij.spring", "attachSources.api.action.displayName.spring", "src_spring-openapi.zip"),
SPRING_BOOT("com.intellij.spring.boot", "attachSources.api.action.displayName.springBoot", "src_spring-boot-openapi.zip"),
TOMCAT("Tomcat", "attachSources.api.action.displayName.tomcat", "src_tomcat.zip"),
LSP("LSP", "attachSources.api.action.displayName.lsp", "src_lsp-openapi.zip"),
}
/**