mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 20:41:22 +07:00
[run configurations] implement ConfigurationFactory::getId method in all inheritors and return non-localizable value
The default implementation delegates to 'getName' method and it may cause problems if it returns localized value (IDEA-232878). GitOrigin-RevId: 28495a477af06896f0c3f98141b424c33920f1e0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f354e97f59
commit
2c59c81361
@@ -11,6 +11,7 @@ import com.jetbrains.rest.RestBundle;
|
||||
import com.jetbrains.rest.RestFileType;
|
||||
import com.jetbrains.rest.run.docutils.DocutilsRunConfiguration;
|
||||
import com.jetbrains.rest.run.sphinx.SphinxRunConfiguration;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -66,10 +67,12 @@ public final class RestRunConfigurationType implements ConfigurationType {
|
||||
|
||||
private static abstract class RestConfigurationFactory extends PythonConfigurationFactoryBase {
|
||||
private final String myName;
|
||||
private final String myId;
|
||||
|
||||
RestConfigurationFactory(@NotNull final ConfigurationType type, @NotNull String name) {
|
||||
RestConfigurationFactory(@NotNull final ConfigurationType type, @NotNull String name, @NotNull @NonNls String id) {
|
||||
super(type);
|
||||
myName = name;
|
||||
myId = id;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -77,11 +80,16 @@ public final class RestRunConfigurationType implements ConfigurationType {
|
||||
public String getName() {
|
||||
return myName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getId() {
|
||||
return myId;
|
||||
}
|
||||
}
|
||||
|
||||
private static class DocutilsRunConfigurationFactory extends RestConfigurationFactory {
|
||||
protected DocutilsRunConfigurationFactory(ConfigurationType type) {
|
||||
super(type, "Docutils task");
|
||||
super(type, "Docutils task", "Docutils task");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -93,7 +101,7 @@ public final class RestRunConfigurationType implements ConfigurationType {
|
||||
|
||||
private static class SphinxRunConfigurationFactory extends RestConfigurationFactory {
|
||||
protected SphinxRunConfigurationFactory(ConfigurationType type) {
|
||||
super(type, "Sphinx task");
|
||||
super(type, "Sphinx task", "Sphinx task");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user