[Title] Fixed setPath for linux
authorkh5325.kim <kh5325.kim@samsung.com>
Sat, 19 May 2012 06:05:52 +0000 (15:05 +0900)
committerTaeyoung Son <taeyoung2.son@samsung.com>
Mon, 21 May 2012 01:24:42 +0000 (10:24 +0900)
[Type]
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPreferenceInitializer.java

index b97837d..536bde8 100644 (file)
@@ -82,7 +82,9 @@ public class CUIPreferenceInitializer extends AbstractPreferenceInitializer {
        private void setPath() {
                isFirst = false;
                String eclipseRootPath = Platform.getInstallLocation().getURL().getPath();
-               eclipseRootPath = eclipseRootPath.substring(1, eclipseRootPath.length());
+               // In Windows, path is like /D:/works/workspace/slp/indigo-winpde/eclipse/
+               if (System.getProperty("os.name").startsWith("Windows"))
+                       eclipseRootPath = eclipseRootPath.substring(1, eclipseRootPath.length());
 
                String eclipsePluginPath = eclipseRootPath + path;
                String doxygenJarFileName = null;