projects
/
Mograsim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c76732c
)
Switched to using IndirectGUIComponentCreator instead of new GUIAm2901()
author
Daniel Kirschten
<daniel.kirschten@gmx.de>
Wed, 17 Jul 2019 11:59:35 +0000
(13:59 +0200)
committer
Daniel Kirschten
<daniel.kirschten@gmx.de>
Wed, 17 Jul 2019 11:59:35 +0000
(13:59 +0200)
net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/SubmodelComponentTestbench.java
patch
|
blob
|
history
net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901Impl.java
patch
|
blob
|
history
diff --git
a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/SubmodelComponentTestbench.java
b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/SubmodelComponentTestbench.java
index
e55819a
..
2da80ae
100644
(file)
--- a/
net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/SubmodelComponentTestbench.java
+++ b/
net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/SubmodelComponentTestbench.java
@@
-22,7
+22,7
@@
public class SubmodelComponentTestbench
@SuppressWarnings("unused") // for GUIWires being created
public static void createTestbench(ViewModelModifiable model)
{
@SuppressWarnings("unused") // for GUIWires being created
public static void createTestbench(ViewModelModifiable model)
{
- GUIComponent comp = IndirectGUIComponentCreator.createComponent(model, "
file:components/am2901/GUIAm2901.json
", "Am2901");
+ GUIComponent comp = IndirectGUIComponentCreator.createComponent(model, "
GUIAm2901
", "Am2901");
// guess which pins are outputs and which are inputs
// TODO this code exists three times... but it seems too "hacky" to put it in a helper class
// guess which pins are outputs and which are inputs
// TODO this code exists three times... but it seems too "hacky" to put it in a helper class
diff --git
a/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901Impl.java
b/net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901Impl.java
index
98a6d10
..
1448333
100644
(file)
--- a/
net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901Impl.java
+++ b/
net.mograsim.logic.model.am2900/test/net/mograsim/logic/model/am2900/TestableAm2901Impl.java
@@
-24,12
+24,12
@@
import net.mograsim.logic.model.model.ViewModelModifiable;
import net.mograsim.logic.model.model.components.GUIComponent;
import net.mograsim.logic.model.model.components.atomic.GUIBitDisplay;
import net.mograsim.logic.model.model.components.atomic.GUIManualSwitch;
import net.mograsim.logic.model.model.components.GUIComponent;
import net.mograsim.logic.model.model.components.atomic.GUIBitDisplay;
import net.mograsim.logic.model.model.components.atomic.GUIManualSwitch;
-import net.mograsim.logic.model.model.components.mi.nandbased.am2901.GUIAm2901;
import net.mograsim.logic.model.model.components.submodels.SubmodelComponent;
import net.mograsim.logic.model.model.wires.GUIWire;
import net.mograsim.logic.model.model.wires.Pin;
import net.mograsim.logic.model.modeladapter.LogicModelParameters;
import net.mograsim.logic.model.modeladapter.ViewLogicModelAdapter;
import net.mograsim.logic.model.model.components.submodels.SubmodelComponent;
import net.mograsim.logic.model.model.wires.GUIWire;
import net.mograsim.logic.model.model.wires.Pin;
import net.mograsim.logic.model.modeladapter.LogicModelParameters;
import net.mograsim.logic.model.modeladapter.ViewLogicModelAdapter;
+import net.mograsim.logic.model.serializing.IndirectGUIComponentCreator;
public class TestableAm2901Impl implements TestableAm2901
{
public class TestableAm2901Impl implements TestableAm2901
{
@@
-103,9
+103,7
@@
public class TestableAm2901Impl implements TestableAm2901
{
// Create view model
ViewModelModifiable viewModel = new ViewModelModifiable();
{
// Create view model
ViewModelModifiable viewModel = new ViewModelModifiable();
- // TODO replace with deserialized version as soon as high level states work for deserialized components
- am2901 = new GUIAm2901(viewModel);
-// am2901 = IndirectGUIComponentCreator.createComponent(viewModel, "GUIAm2901");
+ am2901 = IndirectGUIComponentCreator.createComponent(viewModel, "GUIAm2901");
// guess which pins are outputs and which are inputs
// TODO this code exists three times... but it seems too "hacky" to put it in a helper class
List<String> inputPinNames = new ArrayList<>();
// guess which pins are outputs and which are inputs
// TODO this code exists three times... but it seems too "hacky" to put it in a helper class
List<String> inputPinNames = new ArrayList<>();