diff options
author | Ed Merks | 2022-12-08 10:14:28 +0000 |
---|---|---|
committer | Ed Merks | 2022-12-08 10:14:28 +0000 |
commit | 4526b270906fa37beba76bd468ef852d33c599f5 (patch) | |
tree | 3927247db5dbb536bea2ed8096fff5ad237760fe | |
parent | ef5b3c455b8b31848cdca129b3c81a3da646b677 (diff) | |
download | justj.tools-master.tar.gz justj.tools-master.tar.xz justj.tools-master.zip |
https://github.com/eclipse-tycho/tycho/discussions/1824
-rw-r--r-- | plugins/org.eclipse.justj.p2/src/org/eclipse/justj/p2/P2Manager.java | 22 | ||||
-rw-r--r-- | releng/org.eclipse.justj.tools.parent/pom.xml | 2 |
2 files changed, 23 insertions, 1 deletions
diff --git a/plugins/org.eclipse.justj.p2/src/org/eclipse/justj/p2/P2Manager.java b/plugins/org.eclipse.justj.p2/src/org/eclipse/justj/p2/P2Manager.java index 054c934..807667d 100644 --- a/plugins/org.eclipse.justj.p2/src/org/eclipse/justj/p2/P2Manager.java +++ b/plugins/org.eclipse.justj.p2/src/org/eclipse/justj/p2/P2Manager.java @@ -35,6 +35,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; +import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -855,6 +856,16 @@ public class P2Manager int index = args.indexOf(name); if (index == -1) { + Pattern pattern = Pattern.compile(Pattern.quote(name) + "\\s+" + "([^-].*)"); + for (String arg : args) + { + Matcher matcher = pattern.matcher(arg); + if (matcher.matches()) + { + args.remove(arg); + return matcher.group(1); + } + } return defaultValue; } else @@ -989,6 +1000,17 @@ public class P2Manager environment.put("PATH", path); environment.put("Path", path); } + else if (absoluteExecutablePath != null && File.separatorChar == '\\') + { + // Ensure that the path on which it is found is first in the search list so that other things like "find" look here first. + // + fullPath = absoluteExecutablePath.getParent() + File.pathSeparator + fullPath; + + // Put it in for both case variants because a debug launch worked but a run launch did not. Go figure. + // + environment.put("PATH", fullPath); + environment.put("Path", fullPath); + } if (absoluteExecutablePath == null) { diff --git a/releng/org.eclipse.justj.tools.parent/pom.xml b/releng/org.eclipse.justj.tools.parent/pom.xml index 2e8821c..e080f53 100644 --- a/releng/org.eclipse.justj.tools.parent/pom.xml +++ b/releng/org.eclipse.justj.tools.parent/pom.xml @@ -53,7 +53,7 @@ SPDX-License-Identifier: EPL-2.0 </repository> <repository> <id>eclipse-platform-repository</id> - <url>https://download.eclipse.org/eclipse/updates/4.26-I-builds</url> + <url>https://download.eclipse.org/eclipse/updates/4.27-I-builds</url> <layout>p2</layout> </repository> </repositories> |