From 1476b6d5c95ac4c40a566a76939c3776c479759f Mon Sep 17 00:00:00 2001 From: Christoph Rueger Date: Sun, 8 Dec 2024 13:50:32 +0100 Subject: [PATCH] init MavenImplicitProjectRepository again in 7.0.0 LaunchUtils.createRun() was called which is responsible for creating an instance of MavenImplicitProjectRepository which is required for resolving bndrun in an m2e project. but it was removed in 7.1.0 for some reason. Signed-off-by: Christoph Rueger --- bndtools.core/src/bndtools/editor/BndEditor.java | 9 +++++++-- .../.history/8d/f0559db362b5001f1aa89e1fa67986db | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 bndtools.test/workspace2/.metadata/.plugins/org.eclipse.core.resources/.history/8d/f0559db362b5001f1aa89e1fa67986db diff --git a/bndtools.core/src/bndtools/editor/BndEditor.java b/bndtools.core/src/bndtools/editor/BndEditor.java index 65cd78a9b9..b6ce798a10 100644 --- a/bndtools.core/src/bndtools/editor/BndEditor.java +++ b/bndtools.core/src/bndtools/editor/BndEditor.java @@ -14,6 +14,7 @@ import org.bndtools.api.ILogger; import org.bndtools.api.Logger; +import org.bndtools.api.RunMode; import org.bndtools.api.editor.IBndEditor; import org.bndtools.api.launch.LaunchConstants; import org.bndtools.core.jobs.JobUtil; @@ -619,8 +620,12 @@ private Promise loadEditModel(File inputFile, BndEditModel model) thr Processor p = workspace.readLocked(() -> workspace.findProcessor(inputFile) .orElseGet(() -> { try { - Bndrun bndrun = Bndrun.createBndrun(workspace, inputFile); - return bndrun; + if (inputResource != null) { + return LaunchUtils.createRun(inputResource, RunMode.EDIT); + } else { + return Bndrun.createBndrun(workspace, this.inputFile); + } + } catch (Exception e) { throw Exceptions.duck(e); } diff --git a/bndtools.test/workspace2/.metadata/.plugins/org.eclipse.core.resources/.history/8d/f0559db362b5001f1aa89e1fa67986db b/bndtools.test/workspace2/.metadata/.plugins/org.eclipse.core.resources/.history/8d/f0559db362b5001f1aa89e1fa67986db new file mode 100644 index 0000000000..91febbe97c --- /dev/null +++ b/bndtools.test/workspace2/.metadata/.plugins/org.eclipse.core.resources/.history/8d/f0559db362b5001f1aa89e1fa67986db @@ -0,0 +1,5 @@ +-resolve.effective: active +-runfw: org.eclipse.osgi;version='3.21.0' +-runee: JavaSE-17 +-runrequires: bnd.identity;id='org.example.bndtools.bndrun.reproducer' +-runbundles: org.example.bndtools.bndrun.reproducer;version='[1.0.0,1.0.1)' \ No newline at end of file