Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael Istria2016-10-03 14:50:32 +0000
committerThomas Watson2017-03-29 13:33:19 +0000
commit60a423633ebd7246d33e8f95eb642e1dbeb2ea07 (patch)
treeaf1c55c0b5f8f61238a27ec60656f5e7189fc882 /bundles
parentcdbcdff46dca1084e5d369bb5e1e01841f4a53e2 (diff)
downloadrt.equinox.framework-60a423633ebd7246d33e8f95eb642e1dbeb2ea07.tar.gz
rt.equinox.framework-60a423633ebd7246d33e8f95eb642e1dbeb2ea07.tar.xz
rt.equinox.framework-60a423633ebd7246d33e8f95eb642e1dbeb2ea07.zip
Bug 502220 - Default workspace is ${launcher.name}-workspace
Change-Id: If2d885a7145222e626813e3b29a395f9adef46b3 Signed-off-by: Mickael Istria <mistria@redhat.com>
Diffstat (limited to 'bundles')
-rwxr-xr-xbundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/location/EquinoxLocations.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/location/EquinoxLocations.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/location/EquinoxLocations.java
index 8d623a74a..c1cce1c8e 100755
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/location/EquinoxLocations.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/location/EquinoxLocations.java
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Rapicorp, Inc - Support for Mac Layout (bug 431116)
+ * Mickael Istria (Red Hat Inc.) - [502220] Default ws ${launcher}-workspace
*******************************************************************************/
package org.eclipse.osgi.internal.location;
@@ -92,8 +93,20 @@ public class EquinoxLocations {
temp = buildLocation(PROP_INSTANCE_AREA_DEFAULT, null, "", false, false, INSTANCE_DATA_AREA_PREFIX); //$NON-NLS-1$
defaultLocation = temp == null ? null : temp.getURL();
- if (defaultLocation == null)
- defaultLocation = buildURL(new File(System.getProperty(PROP_USER_DIR), "workspace").getAbsolutePath(), true); //$NON-NLS-1$
+ if (defaultLocation == null) {
+ StringBuilder instanceAreaDefault = new StringBuilder();
+ String launcherPath = equinoxConfig.getConfiguration(PROP_LAUNCHER);
+ if (launcherPath != null) {
+ String launcherName = new File(launcherPath).getName();
+ if (launcherName.endsWith(".exe")) { //$NON-NLS-1$
+ launcherName = launcherName.substring(0, launcherName.length() - ".exe".length()); //$NON-NLS-1$
+ }
+ instanceAreaDefault.append(launcherName);
+ instanceAreaDefault.append('-');
+ }
+ instanceAreaDefault.append("workspace"); //$NON-NLS-1$
+ defaultLocation = buildURL(new File(System.getProperty(PROP_USER_DIR), instanceAreaDefault.toString()).getAbsolutePath(), true);
+ }
instanceLocation = buildLocation(PROP_INSTANCE_AREA, defaultLocation, "", false, false, INSTANCE_DATA_AREA_PREFIX); //$NON-NLS-1$
mungeConfigurationLocation();

Back to the top