Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Merks2019-09-12 03:42:18 -0400
committerEd Merks2019-09-12 03:42:18 -0400
commit0e7a00a68dea89d2418d60259c43801b380f01a3 (patch)
tree8268400b95931a8a4316ff57c56cc551e9bc204e
parent8b637b6bfbebbd4cd514eaf52132bfd163b9225c (diff)
downloadorg.eclipse.oomph-0e7a00a68dea89d2418d60259c43801b380f01a3.tar.gz
org.eclipse.oomph-0e7a00a68dea89d2418d60259c43801b380f01a3.tar.xz
org.eclipse.oomph-0e7a00a68dea89d2418d60259c43801b380f01a3.zip
[550122] Improve how shortcut names are determined
In particular, use branding annotations so that the shortcut name can be specified in the product catalogs and update the product catalog generator to create these annotations. https://bugs.eclipse.org/bugs/show_bug.cgi?id=550122
-rw-r--r--features/org.eclipse.oomph.setup-feature/feature.xml2
-rw-r--r--features/org.eclipse.oomph.setup-feature/pom.xml2
-rw-r--r--features/org.eclipse.oomph.setup.core-feature/feature.xml2
-rw-r--r--features/org.eclipse.oomph.setup.core-feature/pom.xml2
-rw-r--r--features/org.eclipse.oomph.setup.installer-feature/feature.xml2
-rw-r--r--features/org.eclipse.oomph.setup.installer-feature/pom.xml2
-rw-r--r--plugins/org.eclipse.oomph.setup.installer/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.oomph.setup.installer/pom.xml2
-rw-r--r--plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/ProductCatalogGenerator.java3
-rw-r--r--plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleVariablePage.java54
-rw-r--r--plugins/org.eclipse.oomph.setup/META-INF/MANIFEST.MF12
-rw-r--r--plugins/org.eclipse.oomph.setup/pom.xml2
-rw-r--r--plugins/org.eclipse.oomph.setup/src/org/eclipse/oomph/setup/AnnotationConstants.java2
-rw-r--r--products/org.eclipse.oomph.setup.installer.product/Installer.product2
14 files changed, 60 insertions, 35 deletions
diff --git a/features/org.eclipse.oomph.setup-feature/feature.xml b/features/org.eclipse.oomph.setup-feature/feature.xml
index 64949a606..0bdef0ef8 100644
--- a/features/org.eclipse.oomph.setup-feature/feature.xml
+++ b/features/org.eclipse.oomph.setup-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.oomph.setup"
label="%featureName"
- version="1.14.0.qualifier"
+ version="1.15.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.oomph.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.oomph.setup-feature/pom.xml b/features/org.eclipse.oomph.setup-feature/pom.xml
index 8d2260340..9dd83869e 100644
--- a/features/org.eclipse.oomph.setup-feature/pom.xml
+++ b/features/org.eclipse.oomph.setup-feature/pom.xml
@@ -20,6 +20,6 @@
</parent>
<groupId>org.eclipse.oomph.features</groupId>
<artifactId>org.eclipse.oomph.setup</artifactId>
- <version>1.14.0-SNAPSHOT</version>
+ <version>1.15.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/features/org.eclipse.oomph.setup.core-feature/feature.xml b/features/org.eclipse.oomph.setup.core-feature/feature.xml
index 2ddc39fe0..860a93004 100644
--- a/features/org.eclipse.oomph.setup.core-feature/feature.xml
+++ b/features/org.eclipse.oomph.setup.core-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.oomph.setup.core"
label="%featureName"
- version="1.14.0.qualifier"
+ version="1.15.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.oomph.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.oomph.setup.core-feature/pom.xml b/features/org.eclipse.oomph.setup.core-feature/pom.xml
index d1a59242b..62da3d141 100644
--- a/features/org.eclipse.oomph.setup.core-feature/pom.xml
+++ b/features/org.eclipse.oomph.setup.core-feature/pom.xml
@@ -20,6 +20,6 @@
</parent>
<groupId>org.eclipse.oomph.features</groupId>
<artifactId>org.eclipse.oomph.setup.core</artifactId>
- <version>1.14.0-SNAPSHOT</version>
+ <version>1.15.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/features/org.eclipse.oomph.setup.installer-feature/feature.xml b/features/org.eclipse.oomph.setup.installer-feature/feature.xml
index ba4d4a8ce..e23a0ee55 100644
--- a/features/org.eclipse.oomph.setup.installer-feature/feature.xml
+++ b/features/org.eclipse.oomph.setup.installer-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.oomph.setup.installer"
label="%featureName"
- version="1.14.0.qualifier"
+ version="1.15.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.oomph.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.oomph.setup.installer-feature/pom.xml b/features/org.eclipse.oomph.setup.installer-feature/pom.xml
index ccea827d9..5c4b0ccdc 100644
--- a/features/org.eclipse.oomph.setup.installer-feature/pom.xml
+++ b/features/org.eclipse.oomph.setup.installer-feature/pom.xml
@@ -22,7 +22,7 @@ Eike Stepper - initial API and implementation
<groupId>org.eclipse.oomph.features</groupId>
<artifactId>org.eclipse.oomph.setup.installer</artifactId>
- <version>1.14.0-SNAPSHOT</version>
+ <version>1.15.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
<build>
diff --git a/plugins/org.eclipse.oomph.setup.installer/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup.installer/META-INF/MANIFEST.MF
index 2cdc71c66..65f9470ab 100644
--- a/plugins/org.eclipse.oomph.setup.installer/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup.installer/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.oomph.setup.installer;singleton:=true
-Bundle-Version: 1.14.0.qualifier
+Bundle-Version: 1.15.0.qualifier
Bundle-ClassPath: .
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
@@ -10,7 +10,7 @@ Bundle-Activator: org.eclipse.oomph.setup.internal.installer.SetupInstallerPlugi
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.ecore.xmi;bundle-version="[2.10.0,3.0.0)",
org.eclipse.emf.edit.ui;bundle-version="[2.10.0,3.0.0)",
- org.eclipse.oomph.setup;bundle-version="[1.14.0,2.0.0)",
+ org.eclipse.oomph.setup;bundle-version="[1.15.0,2.0.0)",
org.eclipse.oomph.setup.edit;bundle-version="[1.14.0,2.0.0)",
org.eclipse.oomph.setup.ui;bundle-version="[1.14.0,2.0.0)",
org.eclipse.equinox.p2.operations;bundle-version="[2.0.0,3.0.0)",
@@ -34,5 +34,5 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.equinox.security.ui;bundle-version="[1.1.0,2.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.oomph.setup.internal.installer;version="1.14.0";x-internal:=true
+Export-Package: org.eclipse.oomph.setup.internal.installer;version="1.15.0";x-internal:=true
Automatic-Module-Name: org.eclipse.oomph.setup.installer
diff --git a/plugins/org.eclipse.oomph.setup.installer/pom.xml b/plugins/org.eclipse.oomph.setup.installer/pom.xml
index 012c1f009..c7bc1cb00 100644
--- a/plugins/org.eclipse.oomph.setup.installer/pom.xml
+++ b/plugins/org.eclipse.oomph.setup.installer/pom.xml
@@ -20,7 +20,7 @@
</parent>
<groupId>org.eclipse.oomph</groupId>
<artifactId>org.eclipse.oomph.setup.installer</artifactId>
- <version>1.14.0-SNAPSHOT</version>
+ <version>1.15.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/ProductCatalogGenerator.java b/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/ProductCatalogGenerator.java
index 909ff6bce..243d1aa6c 100644
--- a/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/ProductCatalogGenerator.java
+++ b/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/ProductCatalogGenerator.java
@@ -1403,6 +1403,9 @@ public class ProductCatalogGenerator implements IApplication
BaseUtil.setAnnotation(productVersion, AnnotationConstants.ANNOTATION_BRANDING_INFO, AnnotationConstants.KEY_SITE_URI, siteURI.toString());
}
+ BaseUtil.setAnnotation(productVersion, AnnotationConstants.ANNOTATION_BRANDING_INFO, AnnotationConstants.SHORTCUT,
+ product.getLabel() + " - " + label.replaceAll(" \\(.+\\)", ""));
+
log.append('\n');
}
diff --git a/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleVariablePage.java b/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleVariablePage.java
index a99bafc3c..a1c0c6a0f 100644
--- a/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleVariablePage.java
+++ b/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleVariablePage.java
@@ -1393,38 +1393,58 @@ public class SimpleVariablePage extends SimpleInstallerPage
openInSystemExplorerButton.setToolTipText("Open the folder '" + getProductInstallFolder() + "' in the system explorer");
- if (createStartMenuEntryButton != null || createDesktopShortcutButton != null)
+ boolean createMenuShortcut = createStartMenuEntryButton != null && createStartMenuEntryButton.isChecked();
+ boolean createDesktopShortcut = createDesktopShortcutButton != null && createDesktopShortcutButton.isChecked();
+ if (createMenuShortcut || createDesktopShortcut)
{
File executable = performer.getExecutableInfo().getExecutable();
- // TODO The entire naming of the shortcuts should be revisited and made more flexible with BrandingInfo annotations.
-
- ProductCatalog productCatalog = product.getProductCatalog();
- String catalogName = "user.products".equals(productCatalog.getName()) ? "" : productCatalog.getLabel();
- int firstDot = catalogName.indexOf('.');
- if (firstDot != -1)
+ String shortCutName = null;
+ scope = selectedProductVersion;
+ while (scope != null)
{
- catalogName = catalogName.substring(0, firstDot);
+ Annotation annotation = scope.getAnnotation(AnnotationConstants.ANNOTATION_BRANDING_INFO);
+ if (annotation != null)
+ {
+ shortCutName = annotation.getDetails().get(AnnotationConstants.SHORTCUT);
+ if (shortCutName != null)
+ {
+ break;
+ }
+ }
+
+ scope = scope.getParentScope();
}
- String productName = product.getName();
- if (productName.startsWith("epp.package."))
+ if (shortCutName == null)
{
- productName = productName.substring("epp.package.".length());
- }
+ ProductCatalog productCatalog = product.getProductCatalog();
+ String catalogName = "user.products".equals(productCatalog.getName()) ? "" : productCatalog.getLabel();
+ int firstDot = catalogName.indexOf('.');
+ if (firstDot != -1)
+ {
+ catalogName = catalogName.substring(0, firstDot);
+ }
+
+ String productName = product.getName();
+ if (productName.startsWith("epp.package."))
+ {
+ productName = productName.substring("epp.package.".length());
+ }
- productName = productName.replace('.', ' ');
+ productName = productName.replace('.', ' ');
- String qualifiedProductName = productName + " " + selectedProductVersion.getName().replace('.', ' ');
+ String qualifiedProductName = productName + " " + selectedProductVersion.getName().replace('.', ' ');
- String shortCutName = StringUtil.capAll(StringUtil.isEmpty(catalogName) ? qualifiedProductName : catalogName + " " + qualifiedProductName);
+ shortCutName = StringUtil.capAll(StringUtil.isEmpty(catalogName) ? qualifiedProductName : catalogName + " " + qualifiedProductName);
+ }
- if (createStartMenuEntryButton != null && createStartMenuEntryButton.isChecked())
+ if (createMenuShortcut)
{
KeepInstallerUtil.createShortCut("Programs", "Eclipse", executable.getAbsolutePath(), shortCutName);
}
- if (createDesktopShortcutButton != null && createDesktopShortcutButton.isChecked())
+ if (createDesktopShortcut)
{
KeepInstallerUtil.createShortCut("Desktop", null, executable.getAbsolutePath(), shortCutName);
}
diff --git a/plugins/org.eclipse.oomph.setup/META-INF/MANIFEST.MF b/plugins/org.eclipse.oomph.setup/META-INF/MANIFEST.MF
index 525368813..c37f163fd 100644
--- a/plugins/org.eclipse.oomph.setup/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.oomph.setup/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.oomph.setup;singleton:=true
-Bundle-Version: 1.14.0.qualifier
+Bundle-Version: 1.15.0.qualifier
Bundle-ClassPath: .
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
@@ -16,10 +16,10 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.10.0,3.0.0)";visibility:=reexport
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.oomph.internal.setup;version="1.14.0";x-internal:=true,
- org.eclipse.oomph.setup;version="1.14.0";x-internal:=true,
- org.eclipse.oomph.setup.impl;version="1.14.0";x-internal:=true,
- org.eclipse.oomph.setup.log;version="1.14.0";x-internal:=true,
- org.eclipse.oomph.setup.util;version="1.14.0";x-internal:=true
+Export-Package: org.eclipse.oomph.internal.setup;version="1.15.0";x-internal:=true,
+ org.eclipse.oomph.setup;version="1.15.0";x-internal:=true,
+ org.eclipse.oomph.setup.impl;version="1.15.0";x-internal:=true,
+ org.eclipse.oomph.setup.log;version="1.15.0";x-internal:=true,
+ org.eclipse.oomph.setup.util;version="1.15.0";x-internal:=true
Bundle-Activator: org.eclipse.oomph.internal.setup.SetupPlugin$Implementation
Automatic-Module-Name: org.eclipse.oomph.setup
diff --git a/plugins/org.eclipse.oomph.setup/pom.xml b/plugins/org.eclipse.oomph.setup/pom.xml
index f59d49486..6c28274fd 100644
--- a/plugins/org.eclipse.oomph.setup/pom.xml
+++ b/plugins/org.eclipse.oomph.setup/pom.xml
@@ -20,7 +20,7 @@
</parent>
<groupId>org.eclipse.oomph</groupId>
<artifactId>org.eclipse.oomph.setup</artifactId>
- <version>1.14.0-SNAPSHOT</version>
+ <version>1.15.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/plugins/org.eclipse.oomph.setup/src/org/eclipse/oomph/setup/AnnotationConstants.java b/plugins/org.eclipse.oomph.setup/src/org/eclipse/oomph/setup/AnnotationConstants.java
index 1c7317d37..2fbc90ce2 100644
--- a/plugins/org.eclipse.oomph.setup/src/org/eclipse/oomph/setup/AnnotationConstants.java
+++ b/plugins/org.eclipse.oomph.setup/src/org/eclipse/oomph/setup/AnnotationConstants.java
@@ -25,6 +25,8 @@ public final class AnnotationConstants
public static final String KEY_SITE_URI = "siteURI";
+ public static final String SHORTCUT = "shortcut";
+
public static final String ANNOTATION_STATS_SENDING = "http://www.eclipse.org/oomph/setup/StatsSending";
public static final String KEY_URI = "uri";
diff --git a/products/org.eclipse.oomph.setup.installer.product/Installer.product b/products/org.eclipse.oomph.setup.installer.product/Installer.product
index 49afbd697..67f11d4d4 100644
--- a/products/org.eclipse.oomph.setup.installer.product/Installer.product
+++ b/products/org.eclipse.oomph.setup.installer.product/Installer.product
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
-<product name="Eclipse Installer" uid="org.eclipse.oomph.setup.installer.product" id="org.eclipse.oomph.setup.installer.product" application="org.eclipse.oomph.setup.installer.application" version="1.14.0.qualifier" useFeatures="true" includeLaunchers="true">
+<product name="Eclipse Installer" uid="org.eclipse.oomph.setup.installer.product" id="org.eclipse.oomph.setup.installer.product" application="org.eclipse.oomph.setup.installer.application" version="1.15.0.qualifier" useFeatures="true" includeLaunchers="true">
<configIni use="">
</configIni>

Back to the top