[i18n] move some properties used in java.structureView module to a separate bundle (IDEA-209382)

GitOrigin-RevId: c557ec792cc54a169d5e1022d5c92a8ac481b39d
This commit is contained in:
nik
2020-02-17 09:35:37 +03:00
committed by intellij-monorepo-bot
parent aa5940670f
commit 2e187bfd6d
10 changed files with 40 additions and 15 deletions

View File

@@ -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" />

View File

@@ -0,0 +1,6 @@
action.structureview.show.non.public=Show non-public
action.structureview.show.properties=Show Properties
file.structure.toggle.show.anonymous.classes=Anonymous Classes
file.structure.toggle.show.collapse.show.lambdas=Lambdas
static.class.initializer={0}class initializer

View File

@@ -15,7 +15,6 @@
*/
package com.intellij.ide.structureView.impl.java;
import com.intellij.codeInsight.CodeInsightBundle;
import com.intellij.ide.structureView.StructureViewTreeElement;
import com.intellij.ide.structureView.impl.common.PsiTreeElementBase;
import com.intellij.openapi.util.text.StringUtil;
@@ -36,7 +35,7 @@ public class ClassInitializerTreeElement extends PsiTreeElementBase<PsiClassInit
PsiClassInitializer initializer = getElement();
assert initializer != null;
String isStatic = initializer.hasModifierProperty(PsiModifier.STATIC) ? PsiModifier.STATIC + " " : "";
return CodeInsightBundle.message("static.class.initializer", isStatic);
return JavaStructureViewBundle.message("static.class.initializer", isStatic);
}
@Override

View File

@@ -1,7 +1,6 @@
// 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.ide.structureView.impl.java;
import com.intellij.ide.IdeBundle;
import com.intellij.ide.structureView.impl.common.PsiTreeElementBase;
import com.intellij.ide.util.FileStructureNodeProvider;
import com.intellij.ide.util.treeView.smartTree.ActionPresentation;
@@ -56,7 +55,7 @@ public class JavaAnonymousClassesNodeProvider
@NotNull
@Override
public String getCheckBoxText() {
return IdeBundle.message("file.structure.toggle.show.anonymous.classes");
return JavaStructureViewBundle.message("file.structure.toggle.show.anonymous.classes");
}
@Override

View File

@@ -2,7 +2,6 @@
package com.intellij.ide.structureView.impl.java;
import com.intellij.icons.AllIcons;
import com.intellij.ide.IdeBundle;
import com.intellij.ide.structureView.impl.common.PsiTreeElementBase;
import com.intellij.ide.util.FileStructureNodeProvider;
import com.intellij.ide.util.treeView.smartTree.ActionPresentation;
@@ -45,7 +44,7 @@ public class JavaLambdaNodeProvider implements FileStructureNodeProvider<JavaLam
@NotNull
@Override
public String getCheckBoxText() {
return IdeBundle.message("file.structure.toggle.show.collapse.show.lambdas");
return JavaStructureViewBundle.message("file.structure.toggle.show.collapse.show.lambdas");
}
@Override

View File

@@ -0,0 +1,28 @@
// 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.ide.structureView.impl.java;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class JavaStructureViewBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.JavaStructureViewBundle";
private static final JavaStructureViewBundle INSTANCE = new JavaStructureViewBundle();
private JavaStructureViewBundle() {
super(BUNDLE);
}
@NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params);
}
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
}

View File

@@ -1,7 +1,6 @@
// 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.ide.structureView.impl.java;
import com.intellij.ide.IdeBundle;
import com.intellij.ide.util.treeView.AbstractTreeNode;
import com.intellij.ide.util.treeView.smartTree.*;
import com.intellij.psi.PsiElement;
@@ -50,7 +49,7 @@ public class PropertiesGrouper implements Grouper{
@Override
@NotNull
public ActionPresentation getPresentation() {
return new ActionPresentationData(IdeBundle.message("action.structureview.show.properties"), null, PlatformIcons.PROPERTY_ICON);
return new ActionPresentationData(JavaStructureViewBundle.message("action.structureview.show.properties"), null, PlatformIcons.PROPERTY_ICON);
}
@Override

View File

@@ -15,7 +15,6 @@
*/
package com.intellij.ide.structureView.impl.java;
import com.intellij.ide.IdeBundle;
import com.intellij.ide.util.treeView.smartTree.ActionPresentation;
import com.intellij.ide.util.treeView.smartTree.ActionPresentationData;
import com.intellij.ide.util.treeView.smartTree.Filter;
@@ -40,7 +39,7 @@ public class PublicElementsFilter implements Filter{
@Override
@NotNull
public ActionPresentation getPresentation() {
return new ActionPresentationData(IdeBundle.message("action.structureview.show.non.public"), null, PlatformIcons.PRIVATE_ICON);
return new ActionPresentationData(JavaStructureViewBundle.message("action.structureview.show.non.public"), null, PlatformIcons.PRIVATE_ICON);
}
@Override