[platform] getting rid of leftover CLI script configuration stuff

GitOrigin-RevId: 8e4df59d3b3f0cc745baff5564b14a3c7509170e
This commit is contained in:
Roman Shevchenko
2023-04-20 20:05:28 +02:00
committed by intellij-monorepo-bot
parent 2570eaad69
commit 5cefa05293
4 changed files with 12 additions and 16 deletions

View File

@@ -22,7 +22,6 @@ public final class ApplicationNamesInfo {
private final String myFullProductName;
private final String myEditionName;
private final String myScriptName;
private final String myDefaultLauncherName;
private final String myMotto;
private static volatile ApplicationNamesInfo instance;
@@ -129,7 +128,6 @@ public final class ApplicationNamesInfo {
myFullProductName = names.getAttributeValue("fullname", myProductName);
myEditionName = names.getAttributeValue("edition");
myScriptName = names.getAttributeValue("script");
myDefaultLauncherName = names.getAttributeValue("default-launcher-name", myScriptName);
myMotto = names.getAttributeValue("motto", "The Drive to Develop");
}
@@ -192,11 +190,11 @@ public final class ApplicationNamesInfo {
return myScriptName;
}
/**
* Returns the default name of the command-line launcher to be suggested in 'Create Launcher Script' dialog.
*/
/** @deprecated separate command-line launchers are no longer supported. Please use {@link #getScriptName()} instead. */
@Deprecated
@ApiStatus.ScheduledForRemoval
public String getDefaultLauncherName() {
return myDefaultLauncherName;
return getScriptName();
}
/**

View File

@@ -79,7 +79,13 @@ final class CreateLauncherScriptAction extends DumbAwareAction {
if (!(app.isCommandLine() || app.isHeadlessEnvironment() || app.isUnitTestMode())) {
ProcessIOExecutorService.INSTANCE.execute(() -> {
try {
var scriptName = ApplicationNamesInfo.getInstance().getDefaultLauncherName();
var launcherName = ApplicationNamesInfo.getInstance().getScriptName();
var scriptName = switch (launcherName) {
case "phpstorm" -> "pstorm";
case "pycharm" -> "charm";
case "rubymine" -> "mine";
default -> launcherName;
};
var scriptFile = PathEnvironmentVariableUtil.findInPath(scriptName);
if (scriptFile != null) {
var content = Files.readString(scriptFile.toPath());

View File

@@ -92,14 +92,6 @@
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute type="xs:string" name="default-launcher-name">
<xs:annotation>
<xs:documentation>
Default name of the command-line launcher to be suggested in 'Create Launcher Script' dialog.
May be omitted if same as the @script attribute.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute type="xs:string" name="motto">
<xs:annotation>
<xs:documentation>

View File

@@ -10,7 +10,7 @@
copyrightForeground="ffffff" linkColor="589bf2"/>
<icon ico="PyCharmCore.ico" svg="/pycharm-ce.svg" svg-small="/pycharm-ce_16.svg"/>
<icon-eap svg="/pycharm-ce-eap.svg" svg-small="/pycharm-ce-eap_16.svg"/>
<names product="PyCharm" edition="Community Edition" script="pycharm" default-launcher-name="charm" motto="Python IDE for Professional Developers"/>
<names product="PyCharm" edition="Community Edition" script="pycharm" motto="Python IDE for Professional Developers"/>
<essential-plugin>PythonCore</essential-plugin>
<essential-plugin>com.jetbrains.pycharm.community.customization</essential-plugin>