[platform] optional //names@fullname attribute

This commit is contained in:
Roman Shevchenko
2017-08-19 10:41:38 +02:00
parent 9478613139
commit 85eacffff5
5 changed files with 6 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ class ApplicationInfoProperties {
patchVersion = root.version.first().@patch ?: "0"
fullVersionFormat = root.version.first().@full ?: "{0}.{1}"
shortProductName = root.names.first().@product
productName = root.names.first().@fullname
productName = root.names.first().@fullname ?: shortProductName
edition = root.names.first().@edition
companyName = root.company.first().@name
minorVersionMainPart = minorVersion.takeWhile { it != '.' }

View File

@@ -59,7 +59,7 @@ public class ApplicationNamesInfo {
Element rootElement = doc.getRootElement();
Element names = rootElement.getChild("names", rootElement.getNamespace());
myProductName = names.getAttributeValue("product");
myFullProductName = names.getAttributeValue("fullname");
myFullProductName = names.getAttributeValue("fullname", myProductName);
myEditionName = names.getAttributeValue("edition");
myScriptName = names.getAttributeValue("script");
myDefaultLauncherName = names.getAttributeValue("default-launcher-name", myScriptName);

View File

@@ -55,6 +55,7 @@
<xs:annotation>
<xs:documentation>
Name of the product without vendor name (e.g. "IntelliJ IDEA").
May be omitted if same as the @product attribute.
</xs:documentation>
</xs:annotation>
</xs:attribute>
@@ -76,6 +77,7 @@
<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>

View File

@@ -9,7 +9,7 @@
copyrightForeground="858585" linkColor="589df6"/>
<icon size32="/PyCharmEdu32.png" size16="/PyCharmEdu16.png" ico="PyCharmEdu.ico"/>
<package code="__PACKAGE_CODE__"/>
<names product="PyCharm" fullname="PyCharm" edition="Edu" script="charm"/>
<names product="PyCharm" edition="Edu" script="charm"/>
<welcome-screen logo-url="/PyCharmEduWelcomeScreen.png"/>

View File

@@ -9,7 +9,7 @@
copyrightForeground="313131" linkColor="1f29b2"/>
<icon size32="/PyCharmCore32.png" size16="/PyCharmCore16.png" ico="PyCharmCore.ico"/>
<package code="__PACKAGE_CODE__"/>
<names product="PyCharm" fullname="PyCharm" edition="Community Edition" script="charm"/>
<names product="PyCharm" edition="Community Edition" script="charm"/>
<welcome-screen logo-url="/PyCharmCoreWelcomeScreen.png"/>