mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] rename JavaCoreBundle to JavaPsiBundle for consistency with the module name (IDEA-229829)
And move the corresponding properties file to a resource root for consistency with other modules. GitOrigin-RevId: 10b8cd635e496f744f4c8c519ff9046ead78e07e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b912cab6b6
commit
d5944cf325
@@ -2,7 +2,7 @@
|
||||
package com.intellij.jarRepository;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
import com.intellij.core.JavaCoreBundle;
|
||||
import com.intellij.core.JavaPsiBundle;
|
||||
import com.intellij.ide.IdeBundle;
|
||||
import com.intellij.jarRepository.services.MavenRepositoryServicesManager;
|
||||
import com.intellij.notification.Notification;
|
||||
@@ -313,7 +313,7 @@ public class JarRepositoryManager {
|
||||
else {
|
||||
template = new RepositoryArtifactDescription(new RepositoryLibraryProperties(coord, packaging, true), null);
|
||||
}
|
||||
ProgressManager.getInstance().run(new Task.Backgroundable(project, JavaCoreBundle.message("task.background.title.maven"), false) {
|
||||
ProgressManager.getInstance().run(new Task.Backgroundable(project, JavaPsiBundle.message("task.background.title.maven"), false) {
|
||||
@Override
|
||||
public void run(@NotNull ProgressIndicator indicator) {
|
||||
final List<Pair<RepositoryArtifactDescription, RemoteRepositoryDescription>> resultList = new ArrayList<>();
|
||||
@@ -352,7 +352,7 @@ public class JarRepositoryManager {
|
||||
public static void searchRepositories(Project project,
|
||||
Collection<String> serviceUrls,
|
||||
Processor<? super Collection<RemoteRepositoryDescription>> resultProcessor) {
|
||||
ProgressManager.getInstance().run(new Task.Backgroundable(project, JavaCoreBundle.message("task.background.title.maven"), false) {
|
||||
ProgressManager.getInstance().run(new Task.Backgroundable(project, JavaPsiBundle.message("task.background.title.maven"), false) {
|
||||
@Override
|
||||
public void run(@NotNull ProgressIndicator indicator) {
|
||||
final Ref<List<RemoteRepositoryDescription>> result = Ref.create(Collections.emptyList());
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
package com.intellij.openapi.roots.ui.configuration;
|
||||
|
||||
import com.intellij.core.JavaCoreBundle;
|
||||
import com.intellij.core.JavaPsiBundle;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.util.BrowseFilesListener;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
@@ -304,7 +304,7 @@ public class ProjectConfigurable extends ProjectStructureElementConfigurable<Pro
|
||||
}
|
||||
|
||||
private void createUIComponents() {
|
||||
myLanguageLevelCombo = new LanguageLevelCombo(JavaCoreBundle.message("default.language.level.description")) {
|
||||
myLanguageLevelCombo = new LanguageLevelCombo(JavaPsiBundle.message("default.language.level.description")) {
|
||||
@Override
|
||||
protected LanguageLevel getDefaultLevel() {
|
||||
Sdk sdk = myProjectJdkConfigurable.getSelectedProjectJdk();
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package com.intellij.codeInsight.template;
|
||||
|
||||
import com.intellij.core.JavaCoreBundle;
|
||||
import com.intellij.core.JavaPsiBundle;
|
||||
import com.intellij.lang.java.JavaLanguage;
|
||||
import com.intellij.psi.PsiComment;
|
||||
import com.intellij.psi.PsiElement;
|
||||
@@ -30,7 +30,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public class JavaCommentContextType extends TemplateContextType {
|
||||
public JavaCommentContextType() {
|
||||
super("JAVA_COMMENT", JavaCoreBundle.message("context.type.java.comment"), JavaCodeContextType.Generic.class);
|
||||
super("JAVA_COMMENT", JavaPsiBundle.message("context.type.java.comment"), JavaCodeContextType.Generic.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package com.intellij.codeInsight.template;
|
||||
|
||||
import com.intellij.core.JavaCoreBundle;
|
||||
import com.intellij.core.JavaPsiBundle;
|
||||
import com.intellij.lang.java.JavaLanguage;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
@@ -29,7 +29,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public class JavaStringContextType extends TemplateContextType {
|
||||
public JavaStringContextType() {
|
||||
super("JAVA_STRING", JavaCoreBundle.message("context.type.string"), JavaCodeContextType.Generic.class);
|
||||
super("JAVA_STRING", JavaPsiBundle.message("context.type.string"), JavaCodeContextType.Generic.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
|
||||
+4
-4
@@ -22,11 +22,11 @@ import org.jetbrains.annotations.PropertyKey;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class JavaCoreBundle extends DynamicBundle {
|
||||
@NonNls private static final String BUNDLE = "messages.JavaCoreBundle";
|
||||
private static final JavaCoreBundle INSTANCE = new JavaCoreBundle();
|
||||
public class JavaPsiBundle extends DynamicBundle {
|
||||
@NonNls private static final String BUNDLE = "messages.JavaPsiBundle";
|
||||
private static final JavaPsiBundle INSTANCE = new JavaPsiBundle();
|
||||
|
||||
private JavaCoreBundle() { super(BUNDLE); }
|
||||
private JavaPsiBundle() { super(BUNDLE); }
|
||||
|
||||
@NotNull
|
||||
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.pom.java;
|
||||
|
||||
import com.intellij.core.JavaCoreBundle;
|
||||
import com.intellij.core.JavaPsiBundle;
|
||||
import com.intellij.openapi.projectRoots.JavaSdkVersion;
|
||||
import com.intellij.openapi.roots.LanguageLevelModuleExtension;
|
||||
import com.intellij.openapi.roots.LanguageLevelProjectExtension;
|
||||
@@ -22,21 +22,21 @@ import org.jetbrains.annotations.Nullable;
|
||||
* @see JavaSdkVersion
|
||||
*/
|
||||
public enum LanguageLevel {
|
||||
JDK_1_3(JavaCoreBundle.message("jdk.1.3.language.level.description"), 3),
|
||||
JDK_1_4(JavaCoreBundle.message("jdk.1.4.language.level.description"), 4),
|
||||
JDK_1_5(JavaCoreBundle.message("jdk.1.5.language.level.description"), 5),
|
||||
JDK_1_6(JavaCoreBundle.message("jdk.1.6.language.level.description"), 6),
|
||||
JDK_1_7(JavaCoreBundle.message("jdk.1.7.language.level.description"), 7),
|
||||
JDK_1_8(JavaCoreBundle.message("jdk.1.8.language.level.description"), 8),
|
||||
JDK_1_9(JavaCoreBundle.message("jdk.1.9.language.level.description"), 9),
|
||||
JDK_10(JavaCoreBundle.message("jdk.10.language.level.description"), 10),
|
||||
JDK_11(JavaCoreBundle.message("jdk.11.language.level.description"), 11),
|
||||
JDK_12(JavaCoreBundle.message("jdk.12.language.level.description"), 12),
|
||||
JDK_13(JavaCoreBundle.message("jdk.13.language.level.description"), 13),
|
||||
JDK_13_PREVIEW(JavaCoreBundle.message("jdk.13.preview.language.level.description"), 13),
|
||||
JDK_14(JavaCoreBundle.message("jdk.14.language.level.description"), 14),
|
||||
JDK_14_PREVIEW(JavaCoreBundle.message("jdk.14.preview.language.level.description"), 14),
|
||||
JDK_X(JavaCoreBundle.message("jdk.X.language.level.description"), 15);
|
||||
JDK_1_3(JavaPsiBundle.message("jdk.1.3.language.level.description"), 3),
|
||||
JDK_1_4(JavaPsiBundle.message("jdk.1.4.language.level.description"), 4),
|
||||
JDK_1_5(JavaPsiBundle.message("jdk.1.5.language.level.description"), 5),
|
||||
JDK_1_6(JavaPsiBundle.message("jdk.1.6.language.level.description"), 6),
|
||||
JDK_1_7(JavaPsiBundle.message("jdk.1.7.language.level.description"), 7),
|
||||
JDK_1_8(JavaPsiBundle.message("jdk.1.8.language.level.description"), 8),
|
||||
JDK_1_9(JavaPsiBundle.message("jdk.1.9.language.level.description"), 9),
|
||||
JDK_10(JavaPsiBundle.message("jdk.10.language.level.description"), 10),
|
||||
JDK_11(JavaPsiBundle.message("jdk.11.language.level.description"), 11),
|
||||
JDK_12(JavaPsiBundle.message("jdk.12.language.level.description"), 12),
|
||||
JDK_13(JavaPsiBundle.message("jdk.13.language.level.description"), 13),
|
||||
JDK_13_PREVIEW(JavaPsiBundle.message("jdk.13.preview.language.level.description"), 13),
|
||||
JDK_14(JavaPsiBundle.message("jdk.14.language.level.description"), 14),
|
||||
JDK_14_PREVIEW(JavaPsiBundle.message("jdk.14.preview.language.level.description"), 14),
|
||||
JDK_X(JavaPsiBundle.message("jdk.X.language.level.description"), 15);
|
||||
|
||||
public static final LanguageLevel HIGHEST = JDK_13;
|
||||
public static final Key<LanguageLevel> KEY = Key.create("LANGUAGE_LEVEL");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.psi.util;
|
||||
|
||||
import com.intellij.core.JavaCoreBundle;
|
||||
import com.intellij.core.JavaPsiBundle;
|
||||
import com.intellij.psi.*;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -41,7 +41,7 @@ public enum JavaElementKind {
|
||||
*/
|
||||
@Nls
|
||||
public @NotNull String subject() {
|
||||
return JavaCoreBundle.message("element." + name().toLowerCase(Locale.ROOT), 0);
|
||||
return JavaPsiBundle.message("element." + name().toLowerCase(Locale.ROOT), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -49,7 +49,7 @@ public enum JavaElementKind {
|
||||
*/
|
||||
@Nls
|
||||
public @NotNull String object() {
|
||||
return JavaCoreBundle.message("element." + name().toLowerCase(Locale.ROOT), 1);
|
||||
return JavaPsiBundle.message("element." + name().toLowerCase(Locale.ROOT), 1);
|
||||
}
|
||||
|
||||
public static JavaElementKind fromElement(@NotNull PsiElement element) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.psi.impl.compiled;
|
||||
|
||||
import com.intellij.core.JavaCoreBundle;
|
||||
import com.intellij.core.JavaPsiBundle;
|
||||
import com.intellij.lang.ASTNode;
|
||||
import com.intellij.lang.Language;
|
||||
import com.intellij.lang.java.JavaLanguage;
|
||||
@@ -98,7 +98,7 @@ public abstract class ClsElementImpl extends PsiElementBase implements PsiCompil
|
||||
static IncorrectOperationException cannotModifyException(@NotNull PsiCompiledElement element) {
|
||||
VirtualFile virtualFile = PsiUtilCore.getVirtualFile(element);
|
||||
String path = virtualFile == null ? "?" : virtualFile.getPresentableUrl();
|
||||
return new IncorrectOperationException(JavaCoreBundle.message("psi.error.attempt.to.edit.class.file", path));
|
||||
return new IncorrectOperationException(JavaPsiBundle.message("psi.error.attempt.to.edit.class.file", path));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.psi.impl.source;
|
||||
|
||||
import com.intellij.core.JavaCoreBundle;
|
||||
import com.intellij.core.JavaPsiBundle;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.psi.*;
|
||||
@@ -37,7 +37,7 @@ public class PsiJavaModuleReferenceImpl extends PsiReferenceBase.Poly<PsiJavaMod
|
||||
public PsiElement handleElementRename(@NotNull String newName) throws IncorrectOperationException {
|
||||
PsiJavaModuleReferenceElement element = getElement();
|
||||
if (element instanceof PsiCompiledElement) {
|
||||
throw new IncorrectOperationException(JavaCoreBundle.message("psi.error.attempt.to.edit.class.file", element.getContainingFile()));
|
||||
throw new IncorrectOperationException(JavaPsiBundle.message("psi.error.attempt.to.edit.class.file", element.getContainingFile()));
|
||||
}
|
||||
PsiElement newElement = PsiElementFactory.getInstance(element.getProject()).createModuleReferenceFromText(newName, null);
|
||||
return element.replace(newElement);
|
||||
|
||||
Reference in New Issue
Block a user