Skip to content
Snippets Groups Projects
Commit dfcd10bf authored by Michael Leuschel's avatar Michael Leuschel
Browse files

also allow contexts to be animated with ProB standalone

parent e98b1b11
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ import org.eclipse.jface.viewers.ISelection; ...@@ -16,7 +16,7 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.handlers.HandlerUtil; import org.eclipse.ui.handlers.HandlerUtil;
import org.eventb.core.IEventBRoot; import org.eventb.core.IEventBRoot;
import org.eventb.core.IMachineRoot; //import org.eventb.core.IMachineRoot;
import org.osgi.service.prefs.Preferences; import org.osgi.service.prefs.Preferences;
import de.prob.logging.Logger; import de.prob.logging.Logger;
...@@ -146,15 +146,15 @@ public class OpenClassicHandler extends AbstractHandler implements IHandler { ...@@ -146,15 +146,15 @@ public class OpenClassicHandler extends AbstractHandler implements IHandler {
return temp; return temp;
} }
private IMachineRoot getSelection() { private IEventBRoot getSelection() {
if (!(fSelection instanceof IStructuredSelection)) if (!(fSelection instanceof IStructuredSelection))
return null; return null;
final IStructuredSelection ssel = (IStructuredSelection) fSelection; final IStructuredSelection ssel = (IStructuredSelection) fSelection;
if (ssel.size() != 1) if (ssel.size() != 1)
return null; return null;
if (!(ssel.getFirstElement() instanceof IMachineRoot)) if (!(ssel.getFirstElement() instanceof IEventBRoot)) // was IMachineRoot
return null; return null;
return (IMachineRoot) ssel.getFirstElement(); return (IEventBRoot) ssel.getFirstElement();
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment