Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2006-11-01 18:57:07 +0000
committerashatalin2006-11-01 18:57:07 +0000
commit1ea8b3bfaf91251da69ea5c73e74ab4bb87d29b0 (patch)
treedd89acc2726b2086f559423d3d24f64a779cfd7d
parentf51cbe1b6299cf1a1164830fdaf29620271bba0f (diff)
downloadorg.eclipse.gmf-tooling-1ea8b3bfaf91251da69ea5c73e74ab4bb87d29b0.tar.gz
org.eclipse.gmf-tooling-1ea8b3bfaf91251da69ea5c73e74ab4bb87d29b0.tar.xz
org.eclipse.gmf-tooling-1ea8b3bfaf91251da69ea5c73e74ab4bb87d29b0.zip
Using type access to Edges.
-rw-r--r--examples/org.eclipse.gmf.ecore.editor/src/org/eclipse/gmf/ecore/navigator/EcoreNavigatorContentProvider.java210
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/navigator/NavigatorContentProviderGenerator.java588
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorContentProvider.javajet15
3 files changed, 423 insertions, 390 deletions
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 3cb18f992..86f088da0 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
@@ -300,22 +300,22 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
case EAnnotationReferencesEditPart.VISUAL_ID: {
Collection result = new ArrayList();
EcoreNavigatorGroup target = new EcoreNavigatorGroup("target", "icons/linkTargetNavigatorGroup.gif", EPackageEditPart.MODEL_ID, navigatorItem);
- target.addChildren(getEAnnotationReferences_4001ToEClass_2001OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEAnnotationReferences_4001ToEPackage_2002OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEAnnotationReferences_4001ToEAnnotation_2003OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEAnnotationReferences_4001ToEDataType_2004OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEAnnotationReferences_4001ToEEnum_2005OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEAnnotationReferences_4001ToEAttribute_3001OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEAnnotationReferences_4001ToEOperation_3002OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEAnnotationReferences_4001ToEAnnotation_3003OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEAnnotationReferences_4001ToEClass_3004OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEAnnotationReferences_4001ToEPackage_3005OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEAnnotationReferences_4001ToEDataType_3006OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEAnnotationReferences_4001ToEEnum_3007OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEAnnotationReferences_4001ToEEnumLiteral_3009OutTarget(navigatorItem.getView(), target));
+ target.addChildren(getEAnnotationReferences_4001ToEClass_2001OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEAnnotationReferences_4001ToEPackage_2002OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEAnnotationReferences_4001ToEAnnotation_2003OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEAnnotationReferences_4001ToEDataType_2004OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEAnnotationReferences_4001ToEEnum_2005OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEAnnotationReferences_4001ToEAttribute_3001OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEAnnotationReferences_4001ToEOperation_3002OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEAnnotationReferences_4001ToEAnnotation_3003OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEAnnotationReferences_4001ToEClass_3004OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEAnnotationReferences_4001ToEPackage_3005OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEAnnotationReferences_4001ToEDataType_3006OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEAnnotationReferences_4001ToEEnum_3007OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEAnnotationReferences_4001ToEEnumLiteral_3009OutTarget((Edge) navigatorItem.getView(), target));
EcoreNavigatorGroup source = new EcoreNavigatorGroup("source", "icons/linkSourceNavigatorGroup.gif", EPackageEditPart.MODEL_ID, navigatorItem);
- source.addChildren(getEAnnotationReferences_4001ToEAnnotation_2003InSource(navigatorItem.getView(), source));
- source.addChildren(getEAnnotationReferences_4001ToEAnnotation_3003InSource(navigatorItem.getView(), source));
+ source.addChildren(getEAnnotationReferences_4001ToEAnnotation_2003InSource((Edge) navigatorItem.getView(), source));
+ source.addChildren(getEAnnotationReferences_4001ToEAnnotation_3003InSource((Edge) navigatorItem.getView(), source));
if (!target.isEmpty()) {
result.add(target);
}
@@ -327,15 +327,15 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
case EReferenceEditPart.VISUAL_ID: {
Collection result = new ArrayList();
EcoreNavigatorGroup target = new EcoreNavigatorGroup("target", "icons/linkTargetNavigatorGroup.gif", EPackageEditPart.MODEL_ID, navigatorItem);
- target.addChildren(getEReference_4002ToEClass_2001OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEReference_4002ToEDataType_2004OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEReference_4002ToEEnum_2005OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEReference_4002ToEClass_3004OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEReference_4002ToEDataType_3006OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEReference_4002ToEEnum_3007OutTarget(navigatorItem.getView(), target));
+ target.addChildren(getEReference_4002ToEClass_2001OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEReference_4002ToEDataType_2004OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEReference_4002ToEEnum_2005OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEReference_4002ToEClass_3004OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEReference_4002ToEDataType_3006OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEReference_4002ToEEnum_3007OutTarget((Edge) navigatorItem.getView(), target));
EcoreNavigatorGroup source = new EcoreNavigatorGroup("source", "icons/linkSourceNavigatorGroup.gif", EPackageEditPart.MODEL_ID, navigatorItem);
- source.addChildren(getEReference_4002ToEClass_2001InSource(navigatorItem.getView(), source));
- source.addChildren(getEReference_4002ToEClass_3004InSource(navigatorItem.getView(), source));
+ source.addChildren(getEReference_4002ToEClass_2001InSource((Edge) navigatorItem.getView(), source));
+ source.addChildren(getEReference_4002ToEClass_3004InSource((Edge) navigatorItem.getView(), source));
if (!target.isEmpty()) {
result.add(target);
}
@@ -347,15 +347,15 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
case EReference2EditPart.VISUAL_ID: {
Collection result = new ArrayList();
EcoreNavigatorGroup target = new EcoreNavigatorGroup("target", "icons/linkTargetNavigatorGroup.gif", EPackageEditPart.MODEL_ID, navigatorItem);
- target.addChildren(getEReference_4003ToEClass_2001OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEReference_4003ToEDataType_2004OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEReference_4003ToEEnum_2005OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEReference_4003ToEClass_3004OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEReference_4003ToEDataType_3006OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEReference_4003ToEEnum_3007OutTarget(navigatorItem.getView(), target));
+ target.addChildren(getEReference_4003ToEClass_2001OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEReference_4003ToEDataType_2004OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEReference_4003ToEEnum_2005OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEReference_4003ToEClass_3004OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEReference_4003ToEDataType_3006OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEReference_4003ToEEnum_3007OutTarget((Edge) navigatorItem.getView(), target));
EcoreNavigatorGroup source = new EcoreNavigatorGroup("source", "icons/linkSourceNavigatorGroup.gif", EPackageEditPart.MODEL_ID, navigatorItem);
- source.addChildren(getEReference_4003ToEClass_2001InSource(navigatorItem.getView(), source));
- source.addChildren(getEReference_4003ToEClass_3004InSource(navigatorItem.getView(), source));
+ source.addChildren(getEReference_4003ToEClass_2001InSource((Edge) navigatorItem.getView(), source));
+ source.addChildren(getEReference_4003ToEClass_3004InSource((Edge) navigatorItem.getView(), source));
if (!target.isEmpty()) {
result.add(target);
}
@@ -367,11 +367,11 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
case EClassESuperTypesEditPart.VISUAL_ID: {
Collection result = new ArrayList();
EcoreNavigatorGroup target = new EcoreNavigatorGroup("target", "icons/linkTargetNavigatorGroup.gif", EPackageEditPart.MODEL_ID, navigatorItem);
- target.addChildren(getEClassESuperTypes_4004ToEClass_2001OutTarget(navigatorItem.getView(), target));
- target.addChildren(getEClassESuperTypes_4004ToEClass_3004OutTarget(navigatorItem.getView(), target));
+ target.addChildren(getEClassESuperTypes_4004ToEClass_2001OutTarget((Edge) navigatorItem.getView(), target));
+ target.addChildren(getEClassESuperTypes_4004ToEClass_3004OutTarget((Edge) navigatorItem.getView(), target));
EcoreNavigatorGroup source = new EcoreNavigatorGroup("source", "icons/linkSourceNavigatorGroup.gif", EPackageEditPart.MODEL_ID, navigatorItem);
- source.addChildren(getEClassESuperTypes_4004ToEClass_2001InSource(navigatorItem.getView(), source));
- source.addChildren(getEClassESuperTypes_4004ToEClass_3004InSource(navigatorItem.getView(), source));
+ source.addChildren(getEClassESuperTypes_4004ToEClass_2001InSource((Edge) navigatorItem.getView(), source));
+ source.addChildren(getEClassESuperTypes_4004ToEClass_3004InSource((Edge) navigatorItem.getView(), source));
if (!target.isEmpty()) {
result.add(target);
}
@@ -469,9 +469,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEClassESuperTypes_4004ToEClass_3004OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEClassESuperTypes_4004ToEClass_3004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -520,9 +520,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEAnnotation_2003InSource(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEAnnotation_2003InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksSourceByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotation2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EAnnotation2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -530,9 +530,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4002ToEClass_2001OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4002ToEClass_2001OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -540,9 +540,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4003ToEEnum_3007OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4003ToEEnum_3007OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EEnumEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnumEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -550,9 +550,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4002ToEClass_2001InSource(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4002ToEClass_2001InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksSourceByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -612,9 +612,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEClassESuperTypes_4004ToEClass_3004InSource(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEClassESuperTypes_4004ToEClass_3004InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksSourceByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -663,9 +663,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4002ToEEnum_3007OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4002ToEEnum_3007OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EEnumEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnumEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -673,9 +673,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4002ToEClass_3004InSource(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4002ToEClass_3004InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksSourceByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -704,9 +704,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4002ToEDataType_3006OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4002ToEDataType_3006OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EDataTypeEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EDataTypeEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -714,9 +714,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4003ToEClass_3004InSource(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4003ToEClass_3004InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksSourceByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -734,9 +734,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEPackage_2002OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEPackage_2002OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EPackage2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EPackage2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -815,9 +815,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4002ToEEnum_2005OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4002ToEEnum_2005OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EEnum2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnum2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -825,9 +825,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEEnumLiteral_3009OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEEnumLiteral_3009OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EEnumLiteralEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnumLiteralEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -835,9 +835,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEDataType_2004OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEDataType_2004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EDataType2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EDataType2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -845,9 +845,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4003ToEEnum_2005OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4003ToEEnum_2005OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EEnum2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnum2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -876,9 +876,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4002ToEDataType_2004OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4002ToEDataType_2004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EDataType2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EDataType2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -896,9 +896,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4003ToEClass_2001InSource(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4003ToEClass_2001InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksSourceByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -906,9 +906,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEEnum_2005OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEEnum_2005OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EEnum2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnum2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -936,9 +936,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEAnnotation_3003OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEAnnotation_3003OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EAnnotationEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -946,9 +946,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEClassESuperTypes_4004ToEClass_2001InSource(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEClassESuperTypes_4004ToEClass_2001InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksSourceByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -966,9 +966,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEAnnotation_3003InSource(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEAnnotation_3003InSource(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksSourceByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotationEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksSourceByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EAnnotationEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -976,9 +976,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEAnnotation_2003OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEAnnotation_2003OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAnnotation2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EAnnotation2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -986,9 +986,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4003ToEDataType_2004OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4003ToEDataType_2004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EDataType2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EDataType2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -996,9 +996,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEClass_3004OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEClass_3004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -1026,9 +1026,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4003ToEClass_2001OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4003ToEClass_2001OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -1056,9 +1056,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEClass_2001OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEClass_2001OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -1066,9 +1066,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4003ToEClass_3004OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4003ToEClass_3004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -1107,9 +1107,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEClassESuperTypes_4004ToEClass_2001OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEClassESuperTypes_4004ToEClass_2001OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClassEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -1117,9 +1117,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4003ToEDataType_3006OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4003ToEDataType_3006OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EDataTypeEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EDataTypeEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -1127,9 +1127,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEOperation_3002OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEOperation_3002OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EOperationEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EOperationEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -1147,9 +1147,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEDataType_3006OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEDataType_3006OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EDataTypeEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EDataTypeEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -1199,9 +1199,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEEnum_3007OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEEnum_3007OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EEnumEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EEnumEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -1290,9 +1290,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEPackage_3005OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEPackage_3005OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EPackage3EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EPackage3EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -1310,9 +1310,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEAnnotationReferences_4001ToEAttribute_3001OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEAnnotationReferences_4001ToEAttribute_3001OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EAttributeEditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EAttributeEditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
@@ -1341,9 +1341,9 @@ public class EcoreNavigatorContentProvider implements ICommonContentProvider {
/**
* @generated
*/
- private Collection getEReference_4002ToEClass_3004OutTarget(View view, EcoreAbstractNavigatorItem parent) {
+ private Collection getEReference_4002ToEClass_3004OutTarget(Edge edge, EcoreAbstractNavigatorItem parent) {
Collection result = new ArrayList();
- Collection connectedViews = getLinksTargetByType(Collections.singleton(view), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
+ Collection connectedViews = getLinksTargetByType(Collections.singleton(edge), EcoreVisualIDRegistry.getType(EClass2EditPart.VISUAL_ID));
createNavigatorItems(connectedViews, parent, result);
return result;
}
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 820331085..85cefa97d 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
@@ -59,147 +59,152 @@ public class NavigatorContentProviderGenerator
protected final String TEXT_39 = ".VISUAL_ID), ";
protected final String TEXT_40 = ")";
protected final String TEXT_41 = ".EMPTY_LIST";
- protected final String TEXT_42 = "(navigatorItem.getView(), ";
- protected final String TEXT_43 = ")";
- protected final String TEXT_44 = ".EMPTY_LIST";
- protected final String TEXT_45 = ");";
- protected final String TEXT_46 = NL + "\t\t\t\tif (!";
- protected final String TEXT_47 = ".isEmpty()) {";
- protected final String TEXT_48 = NL + "\t\t\t\tresult.add(";
- protected final String TEXT_49 = ");";
- protected final String TEXT_50 = NL + "\t\t\t\t}";
- protected final String TEXT_51 = NL + "\t\t\t\treturn result.toArray();" + NL + "\t\t\t\t}";
- protected final String TEXT_52 = NL + "\t\t\t\t}" + NL + "\t\t\t} else if (abstractNavigatorItem instanceof ";
- protected final String TEXT_53 = ") {" + NL + "\t\t\t\t";
- protected final String TEXT_54 = " group = (";
- protected final String TEXT_55 = ") parentElement;" + NL + "\t\t\t\treturn group.getChildren();" + NL + "\t\t\t}" + NL + " \t} else if (parentElement instanceof ";
- protected final String TEXT_56 = ") {" + NL + "\t \t";
- protected final String TEXT_57 = " file = (";
- protected final String TEXT_58 = ") parentElement;" + NL + "\t\t\t";
- protected final String TEXT_59 = " editingDomain = (";
- protected final String TEXT_60 = ") ";
- protected final String TEXT_61 = ".INSTANCE.createEditingDomain();" + NL + "\t\t\teditingDomain.setResourceToReadOnlyMap(new ";
- protected final String TEXT_62 = "() {" + 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_63 = " resourceSet = editingDomain.getResourceSet();" + NL + "\t\t\t" + NL + "\t\t\t";
- protected final String TEXT_64 = " fileURI = ";
- protected final String TEXT_65 = ".createPlatformResourceURI(file.getFullPath().toString(), true);" + NL + "\t\t\t";
- protected final String TEXT_66 = " resource = resourceSet.getResource(fileURI, true);" + NL + "\t\t\t" + NL + "\t\t\t";
- protected final String TEXT_67 = " result = new ";
- protected final String TEXT_68 = "();";
- protected final String TEXT_69 = NL + "\t\t\t";
- protected final String TEXT_70 = " ";
- protected final String TEXT_71 = " = new ";
- protected final String TEXT_72 = "(\"";
- protected final String TEXT_73 = "\", \"";
- protected final String TEXT_74 = "\", ";
- protected final String TEXT_75 = ".MODEL_ID, file);";
- protected final String TEXT_76 = NL + "\t\t\t";
- protected final String TEXT_77 = ".addChildren(";
- protected final String TEXT_78 = NL + "\t\t\tresult.addAll(";
- protected final String TEXT_79 = "getViewByType(resource.getContents(), ";
- protected final String TEXT_80 = ".MODEL_ID, ";
- protected final String TEXT_81 = ")";
- protected final String TEXT_82 = ".EMPTY_LIST";
- protected final String TEXT_83 = ".EMPTY_LIST";
- protected final String TEXT_84 = ");";
- protected final String TEXT_85 = NL + "\t\t\tif (!";
- protected final String TEXT_86 = ".isEmpty()) {";
- protected final String TEXT_87 = NL + "\t\t\tresult.add(";
- protected final String TEXT_88 = ");";
- protected final String TEXT_89 = NL + "\t\t\t}";
- protected final String TEXT_90 = 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_91 = ") {" + NL + " \t\t";
- protected final String TEXT_92 = " abstractNavigatorItem = (";
- protected final String TEXT_93 = ") element;" + NL + "\t\t\tif (!";
- protected final String TEXT_94 = ".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_95 = " || getChildren(element).length > 0;" + NL + " }" + NL + " " + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void init(";
- protected final String TEXT_96 = " aConfig) {" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void restoreState(";
- protected final String TEXT_97 = " aMemento) {" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void saveState(";
- protected final String TEXT_98 = " aMemento) {" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
- protected final String TEXT_99 = " getViewByType(";
- protected final String TEXT_100 = " childViews, String type, Object parent) {" + NL + "\t\t";
- protected final String TEXT_101 = " result = new ";
- protected final String TEXT_102 = "();" + NL + "\t\tfor (";
- protected final String TEXT_103 = " it = childViews.iterator(); it.hasNext();) {" + NL + "\t\t\tObject next = it.next();" + NL + "\t\t\tif (false == next instanceof ";
- protected final String TEXT_104 = ") {" + NL + "\t\t\t\tcontinue;" + NL + "\t\t\t}" + NL + "\t\t\t";
- protected final String TEXT_105 = " nextView = (";
- protected final String TEXT_106 = ") next;" + NL + "\t\t\tif (type.equals(nextView.getType())) {" + NL + "\t\t\t\tresult.add(new ";
- protected final String TEXT_107 = "(nextView, parent));" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn result;" + NL + "\t}" + NL + "\t";
- protected final String TEXT_108 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
- protected final String TEXT_109 = " ";
- protected final String TEXT_110 = "(";
- protected final String TEXT_111 = " view, ";
- protected final String TEXT_112 = " parent) {" + NL + "\t\t";
- protected final String TEXT_113 = " result = new ";
- protected final String TEXT_114 = "();";
- protected final String TEXT_115 = NL + "\t\t";
- protected final String TEXT_116 = " connectedViews = ";
- protected final String TEXT_117 = NL + "\t\tconnectedViews = ";
- protected final String TEXT_118 = "getLinksTargetByType";
- protected final String TEXT_119 = "getLinksSourceByType";
- protected final String TEXT_120 = "getOutgoingLinksByType";
- protected final String TEXT_121 = "getIncomingLinksByType";
- protected final String TEXT_122 = "getChildrenByType";
- protected final String TEXT_123 = "(";
- protected final String TEXT_124 = ".singleton(view)";
- protected final String TEXT_125 = "connectedViews";
- protected final String TEXT_126 = ", ";
- protected final String TEXT_127 = ".getType(";
- protected final String TEXT_128 = ".VISUAL_ID));";
- protected final String TEXT_129 = NL + "\t\tcreateNavigatorItems(connectedViews, parent, result);";
- protected final String TEXT_130 = NL + "\t\treturn result;" + NL + "\t}";
- protected final String TEXT_131 = NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t private ";
- protected final String TEXT_132 = " getLinksSourceByType(";
- protected final String TEXT_133 = " edges, String type) {" + NL + "\t\t";
- protected final String TEXT_134 = " result = new ";
- protected final String TEXT_135 = "();" + NL + "\t \tfor (";
- protected final String TEXT_136 = " it = edges.iterator(); it.hasNext();) {" + NL + "\t \t\t";
- protected final String TEXT_137 = " nextEdge = (";
- protected final String TEXT_138 = ") it.next();" + NL + "\t \t\t";
- protected final String TEXT_139 = " 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_140 = " getLinksTargetByType(";
- protected final String TEXT_141 = " edges, String type) {" + NL + "\t\t";
- protected final String TEXT_142 = " result = new ";
- protected final String TEXT_143 = "();" + NL + "\t \tfor (";
- protected final String TEXT_144 = " it = edges.iterator(); it.hasNext();) {" + NL + "\t \t\t";
- protected final String TEXT_145 = " nextEdge = (";
- protected final String TEXT_146 = ") it.next();" + NL + "\t \t\t";
- protected final String TEXT_147 = " 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_148 = " getOutgoingLinksByType(";
- protected final String TEXT_149 = " nodes, String type) {" + NL + "\t\t";
- protected final String TEXT_150 = " result = new ";
- protected final String TEXT_151 = "();" + NL + "\t \tfor (";
- protected final String TEXT_152 = " it = nodes.iterator(); it.hasNext();) {" + NL + "\t \t\t";
- protected final String TEXT_153 = " nextNode = (";
- protected final String TEXT_154 = ") 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_155 = " getIncomingLinksByType(";
- protected final String TEXT_156 = " nodes, String type) {" + NL + "\t\t";
- protected final String TEXT_157 = " result = new ";
- protected final String TEXT_158 = "();" + NL + "\t \tfor (";
- protected final String TEXT_159 = " it = nodes.iterator(); it.hasNext();) {" + NL + "\t \t\t";
- protected final String TEXT_160 = " nextNode = (";
- protected final String TEXT_161 = ") 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_162 = " getChildrenByType(";
- protected final String TEXT_163 = " nodes, String type) {" + NL + "\t\t";
- protected final String TEXT_164 = " result = new ";
- protected final String TEXT_165 = "();" + NL + "\t \tfor (";
- protected final String TEXT_166 = " it = nodes.iterator(); it.hasNext();) {" + NL + "\t \t\t";
- protected final String TEXT_167 = " nextNode = (";
- protected final String TEXT_168 = ") 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_169 = " selectViewsByType(";
- protected final String TEXT_170 = " views, String type) {" + NL + "\t\t";
- protected final String TEXT_171 = " result = new ";
- protected final String TEXT_172 = "();" + NL + "\t\tfor (";
- protected final String TEXT_173 = " it = views.iterator(); it.hasNext();) {" + NL + "\t\t\t";
- protected final String TEXT_174 = " nextView = (";
- protected final String TEXT_175 = ") 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_176 = " views, ";
- protected final String TEXT_177 = " parent, ";
- protected final String TEXT_178 = " result) {" + NL + "\t\tfor (";
- protected final String TEXT_179 = " it = views.iterator(); it.hasNext();) {" + NL + "\t\t\tresult.add(new ";
- protected final String TEXT_180 = "((";
- protected final String TEXT_181 = ") it.next(), parent));" + NL + "\t\t}" + NL + "\t}" + NL + "\t" + NL + "}";
- protected final String TEXT_182 = NL;
+ 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;
public String generate(Object argument)
{
@@ -343,69 +348,75 @@ for (Iterator containers = commonBaseElements.iterator(); containers.hasNext();)
stringBuffer.append(getterName);
stringBuffer.append(TEXT_42);
- stringBuffer.append(parentVariable);
+ if (nextCommonBase instanceof GenLink) {
stringBuffer.append(TEXT_43);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
+ stringBuffer.append(TEXT_44);
+ }
+ stringBuffer.append(TEXT_45);
+ 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_44);
+ stringBuffer.append(TEXT_47);
}
- stringBuffer.append(TEXT_45);
+ stringBuffer.append(TEXT_48);
}
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_46);
+ stringBuffer.append(TEXT_49);
stringBuffer.append(nextGroupKey);
- stringBuffer.append(TEXT_47);
+ stringBuffer.append(TEXT_50);
}
- stringBuffer.append(TEXT_48);
+ stringBuffer.append(TEXT_51);
stringBuffer.append(nextGroupKey);
- stringBuffer.append(TEXT_49);
+ stringBuffer.append(TEXT_52);
if (nextReference.isHideIfEmpty()) {
- stringBuffer.append(TEXT_50);
+ stringBuffer.append(TEXT_53);
}
}
- stringBuffer.append(TEXT_51);
+ stringBuffer.append(TEXT_54);
}
- stringBuffer.append(TEXT_52);
+ stringBuffer.append(TEXT_55);
stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorGroupQualifiedClassName()));
- stringBuffer.append(TEXT_53);
+ stringBuffer.append(TEXT_56);
stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorGroupQualifiedClassName()));
- stringBuffer.append(TEXT_54);
+ stringBuffer.append(TEXT_57);
stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorGroupQualifiedClassName()));
- stringBuffer.append(TEXT_55);
+ stringBuffer.append(TEXT_58);
stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile"));
- stringBuffer.append(TEXT_56);
+ stringBuffer.append(TEXT_59);
stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile"));
- stringBuffer.append(TEXT_57);
+ stringBuffer.append(TEXT_60);
stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile"));
- stringBuffer.append(TEXT_58);
+ stringBuffer.append(TEXT_61);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain"));
- stringBuffer.append(TEXT_59);
+ stringBuffer.append(TEXT_62);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain"));
- stringBuffer.append(TEXT_60);
+ stringBuffer.append(TEXT_63);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory"));
- stringBuffer.append(TEXT_61);
+ stringBuffer.append(TEXT_64);
stringBuffer.append(importManager.getImportedName("java.util.HashMap"));
- stringBuffer.append(TEXT_62);
+ stringBuffer.append(TEXT_65);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.resource.ResourceSet"));
- stringBuffer.append(TEXT_63);
+ stringBuffer.append(TEXT_66);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI"));
- stringBuffer.append(TEXT_64);
+ stringBuffer.append(TEXT_67);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI"));
- stringBuffer.append(TEXT_65);
+ stringBuffer.append(TEXT_68);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.resource.Resource"));
- stringBuffer.append(TEXT_66);
+ stringBuffer.append(TEXT_69);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_67);
+ stringBuffer.append(TEXT_70);
stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_68);
+ stringBuffer.append(TEXT_71);
Map createdDiagramGroups = new HashMap();
for (Iterator it = genNavigator.getChildReferencesFrom(null).iterator(); it.hasNext();) {
GenNavigatorChildReference nextReference = (GenNavigatorChildReference) it.next();
@@ -414,124 +425,135 @@ for (Iterator it = genNavigator.getChildReferencesFrom(null).iterator(); it.hasN
parentVariable = CodeGenUtil.validJavaIdentifier(nextReference.getGroupName());
if (!createdDiagramGroups.containsKey(parentVariable)) {
createdDiagramGroups.put(parentVariable, nextReference);
- stringBuffer.append(TEXT_69);
+ stringBuffer.append(TEXT_72);
stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorGroupQualifiedClassName()));
- stringBuffer.append(TEXT_70);
+ stringBuffer.append(TEXT_73);
stringBuffer.append(parentVariable);
- stringBuffer.append(TEXT_71);
+ stringBuffer.append(TEXT_74);
stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorGroupQualifiedClassName()));
- stringBuffer.append(TEXT_72);
+ stringBuffer.append(TEXT_75);
stringBuffer.append(nextReference.getGroupName());
- stringBuffer.append(TEXT_73);
+ stringBuffer.append(TEXT_76);
stringBuffer.append(nextReference.getGroupIcon());
- stringBuffer.append(TEXT_74);
+ stringBuffer.append(TEXT_77);
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_75);
+ stringBuffer.append(TEXT_78);
}
- stringBuffer.append(TEXT_76);
+ stringBuffer.append(TEXT_79);
stringBuffer.append(parentVariable);
- stringBuffer.append(TEXT_77);
+ stringBuffer.append(TEXT_80);
} else {
parentVariable = "file";
- stringBuffer.append(TEXT_78);
+ stringBuffer.append(TEXT_81);
}
if (nextReference.getReferenceType() == GenNavigatorReferenceType.DEFAULT_LITERAL) {
if (nextReference.getChild() instanceof GenDiagram) {
- stringBuffer.append(TEXT_79);
+ stringBuffer.append(TEXT_82);
stringBuffer.append(importManager.getImportedName(nextReference.getChild().getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_80);
+ stringBuffer.append(TEXT_83);
stringBuffer.append(parentVariable);
- stringBuffer.append(TEXT_81);
+ stringBuffer.append(TEXT_84);
} else {
/* Any other "Default" child refrences are not supported for resource */
stringBuffer.append(importManager.getImportedName("java.util.Collections"));
- stringBuffer.append(TEXT_82);
+ stringBuffer.append(TEXT_85);
}
} else {
/* Any other ReferenceTypes are not supported for the resource */
stringBuffer.append(importManager.getImportedName("java.util.Collections"));
- stringBuffer.append(TEXT_83);
+ stringBuffer.append(TEXT_86);
}
- stringBuffer.append(TEXT_84);
+ stringBuffer.append(TEXT_87);
}
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_85);
+ stringBuffer.append(TEXT_88);
stringBuffer.append(groupNameKey);
- stringBuffer.append(TEXT_86);
+ stringBuffer.append(TEXT_89);
}
- stringBuffer.append(TEXT_87);
+ stringBuffer.append(TEXT_90);
stringBuffer.append(groupNameKey);
- stringBuffer.append(TEXT_88);
+ stringBuffer.append(TEXT_91);
if (nextReference.isHideIfEmpty()) {
- stringBuffer.append(TEXT_89);
+ stringBuffer.append(TEXT_92);
}
}
- stringBuffer.append(TEXT_90);
+ stringBuffer.append(TEXT_93);
stringBuffer.append(importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName()));
- stringBuffer.append(TEXT_91);
+ stringBuffer.append(TEXT_94);
stringBuffer.append(importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName()));
- stringBuffer.append(TEXT_92);
+ stringBuffer.append(TEXT_95);
stringBuffer.append(importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName()));
- stringBuffer.append(TEXT_93);
+ stringBuffer.append(TEXT_96);
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_94);
+ stringBuffer.append(TEXT_97);
stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile"));
- stringBuffer.append(TEXT_95);
+ stringBuffer.append(TEXT_98);
stringBuffer.append(importManager.getImportedName("org.eclipse.ui.navigator.ICommonContentExtensionSite"));
- stringBuffer.append(TEXT_96);
+ stringBuffer.append(TEXT_99);
stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IMemento"));
- stringBuffer.append(TEXT_97);
+ stringBuffer.append(TEXT_100);
stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IMemento"));
- stringBuffer.append(TEXT_98);
+ stringBuffer.append(TEXT_101);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_99);
+ stringBuffer.append(TEXT_102);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_100);
+ stringBuffer.append(TEXT_103);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_101);
+ stringBuffer.append(TEXT_104);
stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_102);
+ stringBuffer.append(TEXT_105);
stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_103);
+ stringBuffer.append(TEXT_106);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_104);
+ stringBuffer.append(TEXT_107);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_105);
+ stringBuffer.append(TEXT_108);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_106);
+ stringBuffer.append(TEXT_109);
stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorItemQualifiedClassName()));
- stringBuffer.append(TEXT_107);
+ stringBuffer.append(TEXT_110);
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 parameterClassFQName;
+ String parameterName;
+ if (childReference.getParent() instanceof GenLink) {
+ parameterClassFQName = "org.eclipse.gmf.runtime.notation.Edge";
+ parameterName = "edge";
+ } else {
+ parameterClassFQName = "org.eclipse.gmf.runtime.notation.View";
+ parameterName = "view";
+ }
List<List<GenCommonBase>> paths = graphAnalyzer.getConnectionPaths(childReference);
- stringBuffer.append(TEXT_108);
+ stringBuffer.append(TEXT_111);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_109);
+ stringBuffer.append(TEXT_112);
stringBuffer.append((String) nextEntry.getKey());
- stringBuffer.append(TEXT_110);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_111);
+ stringBuffer.append(TEXT_113);
+ stringBuffer.append(importManager.getImportedName(parameterClassFQName));
+ stringBuffer.append(TEXT_114);
+ stringBuffer.append(parameterName);
+ stringBuffer.append(TEXT_115);
stringBuffer.append(importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName()));
- stringBuffer.append(TEXT_112);
+ stringBuffer.append(TEXT_116);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_113);
+ stringBuffer.append(TEXT_117);
stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_114);
+ stringBuffer.append(TEXT_118);
boolean connectedViewsDeclared = false;
for (List<GenCommonBase> nextPath : paths) {
for (int i = 0; i < nextPath.size() - 1; i++) {
@@ -539,164 +561,166 @@ for (Iterator it = getter2ReferenceMap.entrySet().iterator(); it.hasNext();) {
GenCommonBase nextPathSegment = nextPath.get(i + 1);
if (!connectedViewsDeclared) {
connectedViewsDeclared = true;
- stringBuffer.append(TEXT_115);
+ stringBuffer.append(TEXT_119);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_116);
+ stringBuffer.append(TEXT_120);
}else {
- stringBuffer.append(TEXT_117);
+ stringBuffer.append(TEXT_121);
}
if (currentPathSegment instanceof GenLink) {
if (childReference.getReferenceType() == GenNavigatorReferenceType.OUT_TAGET_LITERAL) {
- stringBuffer.append(TEXT_118);
+ stringBuffer.append(TEXT_122);
} else { /*childReference.getReferenceType() == GenNavigatorReferenceType.IN_SOURCE_LITERAL*/
- stringBuffer.append(TEXT_119);
+ stringBuffer.append(TEXT_123);
}
} else {
if (childReference.getReferenceType() == GenNavigatorReferenceType.OUT_TAGET_LITERAL) {
- stringBuffer.append(TEXT_120);
+ stringBuffer.append(TEXT_124);
} else if (childReference.getReferenceType() == GenNavigatorReferenceType.IN_SOURCE_LITERAL) {
- stringBuffer.append(TEXT_121);
+ stringBuffer.append(TEXT_125);
} else { /*childReference.getReferenceType() == GenNavigatorReferenceType.CHILDREN_LITERAL*/
- stringBuffer.append(TEXT_122);
+ stringBuffer.append(TEXT_126);
}
}
- stringBuffer.append(TEXT_123);
+ stringBuffer.append(TEXT_127);
if (i == 0) {
stringBuffer.append(importManager.getImportedName("java.util.Collections"));
- stringBuffer.append(TEXT_124);
+ stringBuffer.append(TEXT_128);
+ stringBuffer.append(parameterName);
+ stringBuffer.append(TEXT_129);
} else {
- stringBuffer.append(TEXT_125);
+ stringBuffer.append(TEXT_130);
}
- stringBuffer.append(TEXT_126);
- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
- stringBuffer.append(TEXT_127);
- stringBuffer.append(importManager.getImportedName(nextPathSegment.getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_128);
- }
- stringBuffer.append(TEXT_129);
- }
- stringBuffer.append(TEXT_130);
- }
stringBuffer.append(TEXT_131);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_132);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(importManager.getImportedName(nextPathSegment.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_133);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ }
stringBuffer.append(TEXT_134);
- stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
+ }
stringBuffer.append(TEXT_135);
- stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
+ }
stringBuffer.append(TEXT_136);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_137);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_138);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_139);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(TEXT_139);
+ stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
stringBuffer.append(TEXT_140);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
stringBuffer.append(TEXT_141);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
stringBuffer.append(TEXT_142);
- stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
stringBuffer.append(TEXT_143);
- stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
stringBuffer.append(TEXT_144);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_145);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_146);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_147);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(TEXT_147);
+ stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
stringBuffer.append(TEXT_148);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
stringBuffer.append(TEXT_149);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
stringBuffer.append(TEXT_150);
- stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
stringBuffer.append(TEXT_151);
- stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_152);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(TEXT_152);
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_153);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_154);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_155);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
stringBuffer.append(TEXT_156);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
stringBuffer.append(TEXT_157);
- stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
stringBuffer.append(TEXT_158);
- stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_159);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(TEXT_159);
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_160);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_161);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_162);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
stringBuffer.append(TEXT_163);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
stringBuffer.append(TEXT_164);
- stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
stringBuffer.append(TEXT_165);
- stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_166);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(TEXT_166);
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_167);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_168);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_169);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
stringBuffer.append(TEXT_170);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
stringBuffer.append(TEXT_171);
- stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
stringBuffer.append(TEXT_172);
- stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_173);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(TEXT_173);
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_174);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_175);
stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_176);
- stringBuffer.append(importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
stringBuffer.append(TEXT_177);
- stringBuffer.append(importManager.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_178);
stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
+ stringBuffer.append(TEXT_178);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
stringBuffer.append(TEXT_179);
- stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorItemQualifiedClassName()));
- stringBuffer.append(TEXT_180);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(TEXT_180);
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
stringBuffer.append(TEXT_181);
- importManager.emitSortedImports();
+ stringBuffer.append(importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName()));
stringBuffer.append(TEXT_182);
+ stringBuffer.append(importManager.getImportedName("java.util.Collection"));
+ stringBuffer.append(TEXT_183);
+ stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
+ stringBuffer.append(TEXT_184);
+ stringBuffer.append(importManager.getImportedName(genNavigator.getNavigatorItemQualifiedClassName()));
+ stringBuffer.append(TEXT_185);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(TEXT_186);
+ importManager.emitSortedImports();
+ stringBuffer.append(TEXT_187);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorContentProvider.javajet b/plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorContentProvider.javajet
index 75bc009d4..7b5783849 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorContentProvider.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/navigator/NavigatorContentProvider.javajet
@@ -104,7 +104,7 @@ for (Iterator containers = commonBaseElements.iterator(); containers.hasNext();)
getterName = getterNameBase + "_" + i;
}
getter2ReferenceMap.put(getterName, nextReference);
- %><%=getterName%>(navigatorItem.getView(), <%=parentVariable%>)<%
+ %><%=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<%
@@ -253,12 +253,21 @@ for (Iterator it = createdDiagramGroups.keySet().iterator(); it.hasNext();) {
for (Iterator it = getter2ReferenceMap.entrySet().iterator(); it.hasNext();) {
Map.Entry nextEntry = (Map.Entry) it.next();
GenNavigatorChildReference childReference = (GenNavigatorChildReference) nextEntry.getValue();
+ String parameterClassFQName;
+ String parameterName;
+ if (childReference.getParent() instanceof GenLink) {
+ parameterClassFQName = "org.eclipse.gmf.runtime.notation.Edge";
+ parameterName = "edge";
+ } else {
+ parameterClassFQName = "org.eclipse.gmf.runtime.notation.View";
+ parameterName = "view";
+ }
List<List<GenCommonBase>> paths = graphAnalyzer.getConnectionPaths(childReference);%>
/**
* @generated
*/
- private <%=importManager.getImportedName("java.util.Collection")%> <%=(String) nextEntry.getKey()%>(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")%> view, <%=importManager.getImportedName(genNavigator.getAbstractNavigatorItemQualifiedClassName())%> parent) {
+ private <%=importManager.getImportedName("java.util.Collection")%> <%=(String) nextEntry.getKey()%>(<%=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) {
@@ -287,7 +296,7 @@ for (Iterator it = getter2ReferenceMap.entrySet().iterator(); it.hasNext();) {
}
}%>(<%
if (i == 0) {
- %><%=importManager.getImportedName("java.util.Collections")%>.singleton(view)<%
+ %><%=importManager.getImportedName("java.util.Collections")%>.singleton(<%=parameterName%>)<%
} else {
%>connectedViews<%
}%>, <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(nextPathSegment.getEditPartQualifiedClassName())%>.VISUAL_ID));

Back to the top