From 8205a0656e3517dfa4878c7557e051ed32f92ae3 Mon Sep 17 00:00:00 2001 From: Michael Leuschel <leuschel@cs.uni-duesseldorf.de> Date: Wed, 2 Oct 2019 16:02:30 +0200 Subject: [PATCH] use getRawLocation instead of getFullPath for .bum/.buc files --- de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java b/de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java index 986212ee..a2656d80 100644 --- a/de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java +++ b/de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java @@ -9,8 +9,7 @@ import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.commands.IHandler; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.ResourcesPlugin; +//import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.jface.viewers.ISelection; @@ -42,8 +41,8 @@ public class OpenClassicHandler extends AbstractHandler implements IHandler { if(prob_location.endsWith(".jar")) { // we can open directly the .bum or .buc files with ProB2; we need to get it from root // we could also get a platform URI: URI fileURI = URI.createPlatformResourceURI(root.getResource().getFullPath().toString(), true); - String bum_buc_path = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString() - + root.getResource().getFullPath().toString(); + String bum_buc_path = //ResourcesPlugin.getWorkspace().getRoot().getLocation().toString() + root.getResource().getFullPath().toString(); + root.getResource().getRawLocation().toString(); runProB2(prob_location, bum_buc_path); } else { final File temp = createTempFile(); -- GitLab