summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Wagenknecht2012-02-29 16:39:31 (EST)
committerCurtis Windatt2012-02-29 16:39:31 (EST)
commit1b1270a8bd74a861e574799b8c0b995f7e6a85f1 (patch)
tree2c56a3b1e5c46fda71a79f7c96a22a321995c0d5
parent6df39c6c58d303e8fe186585d22bb5636d33c5ea (diff)
downloadeclipse.pde.ui-1b1270a8bd74a861e574799b8c0b995f7e6a85f1.zip
eclipse.pde.ui-1b1270a8bd74a861e574799b8c0b995f7e6a85f1.tar.gz
eclipse.pde.ui-1b1270a8bd74a861e574799b8c0b995f7e6a85f1.tar.bz2
Bug 315039 - [patch] Eclipse launch configuration should inherit properties from target platformv20120229-2139
-rw-r--r--ui/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchConfigurationHelper.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/ui/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchConfigurationHelper.java b/ui/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchConfigurationHelper.java
index 98875d9..4f18f62 100644
--- a/ui/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchConfigurationHelper.java
+++ b/ui/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchConfigurationHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -35,6 +35,9 @@ public class LaunchConfigurationHelper {
private static final String PROP_OSGI_FRAMEWORK = "osgi.framework"; //$NON-NLS-1$
private static final String PROP_OSGI_BUNDLES = "osgi.bundles"; //$NON-NLS-1$
private static final String PROP_P2_DATA_AREA = "eclipse.p2.data.area"; //$NON-NLS-1$
+ private static final String PROP_PRODUCT = "eclipse.product"; //$NON-NLS-1$
+ private static final String PROP_APPLICATION = "eclipse.application"; //$NON-NLS-1$
+
private static final String DEFAULT_PROFILE_NAME = "SelfHostingProfile"; //$NON-NLS-1$
/**
@@ -104,13 +107,15 @@ public class LaunchConfigurationHelper {
Properties properties = null;
// if we are to generate a config.ini, start with the values in the target platform's config.ini - bug 141918
if (configuration.getAttribute(IPDELauncherConstants.CONFIG_GENERATE_DEFAULT, true)) {
+ String appID = configuration.getAttribute(IPDELauncherConstants.APPLICATION, TargetPlatform.getDefaultApplication());
properties = TargetPlatformHelper.getConfigIniProperties();
// if target's config.ini does not exist, lets try to fill in default values
if (properties == null)
properties = new Properties();
- // keep properties only if we are launching the default product (bug 175437)
- else if (productID == null || !productID.equals(properties.get("eclipse.product"))) //$NON-NLS-1$
+ // clear properties only if we are NOT launching the default product or app (bug 175437, bug 315039)
+ else if ((productID != null && !productID.equals(properties.get(PROP_PRODUCT)) || (appID != null && !appID.equals(properties.get(PROP_APPLICATION))))) {
properties.clear();
+ }
// if target's config.ini has the osgi.bundles header, then parse and compute the proper osgi.bundles value
String bundleList = properties.getProperty(PROP_OSGI_BUNDLES);
if (bundleList != null)
@@ -228,7 +233,7 @@ public class LaunchConfigurationHelper {
*/
private static String computeOSGiBundles(String bundleList, Map bundles, Map bundlesWithStartLevels) {
- // if p2 and only simple configurator and
+ // if p2 and only simple configurator and
// if simple configurator isn't selected & isn't in bundle list... hack it
// if using p2's simple configurator, a bundles.txt will be written, so we only need simple configurator in the config.ini