Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2017-08-08 03:56:20 -0400
committerHenrik Rentz-Reichert2017-08-08 03:56:20 -0400
commitbfadd8fc9c19549d45a496bbcfeba1af0c60d8c8 (patch)
tree499e8f92049d0add71547f905a54c1a65ee92a57
parent43150a212b7307880b959c3e72554609f7d37bd1 (diff)
downloadorg.eclipse.etrice-bfadd8fc9c19549d45a496bbcfeba1af0c60d8c8.tar.gz
org.eclipse.etrice-bfadd8fc9c19549d45a496bbcfeba1af0c60d8c8.tar.xz
org.eclipse.etrice-bfadd8fc9c19549d45a496bbcfeba1af0c60d8c8.zip
fix in BasicFsmGenBuilder
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.xtend7
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.java9
-rw-r--r--tests/org.eclipse.etrice.ui.behavior.tests/output/.gitignore1
-rw-r--r--tests/org.eclipse.etrice.ui.behavior.tests/src/org/eclipse/etrice/ui/behavior/commands/TestFSMGenModel.xtend2
-rw-r--r--tests/org.eclipse.etrice.ui.behavior.tests/xtend-gen/org/eclipse/etrice/ui/behavior/commands/TestFSMGenModel.java2
5 files changed, 10 insertions, 11 deletions
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.xtend b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.xtend
index f0623566d..622e427cb 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.xtend
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.xtend
@@ -106,7 +106,7 @@ class BasicFsmGenBuilder {
graph.nodes.addAll(sg.states.filter(typeof(SimpleState)).map[createNode])
graph.links.addAll(sg.transitions.map[createLink])
- // refined states and transitions
+ // refined states and refined transitions
sg.states.filter(typeof(RefinedState)).forEach[handleRefinedState]
sg.refinedTransitions.forEach[handleRefinedTransition]
}
@@ -117,9 +117,8 @@ class BasicFsmGenBuilder {
// handle the sub graphs
if (s.subgraph!==null) {
- if (s.target.subgraph!==null) {
- val targetGraph = s.target.subgraph.createGraph
- targetGraph.mergeGraph(s.subgraph)
+ if (refinedNode.subgraph!==null) {
+ refinedNode.subgraph.mergeGraph(s.subgraph)
}
else {
refinedNode.subgraph = s.subgraph.createGraph
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.java
index df9d3de3f..990c475ae 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.java
@@ -237,15 +237,12 @@ public class BasicFsmGenBuilder {
StateGraph _subgraph = s.getSubgraph();
boolean _tripleNotEquals = (_subgraph != null);
if (_tripleNotEquals) {
- State _target = s.getTarget();
- StateGraph _subgraph_1 = _target.getSubgraph();
+ Graph _subgraph_1 = refinedNode.getSubgraph();
boolean _tripleNotEquals_1 = (_subgraph_1 != null);
if (_tripleNotEquals_1) {
- State _target_1 = s.getTarget();
- StateGraph _subgraph_2 = _target_1.getSubgraph();
- final Graph targetGraph = this.createGraph(_subgraph_2);
+ Graph _subgraph_2 = refinedNode.getSubgraph();
StateGraph _subgraph_3 = s.getSubgraph();
- this.mergeGraph(targetGraph, _subgraph_3);
+ this.mergeGraph(_subgraph_2, _subgraph_3);
} else {
StateGraph _subgraph_4 = s.getSubgraph();
Graph _createGraph = this.createGraph(_subgraph_4);
diff --git a/tests/org.eclipse.etrice.ui.behavior.tests/output/.gitignore b/tests/org.eclipse.etrice.ui.behavior.tests/output/.gitignore
new file mode 100644
index 000000000..ccd488a3d
--- /dev/null
+++ b/tests/org.eclipse.etrice.ui.behavior.tests/output/.gitignore
@@ -0,0 +1 @@
+*.fsmgen
diff --git a/tests/org.eclipse.etrice.ui.behavior.tests/src/org/eclipse/etrice/ui/behavior/commands/TestFSMGenModel.xtend b/tests/org.eclipse.etrice.ui.behavior.tests/src/org/eclipse/etrice/ui/behavior/commands/TestFSMGenModel.xtend
index 14a9d10ee..455c952e4 100644
--- a/tests/org.eclipse.etrice.ui.behavior.tests/src/org/eclipse/etrice/ui/behavior/commands/TestFSMGenModel.xtend
+++ b/tests/org.eclipse.etrice.ui.behavior.tests/src/org/eclipse/etrice/ui/behavior/commands/TestFSMGenModel.xtend
@@ -55,7 +55,7 @@ class TestFSMGenModel extends TestBase {
val logger = new NullLogger
FsmGenChecker.check(gc, logger)
assertFalse("logger has no errors", logger.hasErrors)
-// save(gc, actor.name)
+ save(gc, actor.name)
]
res.resourceSet.createResource(URI.createURI('dummy://' + actorName + '.fsmgen')) => [
diff --git a/tests/org.eclipse.etrice.ui.behavior.tests/xtend-gen/org/eclipse/etrice/ui/behavior/commands/TestFSMGenModel.java b/tests/org.eclipse.etrice.ui.behavior.tests/xtend-gen/org/eclipse/etrice/ui/behavior/commands/TestFSMGenModel.java
index 79dbbaecc..dbcbc798e 100644
--- a/tests/org.eclipse.etrice.ui.behavior.tests/xtend-gen/org/eclipse/etrice/ui/behavior/commands/TestFSMGenModel.java
+++ b/tests/org.eclipse.etrice.ui.behavior.tests/xtend-gen/org/eclipse/etrice/ui/behavior/commands/TestFSMGenModel.java
@@ -91,6 +91,8 @@ public class TestFSMGenModel extends TestBase {
FsmGenChecker.check(gc, logger);
boolean _hasErrors = logger.hasErrors();
Assert.assertFalse("logger has no errors", _hasErrors);
+ String _name = actor.getName();
+ TestFSMGenModel.this.save(gc, _name);
}
};
final GraphContainer gc = ObjectExtensions.<GraphContainer>operator_doubleArrow(_createTransformedModel, _function_1);

Back to the top