use of de.neemann.digital.gui.components.modification.ModifyMeasurementOrdering in project Digital by hneemann.
the class Main method orderMeasurements.
private void orderMeasurements() {
try {
Model m = new ModelCreator(circuitComponent.getCircuit(), library).createModel(false);
try {
ensureModelIsStopped();
ArrayList<String> names = new ArrayList<>();
for (Signal s : m.getSignals()) names.add(s.getName());
new OrderMerger<String, String>(circuitComponent.getCircuit().getMeasurementOrdering()).order(names);
ElementOrderer.ListOrder<String> o = new ElementOrderer.ListOrder<>(names);
if (new ElementOrderer<>(Main.this, Lang.get("menu_orderMeasurements"), o).addOkButton().showDialog()) {
circuitComponent.modify(new ModifyMeasurementOrdering(names));
}
} finally {
m.close();
}
} catch (NodeException | PinException | ElementNotFoundException | RuntimeException e) {
showErrorWithoutARunningModel(Lang.get("msg_errorCreatingModel"), e);
}
}
Aggregations