diff --git a/java/compiler/impl/src/com/intellij/packaging/impl/elements/FileCopyElementType.java b/java/compiler/impl/src/com/intellij/packaging/impl/elements/FileCopyElementType.java index f9f6c1d37743..31abe61df6da 100644 --- a/java/compiler/impl/src/com/intellij/packaging/impl/elements/FileCopyElementType.java +++ b/java/compiler/impl/src/com/intellij/packaging/impl/elements/FileCopyElementType.java @@ -15,8 +15,8 @@ */ package com.intellij.packaging.impl.elements; -import com.intellij.CommonBundle; import com.intellij.icons.AllIcons; +import com.intellij.openapi.compiler.JavaCompilerBundle; import com.intellij.openapi.fileChooser.FileChooser; import com.intellij.openapi.fileChooser.FileChooserDescriptor; import com.intellij.openapi.project.Project; @@ -34,7 +34,7 @@ import java.util.List; public class FileCopyElementType extends PackagingElementType { FileCopyElementType() { - super("file-copy", CommonBundle.message("file.title")); + super("file-copy", JavaCompilerBundle.message("file.title")); } @Override diff --git a/java/compiler/impl/src/com/intellij/packaging/impl/ui/ArtifactProblemsHolderBase.java b/java/compiler/impl/src/com/intellij/packaging/impl/ui/ArtifactProblemsHolderBase.java index 4a07ba622763..0095f7e34a0c 100644 --- a/java/compiler/impl/src/com/intellij/packaging/impl/ui/ArtifactProblemsHolderBase.java +++ b/java/compiler/impl/src/com/intellij/packaging/impl/ui/ArtifactProblemsHolderBase.java @@ -15,9 +15,9 @@ */ package com.intellij.packaging.impl.ui; +import com.intellij.openapi.util.NlsContexts; import com.intellij.packaging.elements.PackagingElementResolvingContext; import com.intellij.packaging.ui.ArtifactProblemsHolder; -import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; public abstract class ArtifactProblemsHolderBase implements ArtifactProblemsHolder { @@ -34,7 +34,7 @@ public abstract class ArtifactProblemsHolderBase implements ArtifactProblemsHold } @Override - public void registerError(@NotNull @Nls(capitalization = Nls.Capitalization.Sentence) String message, @NotNull String problemTypeId) { + public void registerError(@NotNull @NlsContexts.DialogMessage String message, @NotNull String problemTypeId) { registerError(message, problemTypeId, null); } } diff --git a/java/compiler/openapi/resources/messages/JavaCompilerBundle.properties b/java/compiler/openapi/resources/messages/JavaCompilerBundle.properties index 9604c5eac1c2..814f3768bc5b 100644 --- a/java/compiler/openapi/resources/messages/JavaCompilerBundle.properties +++ b/java/compiler/openapi/resources/messages/JavaCompilerBundle.properties @@ -129,7 +129,7 @@ settings.auto.build.only.works.while.not.running=(only works while not running / settings.parallel.module.compile.may.require.larger.heap.size=(may require larger heap size) settings.warning=WARNING!
If option 'Clear output directory on rebuild' is enabled, the entire contents of directories where generated sources are stored WILL BE CLEARED on rebuild. settings.use.release.option.for.cross.compilation=Use '--release' option for cross-compilation (Java 9 and later) -settings.project.bytecode.version=Project bytecode version: +settings.project.bytecode.version=Project bytecode version: settings.per.module.bytecode.version=Per-module bytecode version: settings.same.as.language.level=Same as language level settings.all.modules.will.be.compiled.with.project.bytecode.version=All modules will be compiled with project bytecode version @@ -151,7 +151,7 @@ settings.compiler.will.run.all.automatically.discovered.processors=Compiler will settings.annotation.processor.options=Annotation processor options: settings.no.processor.specific.options.configured=No processor-specific options configured settings.module.path.warning=Assume specified path is a 'module path': a path of JARs or directories containing packaged java modules.\nIn order to be discovered and run from the module path an annotation processor should be packaged as a java module and registered with the ServiceLoader in the module declaration. -settings.store.generated.sources.relative.to=Store generated sources relative to: +settings.store.generated.sources.relative.to=Store generated sources relative to: settings.production.sources.directory=Production sources directory: settings.column.option.name=Option Name settings.column.value=Value @@ -187,12 +187,12 @@ class.can.have.more.common.super.class=Class can have more common super class cannot.create.directory.0.1=Cannot create directory ''{0}'': {1} select.directory.for.meta.inf.manifest.mf.file=Select Directory for META-INF/MANIFEST.MF file title.new.archive=New Archive -enter.archive.name=Enter archive name: +enter.archive.name=Enter archive name: action.text.move.to=Move to title.create.new.profile=Create new profile dialog.message.profile.name=Profile name title.new.directory=New Directory -dialog.message.enter.directory.name=Enter directory name: +dialog.message.enter.directory.name=Enter directory name: dialog.title.packaging.choose.module=Choose Module dialog.title.packaging.choose.library=Choose Library node.excluded.flag.tooltip=Excluded @@ -239,6 +239,7 @@ show.content.of.included.artifacts=Show Content of Included Artifacts show.library.files=Show Library Files directory.copy.element.type.name=Directory Content extracted.directory.element.type.name=Extracted Directory +file.title=File action.disabled.when.per.module.working.directory.configured=''{0}'' is disabled when per-module working directory is configured.
Please specify single working directory, or change test scope to single module. action.disabled.in.fork.mode={0} is disabled in fork mode.
Please change fork mode to \\<none\\> to {1}. popup.title.choose.suite.to.add=Choose suite to add diff --git a/java/compiler/openapi/src/com/intellij/packaging/artifacts/ArtifactTemplate.java b/java/compiler/openapi/src/com/intellij/packaging/artifacts/ArtifactTemplate.java index 8b1e84ab046b..b68e70e96bae 100644 --- a/java/compiler/openapi/src/com/intellij/packaging/artifacts/ArtifactTemplate.java +++ b/java/compiler/openapi/src/com/intellij/packaging/artifacts/ArtifactTemplate.java @@ -15,15 +15,15 @@ */ package com.intellij.packaging.artifacts; +import com.intellij.openapi.util.NlsActions; import com.intellij.openapi.util.NlsSafe; import com.intellij.packaging.elements.CompositePackagingElement; -import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public abstract class ArtifactTemplate { - public abstract @Nls(capitalization = Nls.Capitalization.Title) String getPresentableName(); + public abstract @NlsActions.ActionText String getPresentableName(); @Nullable public NewArtifactConfiguration createArtifact() { diff --git a/java/compiler/openapi/src/com/intellij/packaging/elements/ComplexPackagingElementType.java b/java/compiler/openapi/src/com/intellij/packaging/elements/ComplexPackagingElementType.java index 856fc75fbec1..72a2b5d272b7 100644 --- a/java/compiler/openapi/src/com/intellij/packaging/elements/ComplexPackagingElementType.java +++ b/java/compiler/openapi/src/com/intellij/packaging/elements/ComplexPackagingElementType.java @@ -18,6 +18,7 @@ package com.intellij.packaging.elements; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.ModificationTracker; +import com.intellij.openapi.util.NlsActions; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; @@ -28,7 +29,7 @@ public abstract class ComplexPackagingElementType{ } @Override - protected @Nls(capitalization = Nls.Capitalization.Title) String getDependenciesTitle() { + protected @NlsContexts.BorderTitle String getDependenciesTitle() { return JavaUiBundle.message("title.library.contents"); } diff --git a/java/idea-ui/src/com/intellij/ide/util/importProject/ProjectLayoutPanel.java b/java/idea-ui/src/com/intellij/ide/util/importProject/ProjectLayoutPanel.java index 5889adf7f59d..df080a805d33 100644 --- a/java/idea-ui/src/com/intellij/ide/util/importProject/ProjectLayoutPanel.java +++ b/java/idea-ui/src/com/intellij/ide/util/importProject/ProjectLayoutPanel.java @@ -279,7 +279,7 @@ abstract class ProjectLayoutPanel extends JPanel { protected abstract @NlsContexts.TabTitle String getEntriesChooserTitle(); - protected abstract @Nls(capitalization = Nls.Capitalization.Title) String getDependenciesTitle(); + protected abstract @NlsContexts.BorderTitle String getDependenciesTitle(); protected abstract @Nls String getElementTypeName(); diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ClasspathEditor.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ClasspathEditor.java index 7959f2776391..6f06b4d640e3 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ClasspathEditor.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ClasspathEditor.java @@ -32,6 +32,7 @@ import com.intellij.openapi.roots.ui.configuration.classpath.ClasspathPanelImpl; import com.intellij.openapi.ui.ComboBox; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.NlsContexts; +import com.intellij.openapi.util.NlsSafe; import com.intellij.ui.SimpleListCellRenderer; import com.intellij.util.ArrayUtilRt; import com.intellij.util.ui.JBUI; @@ -189,7 +190,8 @@ public class ClasspathEditor extends ModuleElementsEditor implements ModuleRootL } private @NlsContexts.Label String getModuleClasspathFormat() { - return ClassPathStorageUtil.getStorageType(myState.getRootModel().getModule()); + @NlsSafe final String type = ClassPathStorageUtil.getStorageType(myState.getRootModel().getModule()); + return type; } private boolean isModified() { diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ErrorPaneConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ErrorPaneConfigurable.java index 1aa8662e1467..60d959a5848e 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ErrorPaneConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ErrorPaneConfigurable.java @@ -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.openapi.roots.ui.configuration; -import com.intellij.CommonBundle; import com.intellij.ide.JavaUiBundle; import com.intellij.openapi.Disposable; import com.intellij.openapi.options.Configurable; @@ -189,7 +188,7 @@ public class ErrorPaneConfigurable extends JPanel implements Configurable, Dispo } description = XmlStringUtil.convertToHtmlContent(description); if (error.canBeFixed()) { - final String text = "[" + CommonBundle.message("fix.title") + "]"; + final String text = "[" + JavaUiBundle.message("fix.link.text") + "]"; description += " " + HtmlChunk.link("http://fix/" + i, text); } final HtmlChunk li = HtmlChunk.raw("
  • " + description + "
  • "); diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JavaResourceRootEditHandlerBase.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JavaResourceRootEditHandlerBase.java index 079804f4c68d..a6d67016e2c1 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JavaResourceRootEditHandlerBase.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JavaResourceRootEditHandlerBase.java @@ -97,7 +97,7 @@ public abstract class JavaResourceRootEditHandlerBase extends ModuleSourceRootEd myProperties = properties; setTitle(ProjectBundle.message("module.paths.edit.properties.title")); myRelativeOutputPathField = new JTextField(); - myIsGeneratedCheckBox = new JCheckBox(JavaUiBundle.message("for.generated.resources")); + myIsGeneratedCheckBox = new JCheckBox(JavaUiBundle.message("checkbox.for.generated.resources")); myMainPanel = FormBuilder.createFormBuilder() .addLabeledComponent(JavaUiBundle.message("label.relative.output.path"), myRelativeOutputPathField) .addComponent(myIsGeneratedCheckBox) diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java index cee70018002e..5787a341cf2d 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectConfigurable.java @@ -29,6 +29,7 @@ import com.intellij.openapi.roots.ui.configuration.projectRoot.daemon.ProjectStr import com.intellij.openapi.ui.DetailsComponent; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.EmptyRunnable; +import com.intellij.openapi.util.NlsContexts; import com.intellij.openapi.util.NlsSafe; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.text.StringUtil; @@ -40,7 +41,6 @@ import com.intellij.ui.FieldPanel; import com.intellij.ui.InsertPathAction; import com.intellij.ui.components.fields.ExtendableTextField; import com.intellij.util.ui.JBUI; -import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -261,7 +261,7 @@ public class ProjectConfigurable extends ProjectStructureElementConfigurable editorComponent, - T libraryType, @Nullable @Nls String editButtonText) { + T libraryType, @Nullable @NlsContexts.Button String editButtonText) { myEditorComponent = editorComponent; myLibraryType = libraryType; updateDescription(); diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/FacetProjectStructureElement.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/FacetProjectStructureElement.java index 1db7c3d7d5f6..572e3ab607ad 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/FacetProjectStructureElement.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/FacetProjectStructureElement.java @@ -15,7 +15,6 @@ */ package com.intellij.openapi.roots.ui.configuration.projectRoot.daemon; -import com.intellij.CommonBundle; import com.intellij.facet.Facet; import com.intellij.facet.pointers.FacetPointersManager; import com.intellij.ide.JavaUiBundle; @@ -56,7 +55,7 @@ public class FacetProjectStructureElement extends ProjectStructureElement { @Override public @Nls(capitalization = Nls.Capitalization.Sentence) String getTypeName() { - return CommonBundle.message("facet.title"); + return JavaUiBundle.message("facet.title"); } @Override diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/LibraryProjectStructureElement.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/LibraryProjectStructureElement.java index 1dafe1ebd518..95aa25742eb6 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/LibraryProjectStructureElement.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/LibraryProjectStructureElement.java @@ -20,6 +20,7 @@ import com.intellij.openapi.roots.ui.configuration.projectRoot.StructureConfigur import com.intellij.openapi.ui.NamedConfigurable; import com.intellij.openapi.util.ActionCallback; import com.intellij.openapi.util.NlsContexts; +import com.intellij.openapi.util.NlsSafe; import com.intellij.openapi.util.text.HtmlBuilder; import com.intellij.openapi.util.text.HtmlChunk; import com.intellij.openapi.util.text.StringUtil; @@ -76,7 +77,7 @@ public class LibraryProjectStructureElement extends ProjectStructureElement { } } - private static @NlsContexts.DetailedDescription String createInvalidRootsDescription(List invalidClasses, String rootName, String libraryName) { + private static @NlsContexts.DetailedDescription String createInvalidRootsDescription(List invalidClasses, String rootName, @NlsSafe String libraryName) { HtmlBuilder buffer = new HtmlBuilder(); final String name = StringUtil.escapeXmlEntities(libraryName); final HtmlChunk.Element link = HtmlChunk.link("http://library/" + name, name); diff --git a/java/idea-ui/src/com/intellij/projectImport/ProjectFormatPanel.java b/java/idea-ui/src/com/intellij/projectImport/ProjectFormatPanel.java index d6232f7c1692..c6a9acf6b156 100644 --- a/java/idea-ui/src/com/intellij/projectImport/ProjectFormatPanel.java +++ b/java/idea-ui/src/com/intellij/projectImport/ProjectFormatPanel.java @@ -6,23 +6,22 @@ import com.intellij.ide.util.PropertiesComponent; import com.intellij.ide.util.projectWizard.WizardContext; import com.intellij.openapi.components.StorageScheme; import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.NlsContexts; import org.jetbrains.annotations.NotNull; import javax.swing.*; public class ProjectFormatPanel { private static final String STORAGE_FORMAT_PROPERTY = "default.storage.format"; - public final @NlsContexts.Label String DIR_BASED = JavaUiBundle.message("label.directory.based", Project.DIRECTORY_STORE_FOLDER); - private final @NlsContexts.Label String FILE_BASED = JavaUiBundle.message("label.ipr.file.based"); + public static final String PROPERTY_COMPONENT_DIR_BASED = Project.DIRECTORY_STORE_FOLDER + " (directory based)"; + private static final String PROPERTY_COMPONENT_FILE_BASED = ".ipr (file based)"; private JComboBox myStorageFormatCombo; private JPanel myWholePanel; public ProjectFormatPanel() { - myStorageFormatCombo.insertItemAt(DIR_BASED, 0); - myStorageFormatCombo.insertItemAt(FILE_BASED, 1); - myStorageFormatCombo.setSelectedItem(PropertiesComponent.getInstance().getValue(STORAGE_FORMAT_PROPERTY, DIR_BASED)); + myStorageFormatCombo.insertItemAt(JavaUiBundle.message("label.directory.based", Project.DIRECTORY_STORE_FOLDER), 0); + myStorageFormatCombo.insertItemAt(JavaUiBundle.message("label.ipr.file.based"), 1); + myStorageFormatCombo.setSelectedItem(PropertiesComponent.getInstance().getValue(STORAGE_FORMAT_PROPERTY, PROPERTY_COMPONENT_DIR_BASED)); } public JPanel getPanel() { @@ -35,9 +34,12 @@ public class ProjectFormatPanel { } public void updateData(@NotNull WizardContext context) { - StorageScheme format = FILE_BASED.equals(myStorageFormatCombo.getSelectedItem()) ? StorageScheme.DEFAULT : StorageScheme.DIRECTORY_BASED; + final String fileBased = JavaUiBundle.message("label.ipr.file.based"); + StorageScheme format = fileBased.equals(myStorageFormatCombo.getSelectedItem()) ? StorageScheme.DEFAULT : StorageScheme.DIRECTORY_BASED; context.setProjectStorageFormat(format); - PropertiesComponent.getInstance().setValue(STORAGE_FORMAT_PROPERTY, isDefault() ? FILE_BASED : DIR_BASED, DIR_BASED); + PropertiesComponent.getInstance().setValue(STORAGE_FORMAT_PROPERTY, isDefault() ? PROPERTY_COMPONENT_FILE_BASED + : PROPERTY_COMPONENT_DIR_BASED, + PROPERTY_COMPONENT_DIR_BASED); } public void setVisible(boolean visible) { @@ -45,6 +47,7 @@ public class ProjectFormatPanel { } public boolean isDefault() { - return FILE_BASED.equals(myStorageFormatCombo.getSelectedItem()); + final String fileBased = JavaUiBundle.message("label.ipr.file.based"); + return fileBased.equals(myStorageFormatCombo.getSelectedItem()); } } \ No newline at end of file diff --git a/platform/platform-api/resources/messages/CommonBundle.properties b/platform/platform-api/resources/messages/CommonBundle.properties index 32a0f5125223..458d272f1239 100644 --- a/platform/platform-api/resources/messages/CommonBundle.properties +++ b/platform/platform-api/resources/messages/CommonBundle.properties @@ -103,7 +103,4 @@ title.console=Console title.save.app=Saving Application title.save.project=Saving Project -title.save.default.project=Saving Default Project -facet.title=Facet -file.title=File -fix.title=Fix \ No newline at end of file +title.save.default.project=Saving Default Project \ No newline at end of file diff --git a/platform/platform-api/src/com/intellij/openapi/ui/NamedConfigurable.java b/platform/platform-api/src/com/intellij/openapi/ui/NamedConfigurable.java index c80074927b9b..f07d641f24e0 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/NamedConfigurable.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/NamedConfigurable.java @@ -6,12 +6,12 @@ import com.intellij.ide.IdeBundle; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.options.Configurable; import com.intellij.openapi.options.ConfigurationException; +import com.intellij.openapi.util.NlsContexts; import com.intellij.openapi.util.NlsSafe; import com.intellij.ui.DocumentAdapter; import com.intellij.ui.ErrorLabel; import com.intellij.ui.JBColor; import com.intellij.util.ui.JBUI; -import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -64,7 +64,7 @@ public abstract class NamedConfigurable implements Configurable { public abstract void setDisplayName(@NlsSafe String name); public abstract T getEditableObject(); - public abstract @Nls(capitalization = Nls.Capitalization.Title) String getBannerSlogan(); + public abstract @NlsContexts.DetailedDescription String getBannerSlogan(); @Override public final JComponent createComponent() { diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/storage/ClassPathStorageUtil.java b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/storage/ClassPathStorageUtil.java index fd961fa84ada..2eb3624767dd 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/storage/ClassPathStorageUtil.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/storage/ClassPathStorageUtil.java @@ -2,7 +2,6 @@ package com.intellij.openapi.roots.impl.storage; import com.intellij.openapi.module.Module; -import com.intellij.openapi.util.NlsSafe; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.jps.model.serialization.JpsProjectLoader; @@ -11,7 +10,7 @@ public final class ClassPathStorageUtil { @NonNls public static final String DEFAULT_STORAGE = "default"; @NotNull - public static @NlsSafe String getStorageType(@NotNull Module module) { + public static @NonNls String getStorageType(@NotNull Module module) { String id = module.getOptionValue(JpsProjectLoader.CLASSPATH_ATTRIBUTE); return id == null ? DEFAULT_STORAGE : id; } diff --git a/platform/util/src/com/intellij/openapi/util/text/StringUtil.java b/platform/util/src/com/intellij/openapi/util/text/StringUtil.java index 7ca5eaa6ce3c..0eb77d9ab711 100644 --- a/platform/util/src/com/intellij/openapi/util/text/StringUtil.java +++ b/platform/util/src/com/intellij/openapi/util/text/StringUtil.java @@ -1973,7 +1973,7 @@ public class StringUtil extends StringUtilRt { */ @Contract(value = "null -> null; !null -> !null",pure = true) @Deprecated - public static String escapeXml(final @Nullable String text) { + public static String escapeXml(final @Nullable @Nls String text) { return text == null ? null : escapeXmlEntities(text); } @@ -1989,7 +1989,7 @@ public class StringUtil extends StringUtilRt { * @return {@code text} with some characters replaced with standard XML entities, e.g. '<' replaced with '{@code <}' */ @Contract(pure = true) - public static @NotNull @NlsSafe String escapeXmlEntities(@NotNull String text) { + public static @NotNull @Nls String escapeXmlEntities(@NotNull @Nls String text) { return replace(text, REPLACES_DISP, REPLACES_REFS); } @@ -2034,8 +2034,9 @@ public class StringUtil extends StringUtilRt { } @Contract(pure = true) - public static @NotNull String htmlEmphasize(@NotNull String text) { - return "" + escapeXmlEntities(text) + ""; + public static @NotNull String htmlEmphasize(@NotNull @Nls String text) { + return HtmlChunk.tag("code").addText(text) + .wrapWith("b").toString(); } @@ -2335,7 +2336,7 @@ public class StringUtil extends StringUtilRt { int cmp; if (p1.matches("\\d+") && p2.matches("\\d+")) { - cmp = new Integer(p1).compareTo(new Integer(p2)); + cmp = Integer.valueOf(p1).compareTo(Integer.valueOf(p2)); } else { cmp = part1[idx].compareTo(part2[idx]); @@ -2351,7 +2352,7 @@ public class StringUtil extends StringUtilRt { String p = parts[idx]; int cmp; if (p.matches("\\d+")) { - cmp = new Integer(p).compareTo(0); + cmp = Integer.valueOf(p).compareTo(0); } else { cmp = 1; @@ -3113,7 +3114,7 @@ public class StringUtil extends StringUtilRt { } @Contract(value = "null -> null; !null->!null", pure = true) - public static @NlsSafe String internEmptyString(String s) { + public static String internEmptyString(String s) { return s == null ? null : s.isEmpty() ? "" : s; }