Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ModelingAssistantProvider.xpt')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ModelingAssistantProvider.xpt125
1 files changed, 0 insertions, 125 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ModelingAssistantProvider.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ModelingAssistantProvider.xpt
index 9cd68cbc4..443b79f4f 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ModelingAssistantProvider.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ModelingAssistantProvider.xpt
@@ -13,7 +13,6 @@
«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«EXTENSION xpt::diagram::editparts::Utils»
«EXTENSION xpt::providers::i18n»
«DEFINE ModelingAssistantProvider FOR gmfgen::GenDiagram-»
@@ -24,18 +23,6 @@ package «providersPackageName»;
public class «modelingAssistantProviderClassName»
extends org.eclipse.gmf.runtime.emf.ui.services.modelingassistant.ModelingAssistantProvider {
- «EXPAND getTypesForPopupBar-»
-
- «EXPAND getRelTypesOnSource-»
-
- «EXPAND getRelTypesOnTarget-»
-
- «EXPAND getRelTypesOnSourceAndTarget-»
-
- «EXPAND getTypesForSource-»
-
- «EXPAND getTypesForTarget-»
-
«EXPAND selectExistingElementForSource-»
«EXPAND selectExistingElementForTarget-»
@@ -49,118 +36,6 @@ public class «modelingAssistantProviderClassName»
}
«ENDDEFINE»
-«DEFINE getTypesForPopupBar FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
- public java.util.List getTypesForPopupBar(org.eclipse.core.runtime.IAdaptable host) {
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart editPart =
- (org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) host.getAdapter(
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart.class);
- «FOREACH getAllContainers() AS container-»
- «IF container.getAssistantNodes()->size() > 0-»
- if (editPart instanceof «container.getEditPartQualifiedClassName()») {
- «EXPAND CodeStyle::newGenericInstance('types', 'java.util.ArrayList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType')»(«container.getAssistantNodes()->size()»);
- «FOREACH container.getAssistantNodes()->asSequence() AS node-»
- types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR node»);
- «ENDFOREACH-»
- return types;
- }
- «ENDIF-»
- «ENDFOREACH-»
- return java.util.Collections.EMPTY_LIST;
- }
-«ENDDEFINE»
-
-«DEFINE getRelTypesOnSource FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
- public java.util.List getRelTypesOnSource(org.eclipse.core.runtime.IAdaptable source) {
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart sourceEditPart =
- (org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) source.getAdapter(
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart.class);
- «FOREACH getAllNodes() AS source-»
- «IF getAssistantOutgoingLinks(source)->size() > 0-»
- if (sourceEditPart instanceof «source.getEditPartQualifiedClassName()») {
- return ((«source.getEditPartQualifiedClassName()») sourceEditPart).getMARelTypesOnSource();
- }
- «ENDIF-»
- «ENDFOREACH-»
- return java.util.Collections.EMPTY_LIST;
- }
-«ENDDEFINE»
-
-«DEFINE getRelTypesOnTarget FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
- public java.util.List getRelTypesOnTarget(org.eclipse.core.runtime.IAdaptable target) {
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart targetEditPart =
- (org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) target.getAdapter(
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart.class);
- «FOREACH getAllNodes() AS target-»
- «IF getAssistantIncomingLinks(target)->size() > 0-»
- if (targetEditPart instanceof «target.getEditPartQualifiedClassName()») {
- return ((«target.getEditPartQualifiedClassName()») targetEditPart).getMARelTypesOnTarget();
- }
- «ENDIF-»
- «ENDFOREACH-»
- return java.util.Collections.EMPTY_LIST;
- }
-«ENDDEFINE»
-
-«DEFINE getRelTypesOnSourceAndTarget FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
- public java.util.List getRelTypesOnSourceAndTarget(
- org.eclipse.core.runtime.IAdaptable source, org.eclipse.core.runtime.IAdaptable target) {
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart sourceEditPart =
- (org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) source.getAdapter(
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart.class);
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart targetEditPart =
- (org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) target.getAdapter(
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart.class);
- «FOREACH getAllNodes() AS source-»
- «IF getAssistantOutgoingLinks(source)->size() > 0-»
- if (sourceEditPart instanceof «source.getEditPartQualifiedClassName()») {
- return ((«source.getEditPartQualifiedClassName()») sourceEditPart).getMARelTypesOnSourceAndTarget(targetEditPart);
- }
- «ENDIF-»
- «ENDFOREACH-»
- return java.util.Collections.EMPTY_LIST;
- }
-«ENDDEFINE»
-
-«DEFINE getTypesForSource FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
- public java.util.List getTypesForSource(org.eclipse.core.runtime.IAdaptable target,
- org.eclipse.gmf.runtime.emf.type.core.IElementType relationshipType) {
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart targetEditPart =
- (org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) target.getAdapter(
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart.class);
- «FOREACH getAllNodes() AS target-»
- «IF getAssistantIncomingLinks(target)->size() > 0-»
- if (targetEditPart instanceof «target.getEditPartQualifiedClassName()») {
- return ((«target.getEditPartQualifiedClassName()») targetEditPart).getMATypesForSource(relationshipType);
- }
- «ENDIF-»
- «ENDFOREACH-»
- return java.util.Collections.EMPTY_LIST;
- }
-«ENDDEFINE»
-
-«DEFINE getTypesForTarget FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
- public java.util.List getTypesForTarget(org.eclipse.core.runtime.IAdaptable source,
- org.eclipse.gmf.runtime.emf.type.core.IElementType relationshipType) {
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart sourceEditPart =
- (org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) source.getAdapter(
- org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart.class);
- «FOREACH getAllNodes() AS source-»
- «IF getAssistantOutgoingLinks(source)->size() > 0-»
- if (sourceEditPart instanceof «source.getEditPartQualifiedClassName()») {
- return ((«source.getEditPartQualifiedClassName()») sourceEditPart).getMATypesForTarget(relationshipType);
- }
- «ENDIF-»
- «ENDFOREACH-»
- return java.util.Collections.EMPTY_LIST;
- }
-«ENDDEFINE»
-
«DEFINE selectExistingElementForSource FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.emf.ecore.EObject selectExistingElementForSource(

Back to the top