X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Flaunch%2FMachineLaunchConfigType.java;fp=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Flaunch%2FMachineLaunchConfigType.java;h=ab3650833be19c9954ec6d3802e8008865ced35d;hb=9f74e2c4e92f314a16ff0bd3a14d4661e655949e;hp=a97d2c6f66a9b7ecba84bd893c66251e935c9ec6;hpb=240c1cb91e7ef820c25652c75187f0ece79723d6;p=Mograsim.git diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineLaunchConfigType.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineLaunchConfigType.java index a97d2c6f..ab365083 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineLaunchConfigType.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineLaunchConfigType.java @@ -136,7 +136,8 @@ public class MachineLaunchConfigType extends LaunchConfigurationDelegate MachineDefinition machineDefinition = machineContext.getMachineDefinition().orElseThrow(); MainMemoryDefinition mainMemDef = machineDefinition.getMainMemoryDefinition(); - mpmFile = project.getFile(configuration.getAttribute(MPM_FILE_ATTR, "")); + String mpmName; + mpmFile = project.getFile(mpmName = configuration.getAttribute(MPM_FILE_ATTR, "")); String initialRAMFileName = configuration.getAttribute(INITIAL_RAM_FILE_ATTR, ""); MainMemory mem; @@ -155,7 +156,8 @@ public class MachineLaunchConfigType extends LaunchConfigurationDelegate } else mem = null; - MachineDebugTarget debugTarget = new MachineDebugTarget(launch, machineDefinition); + MachineLaunchParams params = new MachineLaunchParams(projName, mpmName, initialRAMFileName); + MachineDebugTarget debugTarget = new MachineDebugTarget(launch, params, machineDefinition); debugTarget.suspend(); debugTarget.setExecutionSpeed(1); machine = debugTarget.getMachine(); @@ -236,4 +238,31 @@ public class MachineLaunchConfigType extends LaunchConfigurationDelegate } System.out.println(typeStr + ": " + event); } + + public static class MachineLaunchParams + { + public final String projectPath, mpmPath, ramPath; + + MachineLaunchParams(String projectPath, String mpmPath, String ramPath) + { + this.projectPath = projectPath; + this.mpmPath = mpmPath; + this.ramPath = ramPath; + } + + public String getProjectPath() + { + return projectPath; + } + + public String getMpmPath() + { + return mpmPath; + } + + public String getRamPath() + { + return ramPath; + } + } } \ No newline at end of file