Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2009-01-13 13:10:20 -0500
committeratikhomirov2009-01-13 13:10:20 -0500
commit1223dcd80be5c1b7364bb60d309e409d8eb011b8 (patch)
tree7bd33ffb21cb36b0214e903760c43103fdefebb0
parent1677877d761940c64098033b1aa8137d5dc73994 (diff)
downloadorg.eclipse.gmf-tooling-1223dcd80be5c1b7364bb60d309e409d8eb011b8.tar.gz
org.eclipse.gmf-tooling-1223dcd80be5c1b7364bb60d309e409d8eb011b8.tar.xz
org.eclipse.gmf-tooling-1223dcd80be5c1b7364bb60d309e409d8eb011b8.zip
[243151] GMFGen model to contain explicit information about allowed link sources/targets - fixed to return EStructuralFeature.Setting to allow ECrossReferencer to work
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenLinkImpl.java22
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenNodeImpl.java6
2 files changed, 19 insertions, 9 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenLinkImpl.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenLinkImpl.java
index 81c896e99..cc2bd7f83 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenLinkImpl.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenLinkImpl.java
@@ -17,9 +17,11 @@ import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.ECollections;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.gmf.codegen.gmfgen.FeatureLinkModelFacet;
import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
@@ -279,7 +281,8 @@ public class GenLinkImpl extends GenCommonBaseImpl implements GenLink {
* @generated NOT
*/
public EList<GenLink> getGenOutgoingLinks() {
- return GenLinkEndOperations.getGenOutgoingLinks(this);
+ EList<GenLink> r = GenLinkEndOperations.getGenOutgoingLinks(this);
+ return new EcoreEList.UnmodifiableEList<GenLink>(this, GMFGenPackage.eINSTANCE.getGenLinkEnd_GenOutgoingLinks(), r.size(), r.toArray());
}
/**
@@ -288,7 +291,8 @@ public class GenLinkImpl extends GenCommonBaseImpl implements GenLink {
* @generated NOT
*/
public EList<GenLink> getGenIncomingLinks() {
- return GenLinkEndOperations.getGenIncomingLinks(this);
+ EList<GenLink> r = GenLinkEndOperations.getGenIncomingLinks(this);
+ return new EcoreEList.UnmodifiableEList<GenLink>(this, GMFGenPackage.eINSTANCE.getGenLinkEnd_GenIncomingLinks(), r.size(), r.toArray());
}
/**
@@ -581,13 +585,15 @@ public class GenLinkImpl extends GenCommonBaseImpl implements GenLink {
* @generated NOT
*/
public EList<GenLinkEnd> getSources() {
+ final EReference feature = GMFGenPackage.eINSTANCE.getGenLink_Sources();
if (getModelFacet() == null){
- return ECollections.emptyEList();
+ return new EcoreEList.UnmodifiableEList<GenLinkEnd>(this, feature, 0, new Object[0]);
}
- return getCompatibleLinkEnds(getModelFacet().getSourceType());
+ EList<GenLinkEnd> r = getCompatibleLinkEnds(getModelFacet().getSourceType());
+ return new EcoreEList.UnmodifiableEList<GenLinkEnd>(this, feature, r.size(), r.toArray());
}
- private EList<GenLinkEnd> getCompatibleLinkEnds(GenClass desiredType){
+ private EList<GenLinkEnd> getCompatibleLinkEnds(GenClass desiredType) {
if (desiredType == null){
return ECollections.emptyEList();
}
@@ -623,10 +629,12 @@ public class GenLinkImpl extends GenCommonBaseImpl implements GenLink {
* @generated NOT
*/
public EList<GenLinkEnd> getTargets() {
+ EReference feature = GMFGenPackage.eINSTANCE.getGenLink_Targets();
if (getModelFacet() == null){
- return ECollections.emptyEList();
+ return new EcoreEList.UnmodifiableEList<GenLinkEnd>(this, feature, 0, new Object[0]);
}
- return getCompatibleLinkEnds(getModelFacet().getTargetType());
+ EList<GenLinkEnd> r = getCompatibleLinkEnds(getModelFacet().getTargetType());
+ return new EcoreEList.UnmodifiableEList<GenLinkEnd>(this, feature, r.size(), r.toArray());
}
/**
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenNodeImpl.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenNodeImpl.java
index d85ef3442..6a167b602 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenNodeImpl.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenNodeImpl.java
@@ -171,7 +171,8 @@ public abstract class GenNodeImpl extends GenChildContainerImpl implements GenNo
* @generated NOT
*/
public EList<GenLink> getGenOutgoingLinks() {
- return GenLinkEndOperations.getGenOutgoingLinks(this);
+ EList<GenLink> r = GenLinkEndOperations.getGenOutgoingLinks(this);
+ return new EcoreEList.UnmodifiableEList<GenLink>(this, GMFGenPackage.eINSTANCE.getGenLinkEnd_GenOutgoingLinks(), r.size(), r.toArray());
}
/**
@@ -180,7 +181,8 @@ public abstract class GenNodeImpl extends GenChildContainerImpl implements GenNo
* @generated NOT
*/
public EList<GenLink> getGenIncomingLinks() {
- return GenLinkEndOperations.getGenIncomingLinks(this);
+ EList<GenLink> r = GenLinkEndOperations.getGenIncomingLinks(this);
+ return new EcoreEList.UnmodifiableEList<GenLink>(this, GMFGenPackage.eINSTANCE.getGenLinkEnd_GenIncomingLinks(), r.size(), r.toArray());
}
/**

Back to the top