Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2015-03-10 01:35:06 +0000
committerPascal Rapicault2015-03-10 01:35:06 +0000
commit721e1e1dcbbb41f8a19547c6e7244dc0d68ef9f9 (patch)
tree9f417677384780d24ec085ea7ae5ba81544f6671
parenta950b80445e04dc41a3f7364b0ac0074c9b21b5a (diff)
downloadrt.equinox.framework-I20150316-0800.tar.gz
rt.equinox.framework-I20150316-0800.tar.xz
rt.equinox.framework-I20150316-0800.zip
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/location/EquinoxLocations.java16
1 files changed, 5 insertions, 11 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 c9efa45c8..a39cc26d9 100644
--- 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Rapicorp, Inc - Support for Mac Layout (bug 431116)
*******************************************************************************/
package org.eclipse.osgi.internal.location;
@@ -151,21 +152,14 @@ public class EquinoxLocations {
// check for mac os; the os check is copied from EclipseEnvironmentInfo.
String macosx = org.eclipse.osgi.service.environment.Constants.OS_MACOSX;
if (macosx.equals(equinoxConfig.getOS()))
- launcherDir = getMacOSEclipsoeHomeLocation(launcherDir);
+ launcherDir = getMacOSEclipseHomeLocation(launcherDir);
return (launcherDir.exists() && launcherDir.isDirectory()) ? launcherDir.getAbsolutePath() : null;
}
- private static File getMacOSEclipsoeHomeLocation(File launcherDir) {
- // TODO for now we go up three directories from the launcher dir as long as the parent dir is named MacOS; is this always the case?
- // TODO not sure if case is important
+ private static File getMacOSEclipseHomeLocation(File launcherDir) {
if (!launcherDir.getName().equalsIgnoreCase("macos")) //$NON-NLS-1$
return launcherDir; // don't do the up three stuff if not in macos directory
- String launcherParent = launcherDir.getParent();
- if (launcherParent != null)
- launcherParent = new File(launcherParent).getParent();
- if (launcherParent != null)
- launcherParent = new File(launcherParent).getParent();
- return launcherParent == null ? null : new File(launcherParent);
+ return new File(launcherDir.getParent(), "Eclipse"); //$NON-NLS-1$
}
@SuppressWarnings("deprecation")

Back to the top