Made finding the ID of a JsonSerializable less ugly
[Mograsim.git] / net.mograsim.logic.model / src / net / mograsim / logic / model / model / components / submodels / SubmodelInterface.java
index 9ac1749..9c4c46d 100644 (file)
@@ -5,6 +5,7 @@ import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
 import net.mograsim.logic.model.model.ViewModelModifiable;
 import net.mograsim.logic.model.model.components.GUIComponent;
 import net.mograsim.logic.model.model.wires.Pin;
+import net.mograsim.logic.model.serializing.IdentifyParams;
 
 public class SubmodelInterface extends GUIComponent
 {
@@ -18,6 +19,12 @@ public class SubmodelInterface extends GUIComponent
        {// nothing to do here
        }
 
+       @Override
+       public String getIDForSerializing(IdentifyParams idParams)
+       {
+               throw new UnsupportedOperationException("A SubmodelInterface can't be serialized. Use SubmodelComponent.addSubmodelInterface");
+       }
+
        /**
         * {@inheritDoc}<br>
         * This method is only marked public in {@link SubmodelInterface} for {@link SubmodelComponent} to be able to add / remove pins to /