diff --git a/plugins/org.zephyrproject.ide.eclipse.core.java11/src/org/zephyrproject/ide/eclipse/core/internal/launch/java11/ZephyrLaunchHelpers.java b/plugins/org.zephyrproject.ide.eclipse.core.java11/src/org/zephyrproject/ide/eclipse/core/internal/launch/java11/ZephyrLaunchHelpers.java index e4f7458..f19096c 100644 --- a/plugins/org.zephyrproject.ide.eclipse.core.java11/src/org/zephyrproject/ide/eclipse/core/internal/launch/java11/ZephyrLaunchHelpers.java +++ b/plugins/org.zephyrproject.ide.eclipse.core.java11/src/org/zephyrproject/ide/eclipse/core/internal/launch/java11/ZephyrLaunchHelpers.java @@ -106,7 +106,16 @@ public Process runWest(IProject project, } ArrayList cmds = new ArrayList(); - cmds.add(westPath); + + if (westPath.indexOf(';') == -1) { + cmds.add(westPath); + } else { + String[] westPathBits = westPath.split(";"); + for (String s : westPathBits) { + cmds.add(s); + } + } + cmds.add(action); if (args != null) { cmds.addAll(ZephyrHelpers.parseWestArguments(args)); diff --git a/plugins/org.zephyrproject.ide.eclipse.core.linux/src/org/zephyrproject/ide/eclipse/core/internal/launch/linux/ZephyrLaunchHelpers.java b/plugins/org.zephyrproject.ide.eclipse.core.linux/src/org/zephyrproject/ide/eclipse/core/internal/launch/linux/ZephyrLaunchHelpers.java index 167c655..11605ab 100644 --- a/plugins/org.zephyrproject.ide.eclipse.core.linux/src/org/zephyrproject/ide/eclipse/core/internal/launch/linux/ZephyrLaunchHelpers.java +++ b/plugins/org.zephyrproject.ide.eclipse.core.linux/src/org/zephyrproject/ide/eclipse/core/internal/launch/linux/ZephyrLaunchHelpers.java @@ -98,7 +98,16 @@ public Process runWest(IProject project, } ArrayList cmds = new ArrayList(); - cmds.add(westPath); + + if (westPath.indexOf(';') == -1) { + cmds.add(westPath); + } else { + String[] westPathBits = westPath.split(";"); + for (String s : westPathBits) { + cmds.add(s); + } + } + cmds.add(action); if (args != null) { cmds.add(args); diff --git a/plugins/org.zephyrproject.ide.eclipse.core.macosx/src/org/zephyrproject/ide/eclipse/core/internal/launch/macosx/ZephyrLaunchHelpers.java b/plugins/org.zephyrproject.ide.eclipse.core.macosx/src/org/zephyrproject/ide/eclipse/core/internal/launch/macosx/ZephyrLaunchHelpers.java index d815c2d..3f99648 100644 --- a/plugins/org.zephyrproject.ide.eclipse.core.macosx/src/org/zephyrproject/ide/eclipse/core/internal/launch/macosx/ZephyrLaunchHelpers.java +++ b/plugins/org.zephyrproject.ide.eclipse.core.macosx/src/org/zephyrproject/ide/eclipse/core/internal/launch/macosx/ZephyrLaunchHelpers.java @@ -98,7 +98,16 @@ public Process runWest(IProject project, } ArrayList cmds = new ArrayList(); - cmds.add(westPath); + + if (westPath.indexOf(';') == -1) { + cmds.add(westPath); + } else { + String[] westPathBits = westPath.split(";"); + for (String s : westPathBits) { + cmds.add(s); + } + } + cmds.add(action); if (args != null) { cmds.add(args); diff --git a/plugins/org.zephyrproject.ide.eclipse.core/src/org/zephyrproject/ide/eclipse/core/internal/build/CMakeCache.java b/plugins/org.zephyrproject.ide.eclipse.core/src/org/zephyrproject/ide/eclipse/core/internal/build/CMakeCache.java index 59d9226..a68b638 100644 --- a/plugins/org.zephyrproject.ide.eclipse.core/src/org/zephyrproject/ide/eclipse/core/internal/build/CMakeCache.java +++ b/plugins/org.zephyrproject.ide.eclipse.core/src/org/zephyrproject/ide/eclipse/core/internal/build/CMakeCache.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Intel Corporation + * Copyright (c) 2019-2020 Intel Corporation * * SPDX-License-Identifier: EPL-2.0 */ @@ -83,7 +83,22 @@ public String getString(String name) { * not of type FILEPATH */ public String getFilePath(String name) { - return getTypedValue("FILEPATH=", name); //$NON-NLS-1$ + String val = getTypedValue("FILEPATH=", name); //$NON-NLS-1$ + + if ((val != null) && (val.indexOf("-NOTFOUND") != -1)) { + return null; + } + + return val; + } + + /** + * @param name Name of cached variable with type INTERNAL + * @return The INTERNAL value or {@code null} if variable does not exist or + * not of type INTERNAL + */ + public String getInternal(String name) { + return getTypedValue("INTERNAL=", name); //$NON-NLS-1$ } /** @@ -118,7 +133,15 @@ public String getGdb() { * @return Path to West as discovered by CMake */ public String getWest() { - return getFilePath(WEST); + /* WEST can appear as FILEPATH or INTERNAL. */ + + String val = getFilePath(WEST); + + if (val == null) { + val = getInternal(WEST); + } + + return val; } /**