try
{
DeserializedSubmodelComponent comp = (DeserializedSubmodelComponent) IndirectGUIComponentCreator
- .createComponent(new ViewModelModifiable(), "file:" + json.toString());
+ .createComponent(new ViewModelModifiable(), "jsonfile:" + json.toString());
System.out.println("Reserializing " + json);
comp.getSupermodelPins().entrySet().stream().sorted(Comparator.comparing(Entry::getKey)).map(Entry::getValue).forEach(pin ->
{
{
Set<GUIWire> wiresConnectedToPin = comp.submodel.getWiresByName().values().stream()
.filter(w -> w.getPin1() == interfacePin || w.getPin2() == interfacePin).collect(Collectors.toSet());
- wiresConnectedToPin.forEach(GUIWire::destroy);
+ wiresConnectedToPin.forEach(comp.getSubmodelModifiable()::destroyWire);
comp.removeSubmodelInterface(interfacePin.name);
comp.addSubmodelInterface(
new MovablePin(comp, interfacePin.name, interfacePin.logicWidth, usage, interfacePin.getRelX(), interfacePin.getRelY()));