Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2014-08-12 10:12:26 -0400
committerHenrik Rentz-Reichert2014-08-12 10:12:26 -0400
commit1dbf2c78c259a48e67954e347e09cee1b524be38 (patch)
tree60a3c30a6162733dc87dca5fda0f4cb66b6a8e8f /plugins/org.eclipse.etrice.core.genmodel.fsm
parentae6e2575ea293af19f244fe383b2ded28908ef0a (diff)
downloadorg.eclipse.etrice-1dbf2c78c259a48e67954e347e09cee1b524be38.tar.gz
org.eclipse.etrice-1dbf2c78c259a48e67954e347e09cee1b524be38.tar.xz
org.eclipse.etrice-1dbf2c78c259a48e67954e347e09cee1b524be38.zip
[core.genmodel.fsm] bug fix for interfaceItemLocalIds
Diffstat (limited to 'plugins/org.eclipse.etrice.core.genmodel.fsm')
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore4
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ExpandedModelComponent.java4
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ExpandedModelComponentImpl.java10
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java3
4 files changed, 13 insertions, 8 deletions
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore b/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore
index 937e96728..3745ffdb0 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore
@@ -45,7 +45,9 @@
<eParameters name="trans" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//Transition"/>
</eOperations>
<eOperations name="getOwnTransitionChains" upperBound="-1" eType="#//TransitionChain"/>
- <eOperations name="getOwnInterfaceItems" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//AbstractInterfaceItem"/>
+ <eOperations name="getOwnInterfaceItems" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//AbstractInterfaceItem">
+ <eParameters name="mc" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//ModelComponent"/>
+ </eOperations>
<eOperations name="getAllInterfaceItems" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//AbstractInterfaceItem"/>
<eOperations name="isMatching" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eParameters name="trig" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//Trigger"/>
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ExpandedModelComponent.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ExpandedModelComponent.java
index 9c6876fb0..dfad8102c 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ExpandedModelComponent.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ExpandedModelComponent.java
@@ -231,10 +231,10 @@ public interface ExpandedModelComponent extends EObject {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @model kind="operation"
+ * @model
* @generated
*/
- EList<AbstractInterfaceItem> getOwnInterfaceItems();
+ EList<AbstractInterfaceItem> getOwnInterfaceItems(ModelComponent mc);
/**
* <!-- begin-user-doc -->
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ExpandedModelComponentImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ExpandedModelComponentImpl.java
index 77d59a12d..f15225bae 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ExpandedModelComponentImpl.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ExpandedModelComponentImpl.java
@@ -20,6 +20,7 @@ import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map.Entry;
+
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.BasicEList;
@@ -913,11 +914,12 @@ public abstract class ExpandedModelComponentImpl extends MinimalEObjectImpl.Cont
}
private int computeInterfaceItemLocalIds(ModelComponent ac, int offset) {
- if (ac.getBase()!=null)
+ if (ac.getBase()!=null) {
// first recurse into base class
offset = computeInterfaceItemLocalIds(ac.getBase(), offset);
+ }
- EList<AbstractInterfaceItem> items = getAllInterfaceItems();
+ EList<AbstractInterfaceItem> items = getOwnInterfaceItems(ac);
for (AbstractInterfaceItem item : items) {
ifitem2localId.put(item, offset);
++offset;
@@ -1039,7 +1041,7 @@ public abstract class ExpandedModelComponentImpl extends MinimalEObjectImpl.Cont
public EList<MessageFromIf> getOwnTriggers() {
BasicEList<MessageFromIf> result = new BasicEList<MessageFromIf>();
- EList<AbstractInterfaceItem> ownIfItems = getOwnInterfaceItems();
+ EList<AbstractInterfaceItem> ownIfItems = getOwnInterfaceItems(getModelComponent());
for(MessageFromIf mif : triggerstring2mif.values()) {
if (ownIfItems.contains(mif.getFrom()))
@@ -1169,7 +1171,7 @@ public abstract class ExpandedModelComponentImpl extends MinimalEObjectImpl.Cont
* <!-- end-user-doc -->
* @generated NOT
*/
- public EList<AbstractInterfaceItem> getOwnInterfaceItems() {
+ public EList<AbstractInterfaceItem> getOwnInterfaceItems(ModelComponent mc) {
// to be implemented by derived class
throw new UnsupportedOperationException();
}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java
index 2f68107cf..a2f2bb2aa 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java
@@ -439,7 +439,8 @@ public class FsmGenPackageImpl extends EPackageImpl implements FsmGenPackage {
addEOperation(expandedModelComponentEClass, this.getTransitionChain(), "getOwnTransitionChains", 0, -1, IS_UNIQUE, IS_ORDERED);
- addEOperation(expandedModelComponentEClass, theFSMPackage.getAbstractInterfaceItem(), "getOwnInterfaceItems", 0, -1, IS_UNIQUE, IS_ORDERED);
+ op = addEOperation(expandedModelComponentEClass, theFSMPackage.getAbstractInterfaceItem(), "getOwnInterfaceItems", 0, -1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theFSMPackage.getModelComponent(), "mc", 0, 1, IS_UNIQUE, IS_ORDERED);
addEOperation(expandedModelComponentEClass, theFSMPackage.getAbstractInterfaceItem(), "getAllInterfaceItems", 0, -1, IS_UNIQUE, IS_ORDERED);

Back to the top