Commit d91bd463 authored by Lulu Luong's avatar Lulu Luong

added psdbg sub folder in temp

parent a552cb5d
Pipeline #28097 passed with stages
in 114 minutes and 55 seconds
...@@ -24,7 +24,11 @@ public abstract class Example { ...@@ -24,7 +24,11 @@ public abstract class Example {
protected MainScriptIdentifier mainScriptIdentifier; protected MainScriptIdentifier mainScriptIdentifier;
public static File newTempFile(URL url, String filename) throws IOException { public static File newTempFile(URL url, String filename) throws IOException {
File f = new File(FileUtils.getTempDirectoryPath(), filename);
//TODO: add unterordner
File psdbg = new File(FileUtils.getTempDirectoryPath(), "psdbg");
File f = new File(psdbg, filename);
FileUtils.copyURLToFile(url, f); FileUtils.copyURLToFile(url, f);
return f; return f;
} }
......
...@@ -260,6 +260,34 @@ public class InteractiveModeController { ...@@ -260,6 +260,34 @@ public class InteractiveModeController {
} }
} }
@Subscribe
public void handle(Events.CommandApplicationEvent map) {
LOGGER.debug("Handling {}", map);
Goal g = map.getCurrentGoal();
Parameters callp = new Parameters();
CallStatement call = new CallStatement(map.getCommandName().getName(), callp);
try {
applyRuleHelper(call, g, Type.SCRIPT_COMMAND);
String c = getCasesAsString();
scriptArea.setText("" +
"//Preview \n" + c);
} catch (ScriptCommandNotApplicableException e) {
StringBuilder sb = new StringBuilder("The script command ");
sb.append(call.getCommand()).append(" was not applicable.");
System.out.println("e = " + e);
//sb.append("\nSequent Formula: formula=").append(sfTerm);
//sb.append("\nOn Sub Term: on=").append(onTerm);
Utils.showWarningDialog("Proof Command was not applicable",
"Proof Command was not applicable.",
sb.toString(), e);
}
}
private void applyRuleHelper(CallStatement call, Goal g, Type t) throws ScriptCommandNotApplicableException { private void applyRuleHelper(CallStatement call, Goal g, Type t) throws ScriptCommandNotApplicableException {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment