From b5e45f326cbdd022523d3161dc7eb2e4efe12aae Mon Sep 17 00:00:00 2001 From: "yoonki.park" Date: Mon, 25 Jul 2011 23:47:12 +0900 Subject: [PATCH] using oschecker class when getting sdk install path --- .../com/samsung/ide/common/properties/InstallPathConfig.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/com.samsung.ide.common/src/com/samsung/ide/common/properties/InstallPathConfig.java b/com.samsung.ide.common/src/com/samsung/ide/common/properties/InstallPathConfig.java index fcf0d4d..001b23a 100644 --- a/com.samsung.ide.common/src/com/samsung/ide/common/properties/InstallPathConfig.java +++ b/com.samsung.ide.common/src/com/samsung/ide/common/properties/InstallPathConfig.java @@ -13,21 +13,21 @@ import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.PlatformUI; import com.samsung.ide.common.util.HostUtil; +import com.samsung.ide.common.util.OSChecker; final public class InstallPathConfig { private static String sdkInstallPath; - private final static String SLP_REGKEY = "slpsdk--installpath"; + private final static String SLP_REGKEY = "slpsdk-installpath"; private final static String EMULATOR_PATH = "Emulator"; private final static String BUILDSYSTEM_PATH = "SDK" + File.separatorChar +"build-system"; static { - String os = System.getProperty("os.name").toLowerCase(); String sdkPath; IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); - if ( os.indexOf("nix") >= 0 || os.indexOf("nux") >= 0 || os.indexOf("mac") >= 0) { + if ( OSChecker.isLinux() == true || OSChecker.isUnix() == true || OSChecker.isMAC() == true) { sdkPath= System.getProperty("user.home") + "/.slpsdk"; String[] fileContent = HostUtil.getContents(sdkPath).split("="); if (HostUtil.exists(fileContent[1])) { @@ -36,7 +36,7 @@ final public class InstallPathConfig { MessageDialog.openInformation(window.getShell(),"SLP SDK", "SLP SDK is not installed propertly. \nSLP IDE will be terminated."); System.exit(-1); } - } else if (os.indexOf("win") >=0) { + } else if (OSChecker.isWindows()) { sdkPath = Preferences.userRoot().get(SLP_REGKEY, ""); if (HostUtil.exists(sdkPath)) { sdkInstallPath = sdkPath; @@ -52,7 +52,7 @@ final public class InstallPathConfig { public static String getEmulatorPath(){ return sdkInstallPath + File.separatorChar + EMULATOR_PATH; } - public static String getIDEPath() { // due to the wac ide path! + public static String getIDEPath() { // can't help but putting the code due to the wac ide path return System.getProperty("user.dir"); } public static String getSDKPath() { -- 2.7.4