Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2006-11-02 14:12:17 +0000
committerashatalin2006-11-02 14:12:17 +0000
commit497a03b31db31436f2121131672c219b4d48ea4c (patch)
treeed935f5fa8778d9dddd417c8721fa55f9a8936b4
parent6af537b48aee08ec2ad476b806b2a0a910abf5d3 (diff)
downloadorg.eclipse.gmf-tooling-497a03b31db31436f2121131672c219b4d48ea4c.tar.gz
org.eclipse.gmf-tooling-497a03b31db31436f2121131672c219b4d48ea4c.tar.xz
org.eclipse.gmf-tooling-497a03b31db31436f2121131672c219b4d48ea4c.zip
Linked elements are leafs by default.
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/models/ecore.gmfgen7
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/navigator/EcoreNavigatorContentProvider.java891
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/navigator/EcoreNavigatorItem.java15
-rw-r--r--plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/internal/bridge/genmodel/navigator/NavigatorHandler.java4
-rw-r--r--plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore1
-rw-r--r--plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel1
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/navigator/NavigatorContentProviderGenerator.java721
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/navigator/NavigatorItemGenerator.java6
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenNavigatorReferenceType.java27
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java1
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/util/GenModelGraphAnalyzer.java3
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorContentProvider.javajet112
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorItem.javajet15
-rw-r--r--tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/GenModelGraphAnalyzerTest.java6
14 files changed, 1209 insertions, 601 deletions
diff --git a/examples/org.eclipse.gmf.ecore.editor/models/ecore.gmfgen b/examples/org.eclipse.gmf.ecore.editor/models/ecore.gmfgen
index 14fda57b8..80e053613 100644
--- a/examples/org.eclipse.gmf.ecore.editor/models/ecore.gmfgen
+++ b/examples/org.eclipse.gmf.ecore.editor/models/ecore.gmfgen
@@ -1067,8 +1067,7 @@
<editor/>
<navigator>
<childReferences
- child="//@diagram"
- referenceType="default"/>
+ child="//@diagram"/>
<childReferences
parent="//@diagram/@topLevelNodes.0"
child="//@diagram/@childNodes.0"/>
@@ -1123,7 +1122,6 @@
<childReferences
parent="//@diagram"
child="//@diagram/@links.0"
- referenceType="default"
groupName="links"
groupIcon="icons/linksNavigatorGroup.gif"/>
<childReferences
@@ -1309,7 +1307,6 @@
<childReferences
parent="//@diagram"
child="//@diagram/@links.1"
- referenceType="default"
groupName="links"
groupIcon="icons/linksNavigatorGroup.gif"/>
<childReferences
@@ -1411,7 +1408,6 @@
<childReferences
parent="//@diagram"
child="//@diagram/@links.2"
- referenceType="default"
groupName="links"
groupIcon="icons/linksNavigatorGroup.gif"/>
<childReferences
@@ -1513,7 +1509,6 @@
<childReferences
parent="//@diagram"
child="//@diagram/@links.3"
- referenceType="default"
groupName="links"
groupIcon="icons/linksNavigatorGroup.gif"/>
<childReferences
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/navigator/EcoreNavigatorContentProvider.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/navigator/EcoreNavigatorContentProvider.java
index 86f088da0..6332c99f7 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/navigator/EcoreNavigatorContentProvider.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/navigator/EcoreNavigatorContentProvider.java
@@ -112,6 +112,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
if (abstractNavigatorItem instanceof EcoreNavigatorItem) {
EcoreNavigatorItem navigatorItem = (EcoreNavigatorItem) abstractNavigatorItem;
+ if (navigatorItem.isLeaf()) {
+ return EMPTY_ARRAY;
+ }
switch (navigatorItem.getVisualID()) {
case EClassEditPart.VISUAL_ID: {
Collection result = new ArrayList();
@@ -288,10 +291,10 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
result.addAll(getEPackage_1000ToEDataType_2004Children(navigatorItem.getView(), navigatorItem));
result.addAll(getEPackage_1000ToEEnum_2005Children(navigatorItem.getView(), navigatorItem));
EcoreNavigatorGroup links = new EcoreNavigatorGroup("links", "icons/linksNavigatorGroup.gif", EPackageEditPart.MODEL_ID, navigatorItem);
- links.addChildren(getViewByType(navigatorItem.getView().getDiagram().getEdges(), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID), links));
- links.addChildren(getViewByType(navigatorItem.getView().getDiagram().getEdges(), EcoreVisualIDRegistry.getType(EReferenceEditPart.VISUAL_ID), links));
- links.addChildren(getViewByType(navigatorItem.getView().getDiagram().getEdges(), EcoreVisualIDRegistry.getType(EReference2EditPart.VISUAL_ID), links));
- links.addChildren(getViewByType(navigatorItem.getView().getDiagram().getEdges(), EcoreVisualIDRegistry.getType(EClassESuperTypesEditPart.VISUAL_ID), links));
+ links.addChildren(getEPackage_1000ToEAnnotationReferences_4001Children(navigatorItem.getView(), links));
+ links.addChildren(getEPackage_1000ToEReference_4002Children(navigatorItem.getView(), links));
+ links.addChildren(getEPackage_1000ToEReference_4003Children(navigatorItem.getView(), links));
+ links.addChildren(getEPackage_1000ToEClassESuperTypes_4004Children(navigatorItem.getView(), links));
if (!links.isEmpty()) {
result.add(links);
}
@@ -403,7 +406,7 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
Resource resource = resourceSet.getResource(fileURI, true);
Collection result = new ArrayList();
- result.addAll(getViewByType(resource.getContents(), EPackageEditPart.MODEL_ID, file));
+ result.addAll(createNavigatorItems(selectViewsByType(resource.getContents(), EPackageEditPart.MODEL_ID), file));
return result.toArray();
}
return EMPTY_ARRAY;
@@ -451,29 +454,18 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getViewByType(Collection childViews, String type, Object parent) {
+ private Collection getEClassESuperTypes_4004ToEClass_3004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- for (Iterator it = childViews.iterator(); it.hasNext();) {
- Object next = it.next();
- if (false == next instanceof View) {
- continue;
- }
- View nextView = (View) next;
- if (type.equals(nextView.getType())) {
- result.add(new EcoreNavigatorItem(nextView, parent));
- }
- }
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
+ createNavigatorItems(connectedViews, parent, result, isEClassESuperTypes_4004ToEClass_3004OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
- private Collection getEClassESuperTypes_4004ToEClass_3004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
- Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
- return result;
+ private boolean isEClassESuperTypes_4004ToEClass_3004OutTargetLeaf(Edge edge) {
+ return true;
}
/**
@@ -482,875 +474,1545 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
private Collection getEEnum_2005ToEReference_4003InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReference2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEEnum_2005ToEReference_4003InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEEnum_2005ToEReference_4003InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_2001ToEOperation_3002Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassOperationsEditPart.VISUAL_ID));
connectedViews = getChildrenByType(connectedViews, EcoreVisualIDRegistry.getType(EOperationEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_2001ToEOperation_3002ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_2001ToEOperation_3002ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotation_3003ToEAnnotationReferences_4001InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotation_3003ToEAnnotationReferences_4001InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotation_3003ToEAnnotationReferences_4001InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_2001ToEAnnotationReferences_4001InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_2001ToEAnnotationReferences_4001InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_2001ToEAnnotationReferences_4001InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEAnnotation_2003InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EAnnotation2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEAnnotation_2003InSourceLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEAnnotation_2003InSourceLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4002ToEClass_2001OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4002ToEClass_2001OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4002ToEClass_2001OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4003ToEEnum_3007OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnumEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4003ToEEnum_3007OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4003ToEEnum_3007OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4002ToEClass_2001InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4002ToEClass_2001InSourceLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4002ToEClass_2001InSourceLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_2001ToEAnnotation_3003Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassClassAnnotationsEditPart.VISUAL_ID));
connectedViews = getChildrenByType(connectedViews, EcoreVisualIDRegistry.getType(EAnnotationEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_2001ToEAnnotation_3003ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_2001ToEAnnotation_3003ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_2001ToEClassESuperTypes_4004OutTarget(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getOutgoingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassESuperTypesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_2001ToEClassESuperTypes_4004OutTargetLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_2001ToEClassESuperTypes_4004OutTargetLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotation_2003ToEStringToStringMapEntry_3008Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationDetailsEditPart.VISUAL_ID));
connectedViews = getChildrenByType(connectedViews, EcoreVisualIDRegistry.getType(EStringToStringMapEntryEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotation_2003ToEStringToStringMapEntry_3008ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotation_2003ToEStringToStringMapEntry_3008ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ private Collection getEPackage_1000ToEClassESuperTypes_4004Children(View view, EcoreAbstractNavigatorItem parent) {
+ Collection result = new ArrayList();
+ Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassESuperTypesEditPart.VISUAL_ID));
+ createNavigatorItems(connectedViews, parent, result, isEPackage_1000ToEClassESuperTypes_4004ChildrenLeaf(view));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isEPackage_1000ToEClassESuperTypes_4004ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_3004ToEReference_4002InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReferenceEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_3004ToEReference_4002InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_3004ToEReference_4002InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEPackage_1000ToEClass_2001Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEPackage_1000ToEClass_2001ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_1000ToEClass_2001ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClassESuperTypes_4004ToEClass_3004InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClassESuperTypes_4004ToEClass_3004InSourceLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEClassESuperTypes_4004ToEClass_3004InSourceLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_2001ToEReference_4003InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReference2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_2001ToEReference_4003InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_2001ToEReference_4003InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEEnum_2005ToEAnnotationReferences_4001InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEEnum_2005ToEAnnotationReferences_4001InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEEnum_2005ToEAnnotationReferences_4001InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_2001ToEAttribute_3001Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassAttributesEditPart.VISUAL_ID));
connectedViews = getChildrenByType(connectedViews, EcoreVisualIDRegistry.getType(EAttributeEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_2001ToEAttribute_3001ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_2001ToEAttribute_3001ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_2001ToEClassESuperTypes_4004InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassESuperTypesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_2001ToEClassESuperTypes_4004InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_2001ToEClassESuperTypes_4004InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4002ToEEnum_3007OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnumEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4002ToEEnum_3007OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4002ToEEnum_3007OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4002ToEClass_3004InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4002ToEClass_3004InSourceLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4002ToEClass_3004InSourceLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEPackage_2002ToEPackage_3005Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EPackagePackagesEditPart.VISUAL_ID));
connectedViews = getChildrenByType(connectedViews, EcoreVisualIDRegistry.getType(EPackage3EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEPackage_2002ToEPackage_3005ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_2002ToEPackage_3005ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEPackage_1000ToEPackage_2002Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EPackage2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEPackage_1000ToEPackage_2002ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_1000ToEPackage_2002ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4002ToEDataType_3006OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EDataTypeEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4002ToEDataType_3006OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4002ToEDataType_3006OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4003ToEClass_3004InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4003ToEClass_3004InSourceLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4003ToEClass_3004InSourceLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEDataType_2004ToEReference_4002InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReferenceEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEDataType_2004ToEReference_4002InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEDataType_2004ToEReference_4002InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEPackage_2002OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EPackage2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEPackage_2002OutTargetLeaf(edge));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isEAnnotationReferences_4001ToEPackage_2002OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ private Collection getEPackage_1000ToEReference_4003Children(View view, EcoreAbstractNavigatorItem parent) {
+ Collection result = new ArrayList();
+ Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReference2EditPart.VISUAL_ID));
+ createNavigatorItems(connectedViews, parent, result, isEPackage_1000ToEReference_4003ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_1000ToEReference_4003ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_3004ToEReference_4003OutTarget(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getOutgoingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReference2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_3004ToEReference_4003OutTargetLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_3004ToEReference_4003OutTargetLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_3004ToEAnnotationReferences_4001InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_3004ToEAnnotationReferences_4001InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_3004ToEAnnotationReferences_4001InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEOperation_3002ToEAnnotationReferences_4001InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEOperation_3002ToEAnnotationReferences_4001InSourceLeaf(view));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isEOperation_3002ToEAnnotationReferences_4001InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ private Collection getEPackage_1000ToEAnnotationReferences_4001Children(View view, EcoreAbstractNavigatorItem parent) {
+ Collection result = new ArrayList();
+ Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
+ createNavigatorItems(connectedViews, parent, result, isEPackage_1000ToEAnnotationReferences_4001ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_1000ToEAnnotationReferences_4001ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEPackage_2002ToEEnum_3007Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EPackageEnumsEditPart.VISUAL_ID));
connectedViews = getChildrenByType(connectedViews, EcoreVisualIDRegistry.getType(EEnumEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEPackage_2002ToEEnum_3007ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_2002ToEEnum_3007ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEDataType_3006ToEReference_4002InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReferenceEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEDataType_3006ToEReference_4002InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEDataType_3006ToEReference_4002InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEPackage_1000ToEEnum_2005Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EEnum2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEPackage_1000ToEEnum_2005ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_1000ToEEnum_2005ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_2001ToEReference_4002InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReferenceEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_2001ToEReference_4002InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_2001ToEReference_4002InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4002ToEEnum_2005OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnum2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4002ToEEnum_2005OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4002ToEEnum_2005OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEEnumLiteral_3009OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnumLiteralEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEEnumLiteral_3009OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEEnumLiteral_3009OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEDataType_2004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EDataType2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEDataType_2004OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEDataType_2004OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4003ToEEnum_2005OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnum2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4003ToEEnum_2005OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4003ToEEnum_2005OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotation_2003ToEAnnotationReferences_4001InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotation_2003ToEAnnotationReferences_4001InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotation_2003ToEAnnotationReferences_4001InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEPackage_2002ToEDataType_3006Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EPackageDataTypesEditPart.VISUAL_ID));
connectedViews = getChildrenByType(connectedViews, EcoreVisualIDRegistry.getType(EDataTypeEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEPackage_2002ToEDataType_3006ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_2002ToEDataType_3006ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4002ToEDataType_2004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EDataType2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4002ToEDataType_2004OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4002ToEDataType_2004OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEPackage_1000ToEDataType_2004Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EDataType2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEPackage_1000ToEDataType_2004ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_1000ToEDataType_2004ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4003ToEClass_2001InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4003ToEClass_2001InSourceLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4003ToEClass_2001InSourceLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEEnum_2005OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnum2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEEnum_2005OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEEnum_2005OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEEnumLiteral_3009ToEAnnotationReferences_4001InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEEnumLiteral_3009ToEAnnotationReferences_4001InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEEnumLiteral_3009ToEAnnotationReferences_4001InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_2001ToEReference_4002OutTarget(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getOutgoingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReferenceEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_2001ToEReference_4002OutTargetLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_2001ToEReference_4002OutTargetLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEAnnotation_3003OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EAnnotationEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEAnnotation_3003OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEAnnotation_3003OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClassESuperTypes_4004ToEClass_2001InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClassESuperTypes_4004ToEClass_2001InSourceLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEClassESuperTypes_4004ToEClass_2001InSourceLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEDataType_2004ToEAnnotationReferences_4001InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEDataType_2004ToEAnnotationReferences_4001InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEDataType_2004ToEAnnotationReferences_4001InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEAnnotation_3003InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EAnnotationEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEAnnotation_3003InSourceLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEAnnotation_3003InSourceLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEAnnotation_2003OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EAnnotation2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEAnnotation_2003OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEAnnotation_2003OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4003ToEDataType_2004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EDataType2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4003ToEDataType_2004OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4003ToEDataType_2004OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEClass_3004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEClass_3004OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEClass_3004OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEDataType_3006ToEReference_4003InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReference2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEDataType_3006ToEReference_4003InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEDataType_3006ToEReference_4003InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEEnum_3007ToEReference_4003InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReference2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEEnum_3007ToEReference_4003InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEEnum_3007ToEReference_4003InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4003ToEClass_2001OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4003ToEClass_2001OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4003ToEClass_2001OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEEnum_2005ToEReference_4002InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReferenceEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEEnum_2005ToEReference_4002InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEEnum_2005ToEReference_4002InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ private Collection getEPackage_1000ToEReference_4002Children(View view, EcoreAbstractNavigatorItem parent) {
+ Collection result = new ArrayList();
+ Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReferenceEditPart.VISUAL_ID));
+ createNavigatorItems(connectedViews, parent, result, isEPackage_1000ToEReference_4002ChildrenLeaf(view));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isEPackage_1000ToEReference_4002ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEPackage_2002ToEAnnotationReferences_4001InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEPackage_2002ToEAnnotationReferences_4001InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_2002ToEAnnotationReferences_4001InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEClass_2001OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEClass_2001OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEClass_2001OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4003ToEClass_3004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4003ToEClass_3004OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4003ToEClass_3004OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEPackage_2002ToEClass_3004Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EPackageClassesEditPart.VISUAL_ID));
connectedViews = getChildrenByType(connectedViews, EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEPackage_2002ToEClass_3004ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_2002ToEClass_3004ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEEnum_3007ToEReference_4002InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReferenceEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEEnum_3007ToEReference_4002InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEEnum_3007ToEReference_4002InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_3004ToEReference_4003InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReference2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_3004ToEReference_4003InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_3004ToEReference_4003InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClassESuperTypes_4004ToEClass_2001OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClassESuperTypes_4004ToEClass_2001OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEClassESuperTypes_4004ToEClass_2001OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4003ToEDataType_3006OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EDataTypeEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4003ToEDataType_3006OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4003ToEDataType_3006OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEOperation_3002OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EOperationEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEOperation_3002OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEOperation_3002OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEPackage_1000ToEAnnotation_2003Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotation2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEPackage_1000ToEAnnotation_2003ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_1000ToEAnnotation_2003ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEDataType_3006OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EDataTypeEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEDataType_3006OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEDataType_3006OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEPackage_2002ToEAnnotation_3003Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EPackagePackageAnnotationsEditPart.VISUAL_ID));
connectedViews = getChildrenByType(connectedViews, EcoreVisualIDRegistry.getType(EAnnotationEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEPackage_2002ToEAnnotation_3003ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_2002ToEAnnotation_3003ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotation_3003ToEAnnotationReferences_4001OutTarget(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getOutgoingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotation_3003ToEAnnotationReferences_4001OutTargetLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotation_3003ToEAnnotationReferences_4001OutTargetLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEEnum_2005ToEEnumLiteral_3009Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EEnumLiteralsEditPart.VISUAL_ID));
connectedViews = getChildrenByType(connectedViews, EcoreVisualIDRegistry.getType(EEnumLiteralEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEEnum_2005ToEEnumLiteral_3009ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEEnum_2005ToEEnumLiteral_3009ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_3004ToEClassESuperTypes_4004OutTarget(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getOutgoingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassESuperTypesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_3004ToEClassESuperTypes_4004OutTargetLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_3004ToEClassESuperTypes_4004OutTargetLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEEnum_3007OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnumEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEEnum_3007OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEEnum_3007OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAttribute_3001ToEAnnotationReferences_4001InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAttribute_3001ToEAnnotationReferences_4001InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEAttribute_3001ToEAnnotationReferences_4001InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEEnum_3007ToEAnnotationReferences_4001InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEEnum_3007ToEAnnotationReferences_4001InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEEnum_3007ToEAnnotationReferences_4001InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEDataType_2004ToEAnnotation_3003Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EDataTypeDataTypeAnnotationsEditPart.VISUAL_ID));
connectedViews = getChildrenByType(connectedViews, EcoreVisualIDRegistry.getType(EAnnotationEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEDataType_2004ToEAnnotation_3003ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEDataType_2004ToEAnnotation_3003ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_3004ToEClassESuperTypes_4004InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassESuperTypesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_3004ToEClassESuperTypes_4004InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_3004ToEClassESuperTypes_4004InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEDataType_3006ToEAnnotationReferences_4001InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEDataType_3006ToEAnnotationReferences_4001InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEDataType_3006ToEAnnotationReferences_4001InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotation_2003ToEAnnotationReferences_4001OutTarget(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getOutgoingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotation_2003ToEAnnotationReferences_4001OutTargetLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotation_2003ToEAnnotationReferences_4001OutTargetLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEDataType_2004ToEReference_4003InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReference2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEDataType_2004ToEReference_4003InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEDataType_2004ToEReference_4003InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_2001ToEReference_4003OutTarget(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getOutgoingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReference2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_2001ToEReference_4003OutTargetLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_2001ToEReference_4003OutTargetLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEPackage_3005OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EPackage3EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEPackage_3005OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEPackage_3005OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEClass_3004ToEReference_4002OutTarget(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getOutgoingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EReferenceEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEClass_3004ToEReference_4002OutTargetLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEClass_3004ToEReference_4002OutTargetLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEAnnotationReferences_4001ToEAttribute_3001OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EAttributeEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEAnnotationReferences_4001ToEAttribute_3001OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEAnnotationReferences_4001ToEAttribute_3001OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEEnum_2005ToEAnnotation_3003Children(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getChildrenByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EEnumEnumAnnotationsEditPart.VISUAL_ID));
connectedViews = getChildrenByType(connectedViews, EcoreVisualIDRegistry.getType(EAnnotationEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEEnum_2005ToEAnnotation_3003ChildrenLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEEnum_2005ToEAnnotation_3003ChildrenLeaf(View view) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEPackage_3005ToEAnnotationReferences_4001InSource(View view, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getIncomingLinksByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationReferencesEditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEPackage_3005ToEAnnotationReferences_4001InSourceLeaf(view));
return result;
}
/**
* @generated
*/
+ private boolean isEPackage_3005ToEAnnotationReferences_4001InSourceLeaf(View view) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getEReference_4002ToEClass_3004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, isEReference_4002ToEClass_3004OutTargetLeaf(edge));
return result;
}
/**
* @generated
*/
+ private boolean isEReference_4002ToEClass_3004OutTargetLeaf(Edge edge) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
private Collection getLinksSourceByType(Collection edges, String type) {
Collection result = new ArrayList();
for (Iterator it = edges.iterator(); it.hasNext();) {
@@ -1431,9 +2093,20 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private void createNavigatorItems(Collection views, EcoreAbstractNavigatorItem parent, Collection result) {
+ private Collection createNavigatorItems(Collection views, Object parent) {
+ Collection result = new ArrayList();
+ for (Iterator it = views.iterator(); it.hasNext();) {
+ result.add(new EcoreNavigatorItem((View) it.next(), parent, false));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private void createNavigatorItems(Collection views, EcoreAbstractNavigatorItem parent, Collection result, boolean isLeafs) {
for (Iterator it = views.iterator(); it.hasNext();) {
- result.add(new EcoreNavigatorItem((View) it.next(), parent));
+ result.add(new EcoreNavigatorItem((View) it.next(), parent, isLeafs));
}
}
diff --git a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/navigator/EcoreNavigatorItem.java b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/navigator/EcoreNavigatorItem.java
index fbf70da9f..16df171a7 100644
--- a/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/navigator/EcoreNavigatorItem.java
+++ b/examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/navigator/EcoreNavigatorItem.java
@@ -29,9 +29,15 @@ public class EcoreNavigatorItem extends EcoreAbstractNavigatorItem {
/**
* @generated
*/
- public EcoreNavigatorItem(View view, Object parent) {
+ private boolean myLeaf = false;
+
+ /**
+ * @generated
+ */
+ public EcoreNavigatorItem(View view, Object parent, boolean isLeaf) {
super(parent);
myView = view;
+ myLeaf = isLeaf;
}
/**
@@ -58,6 +64,13 @@ public class EcoreNavigatorItem extends EcoreAbstractNavigatorItem {
/**
* @generated
*/
+ public boolean isLeaf() {
+ return myLeaf;
+ }
+
+ /**
+ * @generated
+ */
public Object getAdapter(Class adapter) {
if (View.class.isAssignableFrom(adapter) || EObject.class.isAssignableFrom(adapter)) {
return myView;
diff --git a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/internal/bridge/genmodel/navigator/NavigatorHandler.java b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/internal/bridge/genmodel/navigator/NavigatorHandler.java
index 08384d9bc..7bb974211 100644
--- a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/internal/bridge/genmodel/navigator/NavigatorHandler.java
+++ b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/internal/bridge/genmodel/navigator/NavigatorHandler.java
@@ -57,7 +57,7 @@ public class NavigatorHandler {
}
public void process(GenDiagram diagram) {
- createChildReference(diagram, null, GenNavigatorReferenceType.DEFAULT_LITERAL);
+ createChildReference(diagram, null, GenNavigatorReferenceType.CHILDREN_LITERAL);
}
public void process(GenTopLevelNode topLevelNode) {
@@ -76,7 +76,7 @@ public class NavigatorHandler {
}
public void process(GenLink link) {
- GenNavigatorChildReference childReference = createChildReference(link, myDiagram, GenNavigatorReferenceType.DEFAULT_LITERAL);
+ GenNavigatorChildReference childReference = createChildReference(link, myDiagram, GenNavigatorReferenceType.CHILDREN_LITERAL);
childReference.setGroupName("links");
childReference.setGroupIcon("icons/linksNavigatorGroup.gif");
diff --git a/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore b/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore
index 2dfa95446..d850cfd5b 100644
--- a/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore
+++ b/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore
@@ -1539,7 +1539,6 @@
<eLiterals name="children"/>
<eLiterals name="out_taget" value="1"/>
<eLiterals name="in_source" value="2"/>
- <eLiterals name="default" value="3"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GenNavigatorChildReference">
<eOperations name="isInsideGroup" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
diff --git a/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel b/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel
index 2520b73eb..10de53c77 100644
--- a/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel
+++ b/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel
@@ -43,7 +43,6 @@
<genEnumLiterals ecoreEnumLiteral="gmfgen.ecore#//GenNavigatorReferenceType/children"/>
<genEnumLiterals ecoreEnumLiteral="gmfgen.ecore#//GenNavigatorReferenceType/out_taget"/>
<genEnumLiterals ecoreEnumLiteral="gmfgen.ecore#//GenNavigatorReferenceType/in_source"/>
- <genEnumLiterals ecoreEnumLiteral="gmfgen.ecore#//GenNavigatorReferenceType/default"/>
</genEnums>
<genEnums ecoreEnum="gmfgen.ecore#//GeneratedType">
<genEnumLiterals ecoreEnumLiteral="gmfgen.ecore#//GeneratedType/abstractNavigatorItem"/>
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/navigator/NavigatorContentProviderGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/navigator/NavigatorContentProviderGenerator.java
index 85cefa97d..8a11efea3 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/navigator/NavigatorContentProviderGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/navigator/NavigatorContentProviderGenerator.java
@@ -32,7 +32,7 @@ public class NavigatorContentProviderGenerator
protected final String TEXT_12 = ".MODEL_ID.equals(abstractNavigatorItem.getModelID())) {" + NL + "\t\t\t\treturn EMPTY_ARRAY;" + NL + "\t\t\t}" + NL + "\t\t\t" + NL + "\t\t\tif (abstractNavigatorItem instanceof ";
protected final String TEXT_13 = ") {" + NL + " \t\t\t";
protected final String TEXT_14 = " navigatorItem = (";
- protected final String TEXT_15 = ") abstractNavigatorItem;" + NL + "\t\t\t\tswitch (navigatorItem.getVisualID()) {";
+ protected final String TEXT_15 = ") abstractNavigatorItem;" + NL + " \t\t\tif (navigatorItem.isLeaf()) {" + NL + " \t\t\t\treturn EMPTY_ARRAY;" + NL + " \t\t\t}" + NL + "\t\t\t\tswitch (navigatorItem.getVisualID()) {";
protected final String TEXT_16 = NL + "\t\t\t\tcase ";
protected final String TEXT_17 = ".VISUAL_ID: {" + NL + "\t\t\t\t\t";
protected final String TEXT_18 = " result = new ";
@@ -47,164 +47,154 @@ public class NavigatorContentProviderGenerator
protected final String TEXT_27 = NL + "\t\t\t\t\t";
protected final String TEXT_28 = ".addChildren(";
protected final String TEXT_29 = NL + "\t\t\t\t\tresult.addAll(";
- protected final String TEXT_30 = "getViewByType(navigatorItem.getView().eResource().getContents(), ";
- protected final String TEXT_31 = ".MODEL_ID, ";
- protected final String TEXT_32 = ")";
- protected final String TEXT_33 = "getViewByType(navigatorItem.getView().getDiagram().getChildren(), ";
- protected final String TEXT_34 = ".getType(";
- protected final String TEXT_35 = ".VISUAL_ID), ";
- protected final String TEXT_36 = ")";
- protected final String TEXT_37 = "getViewByType(navigatorItem.getView().getDiagram().getEdges(), ";
- protected final String TEXT_38 = ".getType(";
- protected final String TEXT_39 = ".VISUAL_ID), ";
- protected final String TEXT_40 = ")";
- protected final String TEXT_41 = ".EMPTY_LIST";
- protected final String TEXT_42 = "(";
- protected final String TEXT_43 = "(";
- protected final String TEXT_44 = ") ";
- protected final String TEXT_45 = "navigatorItem.getView(), ";
- protected final String TEXT_46 = ")";
- protected final String TEXT_47 = ".EMPTY_LIST";
- protected final String TEXT_48 = ");";
- protected final String TEXT_49 = NL + "\t\t\t\tif (!";
- protected final String TEXT_50 = ".isEmpty()) {";
- protected final String TEXT_51 = NL + "\t\t\t\tresult.add(";
- protected final String TEXT_52 = ");";
- protected final String TEXT_53 = NL + "\t\t\t\t}";
- protected final String TEXT_54 = NL + "\t\t\t\treturn result.toArray();" + NL + "\t\t\t\t}";
- protected final String TEXT_55 = NL + "\t\t\t\t}" + NL + "\t\t\t} else if (abstractNavigatorItem instanceof ";
- protected final String TEXT_56 = ") {" + NL + "\t\t\t\t";
- protected final String TEXT_57 = " group = (";
- protected final String TEXT_58 = ") parentElement;" + NL + "\t\t\t\treturn group.getChildren();" + NL + "\t\t\t}" + NL + " \t} else if (parentElement instanceof ";
- protected final String TEXT_59 = ") {" + NL + "\t \t";
- protected final String TEXT_60 = " file = (";
- protected final String TEXT_61 = ") parentElement;" + NL + "\t\t\t";
- protected final String TEXT_62 = " editingDomain = (";
- protected final String TEXT_63 = ") ";
- protected final String TEXT_64 = ".INSTANCE.createEditingDomain();" + NL + "\t\t\teditingDomain.setResourceToReadOnlyMap(new ";
- protected final String TEXT_65 = "() {" + NL + "\t\t\t\tpublic Object get(Object key) {" + NL + "\t\t\t\t\tif (!containsKey(key)) {" + NL + "\t\t\t\t\t\tput(key, Boolean.TRUE);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn super.get(key);" + NL + "\t\t\t\t}" + NL + "\t\t\t});" + NL + "\t\t\t";
- protected final String TEXT_66 = " resourceSet = editingDomain.getResourceSet();" + NL + "\t\t\t" + NL + "\t\t\t";
- protected final String TEXT_67 = " fileURI = ";
- protected final String TEXT_68 = ".createPlatformResourceURI(file.getFullPath().toString(), true);" + NL + "\t\t\t";
- protected final String TEXT_69 = " resource = resourceSet.getResource(fileURI, true);" + NL + "\t\t\t" + NL + "\t\t\t";
- protected final String TEXT_70 = " result = new ";
- protected final String TEXT_71 = "();";
- protected final String TEXT_72 = NL + "\t\t\t";
- protected final String TEXT_73 = " ";
- protected final String TEXT_74 = " = new ";
- protected final String TEXT_75 = "(\"";
- protected final String TEXT_76 = "\", \"";
- protected final String TEXT_77 = "\", ";
- protected final String TEXT_78 = ".MODEL_ID, file);";
- protected final String TEXT_79 = NL + "\t\t\t";
- protected final String TEXT_80 = ".addChildren(";
- protected final String TEXT_81 = NL + "\t\t\tresult.addAll(";
- protected final String TEXT_82 = "getViewByType(resource.getContents(), ";
- protected final String TEXT_83 = ".MODEL_ID, ";
- protected final String TEXT_84 = ")";
- protected final String TEXT_85 = ".EMPTY_LIST";
- protected final String TEXT_86 = ".EMPTY_LIST";
- protected final String TEXT_87 = ");";
- protected final String TEXT_88 = NL + "\t\t\tif (!";
- protected final String TEXT_89 = ".isEmpty()) {";
- protected final String TEXT_90 = NL + "\t\t\tresult.add(";
- protected final String TEXT_91 = ");";
- protected final String TEXT_92 = NL + "\t\t\t}";
- protected final String TEXT_93 = NL + "\t\t\treturn result.toArray();" + NL + "\t\t}" + NL + "\t\treturn EMPTY_ARRAY;" + NL + " }" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + " public Object getParent(Object element) {" + NL + " \tif (element instanceof ";
- protected final String TEXT_94 = ") {" + NL + " \t\t";
- protected final String TEXT_95 = " abstractNavigatorItem = (";
- protected final String TEXT_96 = ") element;" + NL + "\t\t\tif (!";
- protected final String TEXT_97 = ".MODEL_ID.equals(abstractNavigatorItem.getModelID())) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\treturn abstractNavigatorItem.getParent();" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + " }" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + " public boolean hasChildren(Object element) {" + NL + " \treturn element instanceof ";
- protected final String TEXT_98 = " || getChildren(element).length > 0;" + NL + " }" + NL + " " + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void init(";
- protected final String TEXT_99 = " aConfig) {" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void restoreState(";
- protected final String TEXT_100 = " aMemento) {" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void saveState(";
- protected final String TEXT_101 = " aMemento) {" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
- protected final String TEXT_102 = " getViewByType(";
- protected final String TEXT_103 = " childViews, String type, Object parent) {" + NL + "\t\t";
- protected final String TEXT_104 = " result = new ";
- protected final String TEXT_105 = "();" + NL + "\t\tfor (";
- protected final String TEXT_106 = " it = childViews.iterator(); it.hasNext();) {" + NL + "\t\t\tObject next = it.next();" + NL + "\t\t\tif (false == next instanceof ";
- protected final String TEXT_107 = ") {" + NL + "\t\t\t\tcontinue;" + NL + "\t\t\t}" + NL + "\t\t\t";
- protected final String TEXT_108 = " nextView = (";
- protected final String TEXT_109 = ") next;" + NL + "\t\t\tif (type.equals(nextView.getType())) {" + NL + "\t\t\t\tresult.add(new ";
- protected final String TEXT_110 = "(nextView, parent));" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn result;" + NL + "\t}" + NL + "\t";
- protected final String TEXT_111 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
- protected final String TEXT_112 = " ";
- protected final String TEXT_113 = "(";
- protected final String TEXT_114 = " ";
- protected final String TEXT_115 = ", ";
- protected final String TEXT_116 = " parent) {" + NL + "\t\t";
- protected final String TEXT_117 = " result = new ";
- protected final String TEXT_118 = "();";
- protected final String TEXT_119 = NL + "\t\t";
- protected final String TEXT_120 = " connectedViews = ";
- protected final String TEXT_121 = NL + "\t\tconnectedViews = ";
- protected final String TEXT_122 = "getLinksTargetByType";
- protected final String TEXT_123 = "getLinksSourceByType";
- protected final String TEXT_124 = "getOutgoingLinksByType";
- protected final String TEXT_125 = "getIncomingLinksByType";
- protected final String TEXT_126 = "getChildrenByType";
- protected final String TEXT_127 = "(";
- protected final String TEXT_128 = ".singleton(";
- protected final String TEXT_129 = ")";
- protected final String TEXT_130 = "connectedViews";
- protected final String TEXT_131 = ", ";
- protected final String TEXT_132 = ".getType(";
- protected final String TEXT_133 = ".VISUAL_ID));";
- protected final String TEXT_134 = NL + "\t\tcreateNavigatorItems(connectedViews, parent, result);";
- protected final String TEXT_135 = NL + "\t\treturn result;" + NL + "\t}";
- protected final String TEXT_136 = NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t private ";
- protected final String TEXT_137 = " getLinksSourceByType(";
- protected final String TEXT_138 = " edges, String type) {" + NL + "\t\t";
- protected final String TEXT_139 = " result = new ";
- protected final String TEXT_140 = "();" + NL + "\t \tfor (";
- protected final String TEXT_141 = " it = edges.iterator(); it.hasNext();) {" + NL + "\t \t\t";
- protected final String TEXT_142 = " nextEdge = (";
- protected final String TEXT_143 = ") it.next();" + NL + "\t \t\t";
- protected final String TEXT_144 = " nextEdgeSource = nextEdge.getSource();" + NL + "\t \t\tif (type.equals(nextEdgeSource.getType())) {" + NL + "\t \t\t\tresult.add(nextEdgeSource);" + NL + "\t \t\t}" + NL + "\t \t}" + NL + "\t \treturn result;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t private ";
- protected final String TEXT_145 = " getLinksTargetByType(";
- protected final String TEXT_146 = " edges, String type) {" + NL + "\t\t";
- protected final String TEXT_147 = " result = new ";
- protected final String TEXT_148 = "();" + NL + "\t \tfor (";
- protected final String TEXT_149 = " it = edges.iterator(); it.hasNext();) {" + NL + "\t \t\t";
- protected final String TEXT_150 = " nextEdge = (";
- protected final String TEXT_151 = ") it.next();" + NL + "\t \t\t";
- protected final String TEXT_152 = " nextEdgeSource = nextEdge.getTarget();" + NL + "\t \t\tif (type.equals(nextEdgeSource.getType())) {" + NL + "\t \t\t\tresult.add(nextEdgeSource);" + NL + "\t \t\t}" + NL + "\t \t}" + NL + "\t \treturn result;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t private ";
- protected final String TEXT_153 = " getOutgoingLinksByType(";
- protected final String TEXT_154 = " nodes, String type) {" + NL + "\t\t";
- protected final String TEXT_155 = " result = new ";
- protected final String TEXT_156 = "();" + NL + "\t \tfor (";
- protected final String TEXT_157 = " it = nodes.iterator(); it.hasNext();) {" + NL + "\t \t\t";
- protected final String TEXT_158 = " nextNode = (";
- protected final String TEXT_159 = ") it.next();" + NL + "\t\t\tresult.addAll(selectViewsByType(nextNode.getSourceEdges(), type));" + NL + "\t \t}" + NL + "\t \treturn result;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t private ";
- protected final String TEXT_160 = " getIncomingLinksByType(";
- protected final String TEXT_161 = " nodes, String type) {" + NL + "\t\t";
- protected final String TEXT_162 = " result = new ";
- protected final String TEXT_163 = "();" + NL + "\t \tfor (";
- protected final String TEXT_164 = " it = nodes.iterator(); it.hasNext();) {" + NL + "\t \t\t";
- protected final String TEXT_165 = " nextNode = (";
- protected final String TEXT_166 = ") it.next();" + NL + "\t\t\tresult.addAll(selectViewsByType(nextNode.getTargetEdges(), type));" + NL + "\t \t}" + NL + "\t \treturn result;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t private ";
- protected final String TEXT_167 = " getChildrenByType(";
- protected final String TEXT_168 = " nodes, String type) {" + NL + "\t\t";
- protected final String TEXT_169 = " result = new ";
- protected final String TEXT_170 = "();" + NL + "\t \tfor (";
- protected final String TEXT_171 = " it = nodes.iterator(); it.hasNext();) {" + NL + "\t \t\t";
- protected final String TEXT_172 = " nextNode = (";
- protected final String TEXT_173 = ") it.next();" + NL + "\t\t\tresult.addAll(selectViewsByType(nextNode.getChildren(), type));" + NL + "\t \t}" + NL + "\t \treturn result;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
- protected final String TEXT_174 = " selectViewsByType(";
- protected final String TEXT_175 = " views, String type) {" + NL + "\t\t";
- protected final String TEXT_176 = " result = new ";
- protected final String TEXT_177 = "();" + NL + "\t\tfor (";
- protected final String TEXT_178 = " it = views.iterator(); it.hasNext();) {" + NL + "\t\t\t";
- protected final String TEXT_179 = " nextView = (";
- protected final String TEXT_180 = ") it.next();" + NL + "\t\t\tif (type.equals(nextView.getType())) {" + NL + "\t\t\t\tresult.add(nextView);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn result;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createNavigatorItems(";
- protected final String TEXT_181 = " views, ";
- protected final String TEXT_182 = " parent, ";
- protected final String TEXT_183 = " result) {" + NL + "\t\tfor (";
- protected final String TEXT_184 = " it = views.iterator(); it.hasNext();) {" + NL + "\t\t\tresult.add(new ";
- protected final String TEXT_185 = "((";
- protected final String TEXT_186 = ") it.next(), parent));" + NL + "\t\t}" + NL + "\t}" + NL + "\t" + NL + "}";
- protected final String TEXT_187 = NL;
+ protected final String TEXT_30 = "(";
+ protected final String TEXT_31 = "(";
+ protected final String TEXT_32 = ") ";
+ protected final String TEXT_33 = "navigatorItem.getView(), ";
+ protected final String TEXT_34 = "));";
+ protected final String TEXT_35 = NL + "\t\t\t\tif (!";
+ protected final String TEXT_36 = ".isEmpty()) {";
+ protected final String TEXT_37 = NL + "\t\t\t\tresult.add(";
+ protected final String TEXT_38 = ");";
+ protected final String TEXT_39 = NL + "\t\t\t\t}";
+ protected final String TEXT_40 = NL + "\t\t\t\treturn result.toArray();" + NL + "\t\t\t\t}";
+ protected final String TEXT_41 = NL + "\t\t\t\t}" + NL + "\t\t\t} else if (abstractNavigatorItem instanceof ";
+ protected final String TEXT_42 = ") {" + NL + "\t\t\t\t";
+ protected final String TEXT_43 = " group = (";
+ protected final String TEXT_44 = ") parentElement;" + NL + "\t\t\t\treturn group.getChildren();" + NL + "\t\t\t}" + NL + " \t} else if (parentElement instanceof ";
+ protected final String TEXT_45 = ") {" + NL + "\t \t";
+ protected final String TEXT_46 = " file = (";
+ protected final String TEXT_47 = ") parentElement;" + NL + "\t\t\t";
+ protected final String TEXT_48 = " editingDomain = (";
+ protected final String TEXT_49 = ") ";
+ protected final String TEXT_50 = ".INSTANCE.createEditingDomain();" + NL + "\t\t\teditingDomain.setResourceToReadOnlyMap(new ";
+ protected final String TEXT_51 = "() {" + NL + "\t\t\t\tpublic Object get(Object key) {" + NL + "\t\t\t\t\tif (!containsKey(key)) {" + NL + "\t\t\t\t\t\tput(key, Boolean.TRUE);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn super.get(key);" + NL + "\t\t\t\t}" + NL + "\t\t\t});" + NL + "\t\t\t";
+ protected final String TEXT_52 = " resourceSet = editingDomain.getResourceSet();" + NL + "\t\t\t" + NL + "\t\t\t";
+ protected final String TEXT_53 = " fileURI = ";
+ protected final String TEXT_54 = ".createPlatformResourceURI(file.getFullPath().toString(), true);" + NL + "\t\t\t";
+ protected final String TEXT_55 = " resource = resourceSet.getResource(fileURI, true);" + NL + "\t\t\t" + NL + "\t\t\t";
+ protected final String TEXT_56 = " result = new ";
+ protected final String TEXT_57 = "();";
+ protected final String TEXT_58 = NL + "\t\t\t";
+ protected final String TEXT_59 = " ";
+ protected final String TEXT_60 = " = new ";
+ protected final String TEXT_61 = "(\"";
+ protected final String TEXT_62 = "\", \"";
+ protected final String TEXT_63 = "\", ";
+ protected final String TEXT_64 = ".MODEL_ID, file);";
+ protected final String TEXT_65 = NL + "\t\t\t";
+ protected final String TEXT_66 = ".addChildren(";
+ protected final String TEXT_67 = NL + "\t\t\tresult.addAll(";
+ protected final String TEXT_68 = "createNavigatorItems(selectViewsByType(resource.getContents(), ";
+ protected final String TEXT_69 = ".MODEL_ID";
+ protected final String TEXT_70 = ".getType(";
+ protected final String TEXT_71 = ".VISUAL_ID)";
+ protected final String TEXT_72 = "), ";
+ protected final String TEXT_73 = "));";
+ protected final String TEXT_74 = NL + "\t\t\tif (!";
+ protected final String TEXT_75 = ".isEmpty()) {";
+ protected final String TEXT_76 = NL + "\t\t\tresult.add(";
+ protected final String TEXT_77 = ");";
+ protected final String TEXT_78 = NL + "\t\t\t}";
+ protected final String TEXT_79 = NL + "\t\t\treturn result.toArray();" + NL + "\t\t}" + NL + "\t\treturn EMPTY_ARRAY;" + NL + " }" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + " public Object getParent(Object element) {" + NL + " \tif (element instanceof ";
+ protected final String TEXT_80 = ") {" + NL + " \t\t";
+ protected final String TEXT_81 = " abstractNavigatorItem = (";
+ protected final String TEXT_82 = ") element;" + NL + "\t\t\tif (!";
+ protected final String TEXT_83 = ".MODEL_ID.equals(abstractNavigatorItem.getModelID())) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\treturn abstractNavigatorItem.getParent();" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + " }" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + " public boolean hasChildren(Object element) {" + NL + " \treturn element instanceof ";
+ protected final String TEXT_84 = " || getChildren(element).length > 0;" + NL + " }" + NL + " " + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void init(";
+ protected final String TEXT_85 = " aConfig) {" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void restoreState(";
+ protected final String TEXT_86 = " aMemento) {" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void saveState(";
+ protected final String TEXT_87 = " aMemento) {" + NL + "\t}" + NL;
+ protected final String TEXT_88 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
+ protected final String TEXT_89 = " ";
+ protected final String TEXT_90 = "(";
+ protected final String TEXT_91 = " ";
+ protected final String TEXT_92 = ", ";
+ protected final String TEXT_93 = " parent) {" + NL + "\t\t";
+ protected final String TEXT_94 = " result = new ";
+ protected final String TEXT_95 = "();";
+ protected final String TEXT_96 = NL + "\t\t";
+ protected final String TEXT_97 = " connectedViews = ";
+ protected final String TEXT_98 = NL + "\t\tconnectedViews = ";
+ protected final String TEXT_99 = "getLinksTargetByType";
+ protected final String TEXT_100 = "getLinksSourceByType";
+ protected final String TEXT_101 = "getOutgoingLinksByType";
+ protected final String TEXT_102 = "getIncomingLinksByType";
+ protected final String TEXT_103 = "getChildrenByType";
+ protected final String TEXT_104 = "(";
+ protected final String TEXT_105 = ".singleton(";
+ protected final String TEXT_106 = ")";
+ protected final String TEXT_107 = "connectedViews";
+ protected final String TEXT_108 = ", ";
+ protected final String TEXT_109 = ".getType(";
+ protected final String TEXT_110 = ".VISUAL_ID));";
+ protected final String TEXT_111 = NL + "\t\tcreateNavigatorItems(connectedViews, parent, result, ";
+ protected final String TEXT_112 = "(";
+ protected final String TEXT_113 = "));";
+ protected final String TEXT_114 = NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate boolean ";
+ protected final String TEXT_115 = "(";
+ protected final String TEXT_116 = " ";
+ protected final String TEXT_117 = ") {" + NL + "\t\treturn ";
+ protected final String TEXT_118 = ";" + NL + "\t}";
+ protected final String TEXT_119 = NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t private ";
+ protected final String TEXT_120 = " getLinksSourceByType(";
+ protected final String TEXT_121 = " edges, String type) {" + NL + "\t\t";
+ protected final String TEXT_122 = " result = new ";
+ protected final String TEXT_123 = "();" + NL + "\t \tfor (";
+ protected final String TEXT_124 = " it = edges.iterator(); it.hasNext();) {" + NL + "\t \t\t";
+ protected final String TEXT_125 = " nextEdge = (";
+ protected final String TEXT_126 = ") it.next();" + NL + "\t \t\t";
+ protected final String TEXT_127 = " nextEdgeSource = nextEdge.getSource();" + NL + "\t \t\tif (type.equals(nextEdgeSource.getType())) {" + NL + "\t \t\t\tresult.add(nextEdgeSource);" + NL + "\t \t\t}" + NL + "\t \t}" + NL + "\t \treturn result;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t private ";
+ protected final String TEXT_128 = " getLinksTargetByType(";
+ protected final String TEXT_129 = " edges, String type) {" + NL + "\t\t";
+ protected final String TEXT_130 = " result = new ";
+ protected final String TEXT_131 = "();" + NL + "\t \tfor (";
+ protected final String TEXT_132 = " it = edges.iterator(); it.hasNext();) {" + NL + "\t \t\t";
+ protected final String TEXT_133 = " nextEdge = (";
+ protected final String TEXT_134 = ") it.next();" + NL + "\t \t\t";
+ protected final String TEXT_135 = " nextEdgeSource = nextEdge.getTarget();" + NL + "\t \t\tif (type.equals(nextEdgeSource.getType())) {" + NL + "\t \t\t\tresult.add(nextEdgeSource);" + NL + "\t \t\t}" + NL + "\t \t}" + NL + "\t \treturn result;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t private ";
+ protected final String TEXT_136 = " getOutgoingLinksByType(";
+ protected final String TEXT_137 = " nodes, String type) {" + NL + "\t\t";
+ protected final String TEXT_138 = " result = new ";
+ protected final String TEXT_139 = "();" + NL + "\t \tfor (";
+ protected final String TEXT_140 = " it = nodes.iterator(); it.hasNext();) {" + NL + "\t \t\t";
+ protected final String TEXT_141 = " nextNode = (";
+ protected final String TEXT_142 = ") it.next();" + NL + "\t\t\tresult.addAll(selectViewsByType(nextNode.getSourceEdges(), type));" + NL + "\t \t}" + NL + "\t \treturn result;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t private ";
+ protected final String TEXT_143 = " getIncomingLinksByType(";
+ protected final String TEXT_144 = " nodes, String type) {" + NL + "\t\t";
+ protected final String TEXT_145 = " result = new ";
+ protected final String TEXT_146 = "();" + NL + "\t \tfor (";
+ protected final String TEXT_147 = " it = nodes.iterator(); it.hasNext();) {" + NL + "\t \t\t";
+ protected final String TEXT_148 = " nextNode = (";
+ protected final String TEXT_149 = ") it.next();" + NL + "\t\t\tresult.addAll(selectViewsByType(nextNode.getTargetEdges(), type));" + NL + "\t \t}" + NL + "\t \treturn result;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t private ";
+ protected final String TEXT_150 = " getChildrenByType(";
+ protected final String TEXT_151 = " nodes, String type) {" + NL + "\t\t";
+ protected final String TEXT_152 = " result = new ";
+ protected final String TEXT_153 = "();" + NL + "\t \tfor (";
+ protected final String TEXT_154 = " it = nodes.iterator(); it.hasNext();) {" + NL + "\t \t\t";
+ protected final String TEXT_155 = " nextNode = (";
+ protected final String TEXT_156 = ") it.next();" + NL + "\t\t\tresult.addAll(selectViewsByType(nextNode.getChildren(), type));" + NL + "\t \t}" + NL + "\t \treturn result;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
+ protected final String TEXT_157 = " selectViewsByType(";
+ protected final String TEXT_158 = " views, String type) {" + NL + "\t\t";
+ protected final String TEXT_159 = " result = new ";
+ protected final String TEXT_160 = "();" + NL + "\t\tfor (";
+ protected final String TEXT_161 = " it = views.iterator(); it.hasNext();) {" + NL + "\t\t\t";
+ protected final String TEXT_162 = " nextView = (";
+ protected final String TEXT_163 = ") it.next();" + NL + "\t\t\tif (type.equals(nextView.getType())) {" + NL + "\t\t\t\tresult.add(nextView);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
+ protected final String TEXT_164 = " createNavigatorItems(";
+ protected final String TEXT_165 = " views, Object parent) {" + NL + "\t\t";
+ protected final String TEXT_166 = " result = new ";
+ protected final String TEXT_167 = "();" + NL + "\t\tfor (";
+ protected final String TEXT_168 = " it = views.iterator(); it.hasNext();) {" + NL + "\t\t\tresult.add(new ";
+ protected final String TEXT_169 = "((";
+ protected final String TEXT_170 = ") it.next(), parent, false));" + NL + "\t\t}" + NL + "\t\treturn result;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createNavigatorItems(";
+ protected final String TEXT_171 = " views, ";
+ protected final String TEXT_172 = " parent, ";
+ protected final String TEXT_173 = " result, boolean isLeafs) {" + NL + "\t\tfor (";
+ protected final String TEXT_174 = " it = views.iterator(); it.hasNext();) {" + NL + "\t\t\tresult.add(new ";
+ protected final String TEXT_175 = "((";
+ protected final String TEXT_176 = ") it.next(), parent, isLeafs));" + NL + "\t\t}" + NL + "\t}" + NL + "\t" + NL + "}";
+ protected final String TEXT_177 = NL;
public String generate(Object argument)
{
@@ -295,240 +285,175 @@ for (Iterator containers = commonBaseElements.iterator(); containers.hasNext();)
}
- if (nextReference.getReferenceType() == GenNavigatorReferenceType.DEFAULT_LITERAL) {
- if (nextReference.getChild() instanceof GenDiagram) {
-
- stringBuffer.append(TEXT_30);
- stringBuffer.append(importManager.getImportedName(nextReference.getChild().getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_31);
- stringBuffer.append(parentVariable);
- stringBuffer.append(TEXT_32);
-
- } else if (nextReference.getChild() instanceof GenTopLevelNode) {
-
- stringBuffer.append(TEXT_33);
- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
- stringBuffer.append(TEXT_34);
- stringBuffer.append(importManager.getImportedName(nextReference.getChild().getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_35);
- stringBuffer.append(parentVariable);
- stringBuffer.append(TEXT_36);
-
- } else if (nextReference.getChild() instanceof GenLink) {
-
- stringBuffer.append(TEXT_37);
- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
- stringBuffer.append(TEXT_38);
- stringBuffer.append(importManager.getImportedName(nextReference.getChild().getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_39);
- stringBuffer.append(parentVariable);
- stringBuffer.append(TEXT_40);
-
- } else {
- /* Any other "Default" child refrences are not supported */
-
- stringBuffer.append(importManager.getImportedName("java.util.Collections"));
- stringBuffer.append(TEXT_41);
-
- }
- } else if (nextReference.getReferenceType() == GenNavigatorReferenceType.CHILDREN_LITERAL || nextReference.getReferenceType() == GenNavigatorReferenceType.OUT_TAGET_LITERAL || nextReference.getReferenceType() == GenNavigatorReferenceType.IN_SOURCE_LITERAL) {
- String getterNameBase = "get" + nextCommonBase.getUniqueIdentifier() + "To" + nextReference.getChild().getUniqueIdentifier();
- if (nextReference.getReferenceType() == GenNavigatorReferenceType.OUT_TAGET_LITERAL) {
- getterNameBase = getterNameBase + "OutTarget";
- } else if (nextReference.getReferenceType() == GenNavigatorReferenceType.IN_SOURCE_LITERAL) {
- getterNameBase = getterNameBase + "InSource";
- } else { /*nextReference.getReferenceType() == GenNavigatorReferenceType.CHILDREN_LITERAL*/
- getterNameBase = getterNameBase + "Children";
- }
- String getterName = getterNameBase;
- for (int i = 1; getter2ReferenceMap.containsKey(getterName); i++) {
- getterName = getterNameBase + "_" + i;
- }
- getter2ReferenceMap.put(getterName, nextReference);
-
+ String getterNameBase = nextCommonBase.getUniqueIdentifier() + "To" + nextReference.getChild().getUniqueIdentifier();
+ if (nextReference.getReferenceType() == GenNavigatorReferenceType.OUT_TAGET_LITERAL) {
+ getterNameBase = getterNameBase + "OutTarget";
+ } else if (nextReference.getReferenceType() == GenNavigatorReferenceType.IN_SOURCE_LITERAL) {
+ getterNameBase = getterNameBase + "InSource";
+ } else { /*nextReference.getReferenceType() == GenNavigatorReferenceType.CHILDREN_LITERAL*/
+ getterNameBase = getterNameBase + "Children";
+ }
+ String getterName = getterNameBase;
+ for (int i = 1; getter2ReferenceMap.containsKey(getterName); i++) {
+ getterName = getterNameBase + "_" + i;
+ }
+ getter2ReferenceMap.put(getterName, nextReference);
+ getterName = "get" + getterName;
+
stringBuffer.append(getterName);
- stringBuffer.append(TEXT_42);
+ stringBuffer.append(TEXT_30);
if (nextCommonBase instanceof GenLink) {
- stringBuffer.append(TEXT_43);
+ stringBuffer.append(TEXT_31);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
- stringBuffer.append(TEXT_44);
+ stringBuffer.append(TEXT_32);
}
- stringBuffer.append(TEXT_45);
+ stringBuffer.append(TEXT_33);
stringBuffer.append(parentVariable);
- stringBuffer.append(TEXT_46);
-
- } else {
- /* Put processing of other types of the references here. */
-
- stringBuffer.append(importManager.getImportedName("java.util.Collections"));
- stringBuffer.append(TEXT_47);
-
- }
- stringBuffer.append(TEXT_48);
+ stringBuffer.append(TEXT_34);
}
for (Iterator it = createdGroups.keySet().iterator(); it.hasNext();) {
String nextGroupKey = (String) it.next();
GenNavigatorChildReference nextReference = (GenNavigatorChildReference) createdGroups.get(nextGroupKey);
if (nextReference.isHideIfEmpty()) {
- stringBuffer.append(TEXT_49);
+ stringBuffer.append(TEXT_35);
stringBuffer.append(nextGroupKey);
- stringBuffer.append(TEXT_50);
+ stringBuffer.append(TEXT_36);
}
- stringBuffer.append(TEXT_51);
+ stringBuffer.append(TEXT_37);
stringBuffer.append(nextGroupKey);
- stringBuffer.append(TEXT_52);
+ stringBuffer.append(TEXT_38);
if (nextReference.isHideIfEmpty()) {
- stringBuffer.append(TEXT_53);
+ stringBuffer.append(TEXT_39);
}
}
- stringBuffer.append(TEXT_54);
+ stringBuffer.append(TEXT_40);
}
- stringBuffer.append(TEXT_55);
+ stringBuffer.append(TEXT_41);
stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorGroupQualifiedClassName()));
- stringBuffer.append(TEXT_56);
+ stringBuffer.append(TEXT_42);
stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorGroupQualifiedClassName()));
- stringBuffer.append(TEXT_57);
+ stringBuffer.append(TEXT_43);
stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorGroupQualifiedClassName()));
- stringBuffer.append(TEXT_58);
+ stringBuffer.append(TEXT_44);
stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile"));
- stringBuffer.append(TEXT_59);
+ stringBuffer.append(TEXT_45);
stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile"));
- stringBuffer.append(TEXT_60);
+ stringBuffer.append(TEXT_46);
stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile"));
- stringBuffer.append(TEXT_61);
+ stringBuffer.append(TEXT_47);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain"));
- stringBuffer.append(TEXT_62);
+ stringBuffer.append(TEXT_48);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain"));
- stringBuffer.append(TEXT_63);
+ stringBuffer.append(TEXT_49);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory"));
- stringBuffer.append(TEXT_64);
+ stringBuffer.append(TEXT_50);
stringBuffer.append(importManager.getImportedName("java.util.HashMap"));
- stringBuffer.append(TEXT_65);
+ stringBuffer.append(TEXT_51);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.resource.ResourceSet"));
- stringBuffer.append(TEXT_66);
+ stringBuffer.append(TEXT_52);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI"));
- stringBuffer.append(TEXT_67);
+ stringBuffer.append(TEXT_53);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI"));
- stringBuffer.append(TEXT_68);
+ stringBuffer.append(TEXT_54);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.resource.Resource"));
- stringBuffer.append(TEXT_69);
+ stringBuffer.append(TEXT_55);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_70);
+ stringBuffer.append(TEXT_56);
stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_71);
+ stringBuffer.append(TEXT_57);
Map createdDiagramGroups = new HashMap();
for (Iterator it = genNavigator.getChildReferencesFrom(null).iterator(); it.hasNext();) {
GenNavigatorChildReference nextReference = (GenNavigatorChildReference) it.next();
+ if (nextReference.getReferenceType() != GenNavigatorReferenceType.CHILDREN_LITERAL) {
+ continue;
+ }
String parentVariable;
if (nextReference.isInsideGroup()) {
parentVariable = CodeGenUtil.validJavaIdentifier(nextReference.getGroupName());
if (!createdDiagramGroups.containsKey(parentVariable)) {
createdDiagramGroups.put(parentVariable, nextReference);
- stringBuffer.append(TEXT_72);
+ stringBuffer.append(TEXT_58);
stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorGroupQualifiedClassName()));
- stringBuffer.append(TEXT_73);
+ stringBuffer.append(TEXT_59);
stringBuffer.append(parentVariable);
- stringBuffer.append(TEXT_74);
+ stringBuffer.append(TEXT_60);
stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorGroupQualifiedClassName()));
- stringBuffer.append(TEXT_75);
+ stringBuffer.append(TEXT_61);
stringBuffer.append(nextReference.getGroupName());
- stringBuffer.append(TEXT_76);
+ stringBuffer.append(TEXT_62);
stringBuffer.append(nextReference.getGroupIcon());
- stringBuffer.append(TEXT_77);
+ stringBuffer.append(TEXT_63);
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_78);
+ stringBuffer.append(TEXT_64);
}
- stringBuffer.append(TEXT_79);
+ stringBuffer.append(TEXT_65);
stringBuffer.append(parentVariable);
- stringBuffer.append(TEXT_80);
+ stringBuffer.append(TEXT_66);
} else {
parentVariable = "file";
- stringBuffer.append(TEXT_81);
+ stringBuffer.append(TEXT_67);
}
- if (nextReference.getReferenceType() == GenNavigatorReferenceType.DEFAULT_LITERAL) {
- if (nextReference.getChild() instanceof GenDiagram) {
-
- stringBuffer.append(TEXT_82);
- stringBuffer.append(importManager.getImportedName(nextReference.getChild().getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_83);
- stringBuffer.append(parentVariable);
- stringBuffer.append(TEXT_84);
+ stringBuffer.append(TEXT_68);
- } else {
- /* Any other "Default" child refrences are not supported for resource */
-
- stringBuffer.append(importManager.getImportedName("java.util.Collections"));
- stringBuffer.append(TEXT_85);
+ if (nextReference.getChild() instanceof GenDiagram) {
+
+ stringBuffer.append(importManager.getImportedName(nextReference.getChild().getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_69);
- }
} else {
- /* Any other ReferenceTypes are not supported for the resource */
- stringBuffer.append(importManager.getImportedName("java.util.Collections"));
- stringBuffer.append(TEXT_86);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
+ stringBuffer.append(TEXT_70);
+ stringBuffer.append(importManager.getImportedName(nextReference.getChild().getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_71);
}
- stringBuffer.append(TEXT_87);
+ stringBuffer.append(TEXT_72);
+ stringBuffer.append(parentVariable);
+ stringBuffer.append(TEXT_73);
}
for (Iterator it = createdDiagramGroups.keySet().iterator(); it.hasNext();) {
String groupNameKey = (String) it.next();
GenNavigatorChildReference nextReference = (GenNavigatorChildReference) createdDiagramGroups.get(groupNameKey);
if (nextReference.isHideIfEmpty()) {
- stringBuffer.append(TEXT_88);
+ stringBuffer.append(TEXT_74);
stringBuffer.append(groupNameKey);
- stringBuffer.append(TEXT_89);
+ stringBuffer.append(TEXT_75);
}
- stringBuffer.append(TEXT_90);
+ stringBuffer.append(TEXT_76);
stringBuffer.append(groupNameKey);
- stringBuffer.append(TEXT_91);
+ stringBuffer.append(TEXT_77);
if (nextReference.isHideIfEmpty()) {
- stringBuffer.append(TEXT_92);
+ stringBuffer.append(TEXT_78);
}
}
- stringBuffer.append(TEXT_93);
+ stringBuffer.append(TEXT_79);
stringBuffer.append(importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName()));
- stringBuffer.append(TEXT_94);
+ stringBuffer.append(TEXT_80);
stringBuffer.append(importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName()));
- stringBuffer.append(TEXT_95);
+ stringBuffer.append(TEXT_81);
stringBuffer.append(importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName()));
- stringBuffer.append(TEXT_96);
+ stringBuffer.append(TEXT_82);
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_97);
+ stringBuffer.append(TEXT_83);
stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile"));
- stringBuffer.append(TEXT_98);
+ stringBuffer.append(TEXT_84);
stringBuffer.append(importManager.getImportedName("org.eclipse.ui.navigator.ICommonContentExtensionSite"));
- stringBuffer.append(TEXT_99);
+ stringBuffer.append(TEXT_85);
stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IMemento"));
- stringBuffer.append(TEXT_100);
+ stringBuffer.append(TEXT_86);
stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IMemento"));
- stringBuffer.append(TEXT_101);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_102);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_103);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_104);
- stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_105);
- stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_106);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_107);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_108);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_109);
- stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorItemQualifiedClassName()));
- stringBuffer.append(TEXT_110);
+ stringBuffer.append(TEXT_87);
GenModelGraphAnalyzer graphAnalyzer = new GenModelGraphAnalyzer(genDiagram);
for (Iterator it = getter2ReferenceMap.entrySet().iterator(); it.hasNext();) {
Map.Entry nextEntry = (Map.Entry) it.next();
GenNavigatorChildReference childReference = (GenNavigatorChildReference) nextEntry.getValue();
+ String methodName = (String) nextEntry.getKey();
String parameterClassFQName;
String parameterName;
if (childReference.getParent() instanceof GenLink) {
@@ -539,21 +464,21 @@ for (Iterator it = getter2ReferenceMap.entrySet().iterator(); it.hasNext();) {
parameterName = "view";
}
List<List<GenCommonBase>> paths = graphAnalyzer.getConnectionPaths(childReference);
- stringBuffer.append(TEXT_111);
+ stringBuffer.append(TEXT_88);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_112);
- stringBuffer.append((String) nextEntry.getKey());
- stringBuffer.append(TEXT_113);
+ stringBuffer.append(TEXT_89);
+ stringBuffer.append("get" + methodName);
+ stringBuffer.append(TEXT_90);
stringBuffer.append(importManager.getImportedName(parameterClassFQName));
- stringBuffer.append(TEXT_114);
+ stringBuffer.append(TEXT_91);
stringBuffer.append(parameterName);
- stringBuffer.append(TEXT_115);
+ stringBuffer.append(TEXT_92);
stringBuffer.append(importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName()));
- stringBuffer.append(TEXT_116);
+ stringBuffer.append(TEXT_93);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_117);
+ stringBuffer.append(TEXT_94);
stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_118);
+ stringBuffer.append(TEXT_95);
boolean connectedViewsDeclared = false;
for (List<GenCommonBase> nextPath : paths) {
for (int i = 0; i < nextPath.size() - 1; i++) {
@@ -561,166 +486,192 @@ for (Iterator it = getter2ReferenceMap.entrySet().iterator(); it.hasNext();) {
GenCommonBase nextPathSegment = nextPath.get(i + 1);
if (!connectedViewsDeclared) {
connectedViewsDeclared = true;
- stringBuffer.append(TEXT_119);
+ stringBuffer.append(TEXT_96);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_120);
+ stringBuffer.append(TEXT_97);
}else {
- stringBuffer.append(TEXT_121);
+ stringBuffer.append(TEXT_98);
}
if (currentPathSegment instanceof GenLink) {
if (childReference.getReferenceType() == GenNavigatorReferenceType.OUT_TAGET_LITERAL) {
- stringBuffer.append(TEXT_122);
+ stringBuffer.append(TEXT_99);
} else { /*childReference.getReferenceType() == GenNavigatorReferenceType.IN_SOURCE_LITERAL*/
- stringBuffer.append(TEXT_123);
+ stringBuffer.append(TEXT_100);
}
} else {
if (childReference.getReferenceType() == GenNavigatorReferenceType.OUT_TAGET_LITERAL) {
- stringBuffer.append(TEXT_124);
+ stringBuffer.append(TEXT_101);
} else if (childReference.getReferenceType() == GenNavigatorReferenceType.IN_SOURCE_LITERAL) {
- stringBuffer.append(TEXT_125);
+ stringBuffer.append(TEXT_102);
} else { /*childReference.getReferenceType() == GenNavigatorReferenceType.CHILDREN_LITERAL*/
- stringBuffer.append(TEXT_126);
+ stringBuffer.append(TEXT_103);
}
}
- stringBuffer.append(TEXT_127);
+ stringBuffer.append(TEXT_104);
if (i == 0) {
stringBuffer.append(importManager.getImportedName("java.util.Collections"));
- stringBuffer.append(TEXT_128);
+ stringBuffer.append(TEXT_105);
stringBuffer.append(parameterName);
- stringBuffer.append(TEXT_129);
+ stringBuffer.append(TEXT_106);
} else {
- stringBuffer.append(TEXT_130);
+ stringBuffer.append(TEXT_107);
}
- stringBuffer.append(TEXT_131);
+ stringBuffer.append(TEXT_108);
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
- stringBuffer.append(TEXT_132);
+ stringBuffer.append(TEXT_109);
stringBuffer.append(importManager.getImportedName(nextPathSegment.getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_133);
+ stringBuffer.append(TEXT_110);
}
- stringBuffer.append(TEXT_134);
+ stringBuffer.append(TEXT_111);
+ stringBuffer.append("is" + methodName + "Leaf");
+ stringBuffer.append(TEXT_112);
+ stringBuffer.append(parameterName);
+ stringBuffer.append(TEXT_113);
}
- stringBuffer.append(TEXT_135);
+ stringBuffer.append(TEXT_114);
+ stringBuffer.append("is" + methodName + "Leaf");
+ stringBuffer.append(TEXT_115);
+ stringBuffer.append(importManager.getImportedName(parameterClassFQName));
+ stringBuffer.append(TEXT_116);
+ stringBuffer.append(parameterName);
+ stringBuffer.append(TEXT_117);
+ stringBuffer.append(childReference.getReferenceType() == GenNavigatorReferenceType.CHILDREN_LITERAL ? "false" : "true");
+ stringBuffer.append(TEXT_118);
}
- stringBuffer.append(TEXT_136);
+ stringBuffer.append(TEXT_119);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_137);
+ stringBuffer.append(TEXT_120);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_138);
+ stringBuffer.append(TEXT_121);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_139);
+ stringBuffer.append(TEXT_122);
stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_140);
+ stringBuffer.append(TEXT_123);
stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_141);
+ stringBuffer.append(TEXT_124);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
- stringBuffer.append(TEXT_142);
+ stringBuffer.append(TEXT_125);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
- stringBuffer.append(TEXT_143);
+ stringBuffer.append(TEXT_126);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_144);
+ stringBuffer.append(TEXT_127);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_145);
+ stringBuffer.append(TEXT_128);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_146);
+ stringBuffer.append(TEXT_129);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_147);
+ stringBuffer.append(TEXT_130);
stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_148);
+ stringBuffer.append(TEXT_131);
stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_149);
+ stringBuffer.append(TEXT_132);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
- stringBuffer.append(TEXT_150);
+ stringBuffer.append(TEXT_133);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
- stringBuffer.append(TEXT_151);
+ stringBuffer.append(TEXT_134);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_152);
+ stringBuffer.append(TEXT_135);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_153);
+ stringBuffer.append(TEXT_136);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_154);
+ stringBuffer.append(TEXT_137);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_155);
+ stringBuffer.append(TEXT_138);
stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_156);
+ stringBuffer.append(TEXT_139);
stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_157);
+ stringBuffer.append(TEXT_140);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_158);
+ stringBuffer.append(TEXT_141);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_159);
+ stringBuffer.append(TEXT_142);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_160);
+ stringBuffer.append(TEXT_143);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_161);
+ stringBuffer.append(TEXT_144);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_162);
+ stringBuffer.append(TEXT_145);
stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_163);
+ stringBuffer.append(TEXT_146);
stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_164);
+ stringBuffer.append(TEXT_147);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_165);
+ stringBuffer.append(TEXT_148);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_166);
+ stringBuffer.append(TEXT_149);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_167);
+ stringBuffer.append(TEXT_150);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_168);
+ stringBuffer.append(TEXT_151);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_169);
+ stringBuffer.append(TEXT_152);
stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_170);
+ stringBuffer.append(TEXT_153);
stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_171);
+ stringBuffer.append(TEXT_154);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_172);
+ stringBuffer.append(TEXT_155);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_173);
+ stringBuffer.append(TEXT_156);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_174);
+ stringBuffer.append(TEXT_157);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_175);
+ stringBuffer.append(TEXT_158);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_176);
+ stringBuffer.append(TEXT_159);
stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_177);
+ stringBuffer.append(TEXT_160);
stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_178);
+ stringBuffer.append(TEXT_161);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(TEXT_162);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_179);
+ stringBuffer.append(TEXT_163);
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(TEXT_164);
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(TEXT_165);
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(TEXT_166);
+ stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
+ stringBuffer.append(TEXT_167);
+ stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
+ stringBuffer.append(TEXT_168);
+ stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorItemQualifiedClassName()));
+ stringBuffer.append(TEXT_169);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_180);
+ stringBuffer.append(TEXT_170);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_181);
+ stringBuffer.append(TEXT_171);
stringBuffer.append(importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName()));
- stringBuffer.append(TEXT_182);
+ stringBuffer.append(TEXT_172);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_183);
+ stringBuffer.append(TEXT_173);
stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_184);
+ stringBuffer.append(TEXT_174);
stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorItemQualifiedClassName()));
- stringBuffer.append(TEXT_185);
+ stringBuffer.append(TEXT_175);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_186);
+ stringBuffer.append(TEXT_176);
importManager.emitSortedImports();
- stringBuffer.append(TEXT_187);
+ stringBuffer.append(TEXT_177);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/navigator/NavigatorItemGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/navigator/NavigatorItemGenerator.java
index aa02024ec..283ae64d7 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/navigator/NavigatorItemGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/navigator/NavigatorItemGenerator.java
@@ -22,12 +22,12 @@ public class NavigatorItemGenerator
protected final String TEXT_5 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
protected final String TEXT_6 = " extends ";
protected final String TEXT_7 = " {" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\tprivate ";
- protected final String TEXT_8 = " myView;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\tpublic ";
+ protected final String TEXT_8 = " myView;" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\tprivate boolean myLeaf = false;\t" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\tpublic ";
protected final String TEXT_9 = "(";
- protected final String TEXT_10 = " view, Object parent) {" + NL + "\t\tsuper(parent);" + NL + "\t\tmyView = view;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\tpublic ";
+ protected final String TEXT_10 = " view, Object parent, boolean isLeaf) {" + NL + "\t\tsuper(parent);" + NL + "\t\tmyView = view;" + NL + "\t\tmyLeaf = isLeaf;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\tpublic ";
protected final String TEXT_11 = " getView() {" + NL + "\t\treturn myView;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\tpublic String getModelID() {" + NL + "\t\treturn ";
protected final String TEXT_12 = ".getModelID(myView);" + NL + "\t}" + NL + "\t" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\tpublic int getVisualID() {" + NL + "\t\treturn ";
- protected final String TEXT_13 = ".getVisualID(myView);" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\tpublic Object getAdapter(Class adapter) {" + NL + "\t\tif (";
+ protected final String TEXT_13 = ".getVisualID(myView);" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\tpublic boolean isLeaf() {" + NL + "\t\treturn myLeaf;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\tpublic Object getAdapter(Class adapter) {" + NL + "\t\tif (";
protected final String TEXT_14 = ".class.isAssignableFrom(adapter) || ";
protected final String TEXT_15 = ".class.isAssignableFrom(adapter)) {" + NL + "\t\t\treturn myView;" + NL + "\t\t}" + NL + "\t\treturn super.getAdapter(adapter);" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */\t" + NL + "\tpublic boolean equals(Object obj) {" + NL + "\t\tif (obj instanceof ";
protected final String TEXT_16 = ") {" + NL + "\t\t\t";
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenNavigatorReferenceType.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenNavigatorReferenceType.java
index 6f583f631..fb37780ef 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenNavigatorReferenceType.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenNavigatorReferenceType.java
@@ -68,21 +68,6 @@ public final class GenNavigatorReferenceType extends AbstractEnumerator {
public static final int IN_SOURCE = 2;
/**
- * The '<em><b>Default</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Default</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #DEFAULT_LITERAL
- * @model name="default"
- * @generated
- * @ordered
- */
- public static final int DEFAULT = 3;
-
- /**
* The '<em><b>Children</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -113,16 +98,6 @@ public final class GenNavigatorReferenceType extends AbstractEnumerator {
public static final GenNavigatorReferenceType IN_SOURCE_LITERAL = new GenNavigatorReferenceType(IN_SOURCE, "in_source", "in_source");
/**
- * The '<em><b>Default</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #DEFAULT
- * @generated
- * @ordered
- */
- public static final GenNavigatorReferenceType DEFAULT_LITERAL = new GenNavigatorReferenceType(DEFAULT, "default", "default");
-
- /**
* An array of all the '<em><b>Gen Navigator Reference Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -133,7 +108,6 @@ public final class GenNavigatorReferenceType extends AbstractEnumerator {
CHILDREN_LITERAL,
OUT_TAGET_LITERAL,
IN_SOURCE_LITERAL,
- DEFAULT_LITERAL,
};
/**
@@ -187,7 +161,6 @@ public final class GenNavigatorReferenceType extends AbstractEnumerator {
case CHILDREN: return CHILDREN_LITERAL;
case OUT_TAGET: return OUT_TAGET_LITERAL;
case IN_SOURCE: return IN_SOURCE_LITERAL;
- case DEFAULT: return DEFAULT_LITERAL;
}
return null;
}
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java
index 2d7f5e67f..5b32599ed 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java
@@ -6109,7 +6109,6 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
addEEnumLiteral(genNavigatorReferenceTypeEEnum, GenNavigatorReferenceType.CHILDREN_LITERAL);
addEEnumLiteral(genNavigatorReferenceTypeEEnum, GenNavigatorReferenceType.OUT_TAGET_LITERAL);
addEEnumLiteral(genNavigatorReferenceTypeEEnum, GenNavigatorReferenceType.IN_SOURCE_LITERAL);
- addEEnumLiteral(genNavigatorReferenceTypeEEnum, GenNavigatorReferenceType.DEFAULT_LITERAL);
initEEnum(generatedTypeEEnum, GeneratedType.class, "GeneratedType");
addEEnumLiteral(generatedTypeEEnum, GeneratedType.ABSTRACT_NAVIGATOR_ITEM_LITERAL);
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/util/GenModelGraphAnalyzer.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/util/GenModelGraphAnalyzer.java
index 79233b02e..e055665e5 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/util/GenModelGraphAnalyzer.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/util/GenModelGraphAnalyzer.java
@@ -137,6 +137,9 @@ public class GenModelGraphAnalyzer {
if (source instanceof GenContainerBase) {
children.addAll(((GenContainerBase) source).getContainedNodes());
}
+ if (source instanceof GenDiagram) {
+ children.addAll(((GenDiagram) source).getLinks());
+ }
if (source instanceof GenNode) {
children.addAll(((GenNode) source).getCompartments());
children.addAll(((GenNode) source).getLabels());
diff --git a/plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorContentProvider.javajet b/plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorContentProvider.javajet
index 7b5783849..f53eb5f11 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorContentProvider.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorContentProvider.javajet
@@ -53,6 +53,9 @@ public class <%=genNavigator.getContentProviderClassName()%> implements <%=impor
if (abstractNavigatorItem instanceof <%=importManager.getImportedName(genNavigator.getNavigatorItemQualifiedClassName())%>) {
<%=importManager.getImportedName(genNavigator.getNavigatorItemQualifiedClassName())%> navigatorItem = (<%=importManager.getImportedName(genNavigator.getNavigatorItemQualifiedClassName())%>) abstractNavigatorItem;
+ if (navigatorItem.isLeaf()) {
+ return EMPTY_ARRAY;
+ }
switch (navigatorItem.getVisualID()) {
<%Map getter2ReferenceMap = new HashMap();
for (Iterator containers = commonBaseElements.iterator(); containers.hasNext();) {
@@ -79,36 +82,21 @@ for (Iterator containers = commonBaseElements.iterator(); containers.hasNext();)
result.addAll(<%
}
- if (nextReference.getReferenceType() == GenNavigatorReferenceType.DEFAULT_LITERAL) {
- if (nextReference.getChild() instanceof GenDiagram) {
- %>getViewByType(navigatorItem.getView().eResource().getContents(), <%=importManager.getImportedName(nextReference.getChild().getEditPartQualifiedClassName())%>.MODEL_ID, <%=parentVariable%>)<%
- } else if (nextReference.getChild() instanceof GenTopLevelNode) {
- %>getViewByType(navigatorItem.getView().getDiagram().getChildren(), <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(nextReference.getChild().getEditPartQualifiedClassName())%>.VISUAL_ID), <%=parentVariable%>)<%
- } else if (nextReference.getChild() instanceof GenLink) {
- %>getViewByType(navigatorItem.getView().getDiagram().getEdges(), <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(nextReference.getChild().getEditPartQualifiedClassName())%>.VISUAL_ID), <%=parentVariable%>)<%
- } else {
- /* Any other "Default" child refrences are not supported */
- %><%=importManager.getImportedName("java.util.Collections")%>.EMPTY_LIST<%
- }
- } else if (nextReference.getReferenceType() == GenNavigatorReferenceType.CHILDREN_LITERAL || nextReference.getReferenceType() == GenNavigatorReferenceType.OUT_TAGET_LITERAL || nextReference.getReferenceType() == GenNavigatorReferenceType.IN_SOURCE_LITERAL) {
- String getterNameBase = "get" + nextCommonBase.getUniqueIdentifier() + "To" + nextReference.getChild().getUniqueIdentifier();
- if (nextReference.getReferenceType() == GenNavigatorReferenceType.OUT_TAGET_LITERAL) {
- getterNameBase = getterNameBase + "OutTarget";
- } else if (nextReference.getReferenceType() == GenNavigatorReferenceType.IN_SOURCE_LITERAL) {
- getterNameBase = getterNameBase + "InSource";
- } else { /*nextReference.getReferenceType() == GenNavigatorReferenceType.CHILDREN_LITERAL*/
- getterNameBase = getterNameBase + "Children";
- }
- String getterName = getterNameBase;
- for (int i = 1; getter2ReferenceMap.containsKey(getterName); i++) {
- getterName = getterNameBase + "_" + i;
- }
- getter2ReferenceMap.put(getterName, nextReference);
- %><%=getterName%>(<%if (nextCommonBase instanceof GenLink) {%>(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) <%}%>navigatorItem.getView(), <%=parentVariable%>)<%
- } else {
- /* Put processing of other types of the references here. */
- %><%=importManager.getImportedName("java.util.Collections")%>.EMPTY_LIST<%
- }%>);
+ String getterNameBase = nextCommonBase.getUniqueIdentifier() + "To" + nextReference.getChild().getUniqueIdentifier();
+ if (nextReference.getReferenceType() == GenNavigatorReferenceType.OUT_TAGET_LITERAL) {
+ getterNameBase = getterNameBase + "OutTarget";
+ } else if (nextReference.getReferenceType() == GenNavigatorReferenceType.IN_SOURCE_LITERAL) {
+ getterNameBase = getterNameBase + "InSource";
+ } else { /*nextReference.getReferenceType() == GenNavigatorReferenceType.CHILDREN_LITERAL*/
+ getterNameBase = getterNameBase + "Children";
+ }
+ String getterName = getterNameBase;
+ for (int i = 1; getter2ReferenceMap.containsKey(getterName); i++) {
+ getterName = getterNameBase + "_" + i;
+ }
+ getter2ReferenceMap.put(getterName, nextReference);
+ getterName = "get" + getterName;
+ %><%=getterName%>(<%if (nextCommonBase instanceof GenLink) {%>(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")%>) <%}%>navigatorItem.getView(), <%=parentVariable%>));
<% }
for (Iterator it = createdGroups.keySet().iterator(); it.hasNext();) {
@@ -150,6 +138,9 @@ for (Iterator containers = commonBaseElements.iterator(); containers.hasNext();)
<%Map createdDiagramGroups = new HashMap();
for (Iterator it = genNavigator.getChildReferencesFrom(null).iterator(); it.hasNext();) {
GenNavigatorChildReference nextReference = (GenNavigatorChildReference) it.next();
+ if (nextReference.getReferenceType() != GenNavigatorReferenceType.CHILDREN_LITERAL) {
+ continue;
+ }
String parentVariable;
if (nextReference.isInsideGroup()) {
parentVariable = CodeGenUtil.validJavaIdentifier(nextReference.getGroupName());
@@ -161,18 +152,12 @@ for (Iterator it = genNavigator.getChildReferencesFrom(null).iterator(); it.hasN
} else {
parentVariable = "file";%>
result.addAll(<%
- }
- if (nextReference.getReferenceType() == GenNavigatorReferenceType.DEFAULT_LITERAL) {
- if (nextReference.getChild() instanceof GenDiagram) {
- %>getViewByType(resource.getContents(), <%=importManager.getImportedName(nextReference.getChild().getEditPartQualifiedClassName())%>.MODEL_ID, <%=parentVariable%>)<%
- } else {
- /* Any other "Default" child refrences are not supported for resource */
- %><%=importManager.getImportedName("java.util.Collections")%>.EMPTY_LIST<%
- }
+ }%>createNavigatorItems(selectViewsByType(resource.getContents(), <%
+ if (nextReference.getChild() instanceof GenDiagram) {
+ %><%=importManager.getImportedName(nextReference.getChild().getEditPartQualifiedClassName())%>.MODEL_ID<%
} else {
- /* Any other ReferenceTypes are not supported for the resource */
- %><%=importManager.getImportedName("java.util.Collections")%>.EMPTY_LIST<%
- }%>);
+ %><%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(nextReference.getChild().getEditPartQualifiedClassName())%>.VISUAL_ID)<%
+ }%>), <%=parentVariable%>));
<%}
for (Iterator it = createdDiagramGroups.keySet().iterator(); it.hasNext();) {
@@ -231,28 +216,11 @@ for (Iterator it = createdDiagramGroups.keySet().iterator(); it.hasNext();) {
public void saveState(<%=importManager.getImportedName("org.eclipse.ui.IMemento")%> aMemento) {
}
- /**
- * @generated
- */
- private <%=importManager.getImportedName("java.util.Collection")%> getViewByType(<%=importManager.getImportedName("java.util.Collection")%> childViews, String type, Object parent) {
- <%=importManager.getImportedName("java.util.Collection")%> result = new <%=importManager.getImportedName("java.util.ArrayList")%>();
- for (<%=importManager.getImportedName("java.util.Iterator")%> it = childViews.iterator(); it.hasNext();) {
- Object next = it.next();
- if (false == next instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) {
- continue;
- }
- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> nextView = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) next;
- if (type.equals(nextView.getType())) {
- result.add(new <%=importManager.getImportedName(genNavigator.getNavigatorItemQualifiedClassName())%>(nextView, parent));
- }
- }
- return result;
- }
-
<%GenModelGraphAnalyzer graphAnalyzer = new GenModelGraphAnalyzer(genDiagram);
for (Iterator it = getter2ReferenceMap.entrySet().iterator(); it.hasNext();) {
Map.Entry nextEntry = (Map.Entry) it.next();
GenNavigatorChildReference childReference = (GenNavigatorChildReference) nextEntry.getValue();
+ String methodName = (String) nextEntry.getKey();
String parameterClassFQName;
String parameterName;
if (childReference.getParent() instanceof GenLink) {
@@ -267,7 +235,7 @@ for (Iterator it = getter2ReferenceMap.entrySet().iterator(); it.hasNext();) {
/**
* @generated
*/
- private <%=importManager.getImportedName("java.util.Collection")%> <%=(String) nextEntry.getKey()%>(<%=importManager.getImportedName(parameterClassFQName)%> <%=parameterName%>, <%=importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName())%> parent) {
+ private <%=importManager.getImportedName("java.util.Collection")%> <%="get" + methodName%>(<%=importManager.getImportedName(parameterClassFQName)%> <%=parameterName%>, <%=importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName())%> parent) {
<%=importManager.getImportedName("java.util.Collection")%> result = new <%=importManager.getImportedName("java.util.ArrayList")%>();
<% boolean connectedViewsDeclared = false;
for (List<GenCommonBase> nextPath : paths) {
@@ -301,10 +269,17 @@ for (Iterator it = getter2ReferenceMap.entrySet().iterator(); it.hasNext();) {
%>connectedViews<%
}%>, <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(nextPathSegment.getEditPartQualifiedClassName())%>.VISUAL_ID));
<% }%>
- createNavigatorItems(connectedViews, parent, result);
+ createNavigatorItems(connectedViews, parent, result, <%="is" + methodName + "Leaf"%>(<%=parameterName%>));
<% }%>
return result;
}
+
+ /**
+ * @generated
+ */
+ private boolean <%="is" + methodName + "Leaf"%>(<%=importManager.getImportedName(parameterClassFQName)%> <%=parameterName%>) {
+ return <%=childReference.getReferenceType() == GenNavigatorReferenceType.CHILDREN_LITERAL ? "false" : "true"%>;
+ }
<%}%>
/**
@@ -386,13 +361,24 @@ for (Iterator it = getter2ReferenceMap.entrySet().iterator(); it.hasNext();) {
}
return result;
}
+
+ /**
+ * @generated
+ */
+ private <%=importManager.getImportedName("java.util.Collection")%> createNavigatorItems(<%=importManager.getImportedName("java.util.Collection")%> views, Object parent) {
+ <%=importManager.getImportedName("java.util.Collection")%> result = new <%=importManager.getImportedName("java.util.ArrayList")%>();
+ for (<%=importManager.getImportedName("java.util.Iterator")%> it = views.iterator(); it.hasNext();) {
+ result.add(new <%=importManager.getImportedName(genNavigator.getNavigatorItemQualifiedClassName())%>((<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) it.next(), parent, false));
+ }
+ return result;
+ }
/**
* @generated
*/
- private void createNavigatorItems(<%=importManager.getImportedName("java.util.Collection")%> views, <%=importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName())%> parent, <%=importManager.getImportedName("java.util.Collection")%> result) {
+ private void createNavigatorItems(<%=importManager.getImportedName("java.util.Collection")%> views, <%=importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName())%> parent, <%=importManager.getImportedName("java.util.Collection")%> result, boolean isLeafs) {
for (<%=importManager.getImportedName("java.util.Iterator")%> it = views.iterator(); it.hasNext();) {
- result.add(new <%=importManager.getImportedName(genNavigator.getNavigatorItemQualifiedClassName())%>((<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) it.next(), parent));
+ result.add(new <%=importManager.getImportedName(genNavigator.getNavigatorItemQualifiedClassName())%>((<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>) it.next(), parent, isLeafs));
}
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorItem.javajet b/plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorItem.javajet
index 93c6d0568..14ecd6d97 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorItem.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorItem.javajet
@@ -19,13 +19,19 @@ public class <%=genNavigator.getNavigatorItemClassName()%> extends <%=importMana
* @generated
*/
private <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> myView;
+
+ /**
+ * @generated
+ */
+ private boolean myLeaf = false;
/**
* @generated
*/
- public <%=genNavigator.getNavigatorItemClassName()%>(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> view, Object parent) {
+ public <%=genNavigator.getNavigatorItemClassName()%>(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> view, Object parent, boolean isLeaf) {
super(parent);
myView = view;
+ myLeaf = isLeaf;
}
/**
@@ -53,6 +59,13 @@ public class <%=genNavigator.getNavigatorItemClassName()%> extends <%=importMana
/**
* @generated
*/
+ public boolean isLeaf() {
+ return myLeaf;
+ }
+
+ /**
+ * @generated
+ */
public Object getAdapter(Class adapter) {
if (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%>.class.isAssignableFrom(adapter) || <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%>.class.isAssignableFrom(adapter)) {
return myView;
diff --git a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/GenModelGraphAnalyzerTest.java b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/GenModelGraphAnalyzerTest.java
index 1bae7f088..4295e14c0 100644
--- a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/GenModelGraphAnalyzerTest.java
+++ b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/tr/GenModelGraphAnalyzerTest.java
@@ -149,11 +149,15 @@ public class GenModelGraphAnalyzerTest extends TestCase {
navigatorChildReference.setChild(myStartNode);
paths = myAnalyser.getConnectionPaths(navigatorChildReference);
assertOnePath(paths, new GenCommonBase[] { myDiagram, myStartNode });
-
+
GenLink link = GMFGenFactory.eINSTANCE.createGenLink();
GenLinkLabel linkLabel = GMFGenFactory.eINSTANCE.createGenLinkLabel();
link.getLabels().add(linkLabel);
myDiagram.getLinks().add(link);
+
+ navigatorChildReference.setChild(link);
+ paths = myAnalyser.getConnectionPaths(navigatorChildReference);
+ assertOnePath(paths, new GenCommonBase[] { myDiagram, link });
navigatorChildReference.setParent(link);
navigatorChildReference.setChild(linkLabel);

Back to the top