projects
/
Mograsim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5d68881
)
Made sanity checks in Delegating(...)HighLevelStateHandler faster
author
Daniel Kirschten
<daniel.kirschten@gmx.de>
Mon, 15 Jul 2019 17:11:38 +0000
(19:11 +0200)
committer
Daniel Kirschten
<daniel.kirschten@gmx.de>
Mon, 15 Jul 2019 17:11:38 +0000
(19:11 +0200)
net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/atomic/DelegatingAtomicHighLevelStateHandler.java
patch
|
blob
|
history
net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java
patch
|
blob
|
history
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/atomic/DelegatingAtomicHighLevelStateHandler.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/atomic/DelegatingAtomicHighLevelStateHandler.java
index
0ed207f
..
bd21132
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/atomic/DelegatingAtomicHighLevelStateHandler.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/atomic/DelegatingAtomicHighLevelStateHandler.java
@@
-39,7
+39,7
@@
public class DelegatingAtomicHighLevelStateHandler implements AtomicHighLevelSta
{
if (delegateTarget == null)
this.delegateTarget = parentComponent;
{
if (delegateTarget == null)
this.delegateTarget = parentComponent;
- else if (
!parentComponent.submodel.getComponentsByName().containsValue(delegateTarget)
)
+ else if (
parentComponent.submodel.getComponentsByName().get(delegateTarget.name) != delegateTarget
)
throw new IllegalArgumentException(
"Can only set components belonging to the submodel of the parent component of this handler as the delegate target");
this.delegateTarget = delegateTarget;
throw new IllegalArgumentException(
"Can only set components belonging to the submodel of the parent component of this handler as the delegate target");
this.delegateTarget = delegateTarget;
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java
index
79ec244
..
bc864d1
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java
@@
-40,7
+40,7
@@
public class DelegatingSubcomponentHighLevelStateHandler implements Subcomponent
{
if (delegateTarget == null)
this.delegateTarget = parentComponent;
{
if (delegateTarget == null)
this.delegateTarget = parentComponent;
- else if (
!parentComponent.submodel.getComponentsByName().containsValue(delegateTarget)
)
+ else if (
parentComponent.submodel.getComponentsByName().get(delegateTarget.name) != delegateTarget
)
throw new IllegalArgumentException(
"Can only set components belonging to the submodel of the parent component of this handler as the delegate target");
this.delegateTarget = delegateTarget;
throw new IllegalArgumentException(
"Can only set components belonging to the submodel of the parent component of this handler as the delegate target");
this.delegateTarget = delegateTarget;