mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
[platform] i18n: use @NlsSafe for names of project structure elements (IDEA-CR-66088)
...since they are specified by user. GitOrigin-RevId: 2b68c75107f07921075454fcb98a6c3e26a692fe
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4a015fd8c7
commit
5066fac045
@@ -16,6 +16,7 @@
|
||||
package com.intellij.packaging.impl.artifacts;
|
||||
|
||||
import com.intellij.openapi.roots.ProjectModelExternalSource;
|
||||
import com.intellij.openapi.util.NlsSafe;
|
||||
import com.intellij.openapi.util.UserDataHolderBase;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
@@ -24,7 +25,6 @@ import com.intellij.packaging.artifacts.*;
|
||||
import com.intellij.packaging.elements.CompositePackagingElement;
|
||||
import com.intellij.packaging.impl.elements.ArchivePackagingElement;
|
||||
import com.intellij.util.EventDispatcher;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -36,7 +36,7 @@ import java.util.Map;
|
||||
|
||||
public class ArtifactImpl extends UserDataHolderBase implements ModifiableArtifact {
|
||||
private CompositePackagingElement<?> myRootElement;
|
||||
private @Nls(capitalization = Nls.Capitalization.Title) String myName;
|
||||
private @NlsSafe String myName;
|
||||
private boolean myBuildOnMake;
|
||||
private String myOutputPath;
|
||||
private final EventDispatcher<? extends ArtifactListener> myDispatcher;
|
||||
@@ -44,14 +44,14 @@ public class ArtifactImpl extends UserDataHolderBase implements ModifiableArtifa
|
||||
private Map<ArtifactPropertiesProvider, ArtifactProperties<?>> myProperties;
|
||||
private final ProjectModelExternalSource myExternalSource;
|
||||
|
||||
public ArtifactImpl(@NotNull @Nls(capitalization = Nls.Capitalization.Title) String name,
|
||||
public ArtifactImpl(@NotNull @NlsSafe String name,
|
||||
@NotNull ArtifactType artifactType, boolean buildOnMake,
|
||||
@NotNull CompositePackagingElement<?> rootElement, String outputPath,
|
||||
@Nullable ProjectModelExternalSource externalSource) {
|
||||
this(name, artifactType, buildOnMake, rootElement, outputPath, externalSource, null);
|
||||
}
|
||||
|
||||
public ArtifactImpl(@NotNull @Nls(capitalization = Nls.Capitalization.Title) String name,
|
||||
public ArtifactImpl(@NotNull @NlsSafe String name,
|
||||
@NotNull ArtifactType artifactType, boolean buildOnMake,
|
||||
@NotNull CompositePackagingElement<?> rootElement, String outputPath,
|
||||
@Nullable ProjectModelExternalSource externalSource, EventDispatcher<? extends ArtifactListener> dispatcher) {
|
||||
|
||||
@@ -20,7 +20,6 @@ import com.intellij.openapi.util.NlsSafe;
|
||||
import com.intellij.openapi.util.UserDataHolder;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.packaging.elements.CompositePackagingElement;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -33,7 +32,7 @@ public interface Artifact extends UserDataHolder, ProjectModelBuildableElement {
|
||||
@NotNull
|
||||
ArtifactType getArtifactType();
|
||||
|
||||
@Nls(capitalization = Nls.Capitalization.Title) String getName();
|
||||
@NlsSafe String getName();
|
||||
|
||||
boolean isBuildOnMake();
|
||||
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
*/
|
||||
package org.jetbrains.jps.model;
|
||||
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import com.intellij.openapi.util.NlsSafe;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface JpsNamedElement extends JpsElement {
|
||||
@NotNull
|
||||
@Nls(capitalization = Nls.Capitalization.Title) String getName();
|
||||
@NlsSafe String getName();
|
||||
|
||||
void setName(@NotNull String name);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public interface Project extends ComponentManager, AreaInstance {
|
||||
* @return project name
|
||||
*/
|
||||
@NotNull
|
||||
@Nls String getName();
|
||||
@NlsSafe String getName();
|
||||
|
||||
/**
|
||||
* Returns a project base directory - a parent directory of a {@code .ipr} file or {@code .idea} directory.<br/>
|
||||
|
||||
@@ -21,9 +21,9 @@ import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.roots.ProjectModelElement;
|
||||
import com.intellij.openapi.roots.ProjectModelExternalSource;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.NlsSafe;
|
||||
import com.intellij.openapi.util.UserDataHolder;
|
||||
import com.intellij.openapi.util.UserDataHolderBase;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -38,13 +38,13 @@ public class Facet<C extends FacetConfiguration> extends UserDataHolderBase impl
|
||||
@NotNull private final Module myModule;
|
||||
@NotNull private final C myConfiguration;
|
||||
private final Facet myUnderlyingFacet;
|
||||
private @Nls String myName;
|
||||
private @NlsSafe String myName;
|
||||
private boolean isDisposed;
|
||||
private ProjectModelExternalSource myExternalSource;
|
||||
|
||||
public Facet(@NotNull final FacetType facetType,
|
||||
@NotNull final Module module,
|
||||
@NotNull final @Nls String name,
|
||||
@NotNull final @NlsSafe String name,
|
||||
@NotNull final C configuration,
|
||||
Facet underlyingFacet) {
|
||||
myName = name;
|
||||
@@ -110,14 +110,14 @@ public class Facet<C extends FacetConfiguration> extends UserDataHolderBase impl
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public final @Nls String getName() {
|
||||
public final @NlsSafe String getName() {
|
||||
return myName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use {@link ModifiableFacetModel#rename} to rename facets
|
||||
*/
|
||||
final void setName(@NotNull final @Nls String name) {
|
||||
final void setName(@NotNull final @NlsSafe String name) {
|
||||
myName = name;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.intellij.facet;
|
||||
|
||||
import com.intellij.openapi.util.NlsSafe;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -60,5 +61,5 @@ public interface FacetModel {
|
||||
<F extends Facet<?>> Collection<F> getFacetsByType(@NotNull Facet<?> underlyingFacet, FacetTypeId<F> typeId);
|
||||
|
||||
@NotNull
|
||||
String getFacetName(@NotNull Facet<?> facet);
|
||||
@NlsSafe String getFacetName(@NotNull Facet<?> facet);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user