use of de.neemann.digital.gui.remote.RemoteException in project Digital by hneemann.
the class Main method runToBreak.
@Override
public String runToBreak() throws RemoteException {
try {
AddressPicker addressPicker = new AddressPicker();
SwingUtilities.invokeAndWait(() -> {
if (model != null && model.isFastRunModel() && !realTimeClockRunning) {
runToBreakAction.actionPerformed(null);
addressPicker.getProgramROMAddress(model);
}
});
return addressPicker.getAddressString();
} catch (InterruptedException | InvocationTargetException e) {
throw new RemoteException("error performing a run to break " + e.getMessage());
}
}
use of de.neemann.digital.gui.remote.RemoteException in project Digital by hneemann.
the class Main method doSingleStep.
@Override
public String doSingleStep() throws RemoteException {
if (model != null && !realTimeClockRunning) {
try {
AddressPicker addressPicker = new AddressPicker();
SwingUtilities.invokeAndWait(() -> {
ArrayList<Clock> cl = model.getClocks();
if (cl.size() == 1) {
ObservableValue clkVal = cl.get(0).getClockOutput();
clkVal.setBool(!clkVal.getBool());
try {
model.doStep();
if (clkVal.getBool()) {
clkVal.setBool(!clkVal.getBool());
model.doStep();
}
circuitComponent.repaintNeeded();
addressPicker.getProgramROMAddress(model);
} catch (NodeException | RuntimeException e) {
showErrorAndStopModel(Lang.get("err_remoteExecution"), e);
}
}
});
return addressPicker.getAddressString();
} catch (InterruptedException | InvocationTargetException e) {
throw new RemoteException("error performing a single step " + e.getMessage());
}
}
return null;
}
Aggregations