Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Noyrit2016-04-18 08:23:09 +0000
committerGerrit Code Review @ Eclipse.org2016-04-19 13:10:07 +0000
commit74277e4e464813a72120e2f3e1c320eca04a51f2 (patch)
tree3a71f39f7d7a1c0dad7d8de281f7cb9d7fd531f2 /plugins/developer
parent4ea6b237f5db0dc206ce1f239c9bd93d38126aa5 (diff)
downloadorg.eclipse.papyrus-74277e4e464813a72120e2f3e1c320eca04a51f2.tar.gz
org.eclipse.papyrus-74277e4e464813a72120e2f3e1c320eca04a51f2.tar.xz
org.eclipse.papyrus-74277e4e464813a72120e2f3e1c320eca04a51f2.zip
Bug 491883 - Remove the ExtendedTypes framework
Diffstat (limited to 'plugins/developer')
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xtend43
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/editpolicies/linkCommands.xtend16
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/providers/ViewProvider.xtend18
3 files changed, 6 insertions, 71 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xtend
index 63b4d9e479b..5cbb6d18b97 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xtend
@@ -129,11 +129,6 @@ override def addDestroyShortcutsCommand(GenDiagram it) '''
«getCreateCommand(it)»
- // RS: add code for extended types
- «getCreateExtendedTypeCommand(it)»
- «getExtendedStartCreateRelationshipCommand(it)»
- «getExtendedCompleteCreateRelationshipCommand(it)»
- // RS: End of add code for extended types
«getCreateSemanticServiceEditCommand(it)»
«getSetCommand(it)»
@@ -206,44 +201,6 @@ protected org.eclipse.gef.commands.Command getCreateRelationshipCommand(org.ecli
}
'''
- def getCreateExtendedTypeCommand(GenDiagram it) '''
-«generatedMemberComment»
- protected org.eclipse.gef.commands.Command getExtendedTypeCreationCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest request, org.eclipse.gmf.runtime.emf.type.core.IElementType requestElementType) {
- org.eclipse.papyrus.infra.services.edit.service.IElementEditService provider = org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils.getCommandProvider(request.getContainer());
- if(provider == null) {
- return org.eclipse.gef.commands.UnexecutableCommand.INSTANCE;
- }
- // Retrieve create command from the Element Edit service
- org.eclipse.gmf.runtime.common.core.command.ICommand createGMFCommand = provider.getEditCommand(request);
- return getGEFWrapper(createGMFCommand);
- }
-'''
-
- def getExtendedStartCreateRelationshipCommand(GenDiagram it) '''
-«generatedMemberComment»
- protected org.eclipse.gef.commands.Command getExtendedStartCreateRelationshipCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest request, org.eclipse.gmf.runtime.emf.type.core.IElementType requestElementType) {
- org.eclipse.papyrus.infra.services.edit.service.IElementEditService provider = org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils.getCommandProvider(requestElementType);
- if(provider == null) {
- return org.eclipse.gef.commands.UnexecutableCommand.INSTANCE;
- }
- // Retrieve create command from the Element Edit service
- org.eclipse.gmf.runtime.common.core.command.ICommand createGMFCommand = provider.getEditCommand(request);
- return getGEFWrapper(createGMFCommand);
-}
-'''
-
- def getExtendedCompleteCreateRelationshipCommand(GenDiagram it) '''
-«generatedMemberComment»
- protected org.eclipse.gef.commands.Command getExtendedCompleteCreateRelationshipCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest request, org.eclipse.gmf.runtime.emf.type.core.IElementType requestElementType) {
- org.eclipse.papyrus.infra.services.edit.service.IElementEditService provider = org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils.getCommandProvider(requestElementType);
- if(provider == null) {
- return org.eclipse.gef.commands.UnexecutableCommand.INSTANCE;
- }
- // Retrieve create command from the Element Edit service
- org.eclipse.gmf.runtime.common.core.command.ICommand createGMFCommand = provider.getEditCommand(request);
- return getGEFWrapper(createGMFCommand);
-}
-'''
override getMoveCommand(GenDiagram it) '''
«generatedMemberComment()»
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/editpolicies/linkCommands.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/editpolicies/linkCommands.xtend
index f4895b3a4d6..7141f4fb939 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/editpolicies/linkCommands.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/diagram/editpolicies/linkCommands.xtend
@@ -78,9 +78,6 @@ import xpt.providers.ElementTypes
return null;
}
org.eclipse.gmf.runtime.emf.type.core.IElementType baseElementType = requestElementType;
- «IF aspectsUtils_qvto.containsCreateStartLinkCommand(it)»
- boolean isExtendedType = true;
- «ENDIF»
«FOR l : getAllPotentialLinks(it)»
«startLinkCommands(l, it)»
@@ -96,9 +93,6 @@ import xpt.providers.ElementTypes
return null;
}
org.eclipse.gmf.runtime.emf.type.core.IElementType baseElementType = requestElementType;
- «IF aspectsUtils_qvto.containsCreateCompleteLinkCommand(it)»
- boolean isExtendedType = true;
- «ENDIF»
«FOR l : getAllPotentialLinks(it)»
«completeLinkCommands(l, it)»
@@ -110,9 +104,7 @@ import xpt.providers.ElementTypes
override startLinkCommands(GenLink it, GenLinkEnd linkEnd) '''
if («xptElementTypes.accessElementType(it)» == baseElementType) {
«IF createStartLinkCommand(it, linkEnd)»
- if(isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, requestElementType);
- }
+
return getGEFWrapper(new «xptCreateLinkCommand.qualifiedClassName(it)»(req,
«IF createStartIncomingLinkCommand(it, linkEnd)»
req.getTarget(), req.getSource()
@@ -123,15 +115,12 @@ import xpt.providers.ElementTypes
«ELSE»
return null;
«ENDIF»
- }
'''
override completeLinkCommands(GenLink it, GenLinkEnd linkEnd) '''
if («xptElementTypes.accessElementType(it)» == baseElementType) {
«IF createCompleteLinkCommand(it, linkEnd)»
- if(isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, requestElementType);
- }
+
return getGEFWrapper(new «xptCreateLinkCommand.qualifiedClassName(it)»(req,
«IF createCompleteOutgoingLinkCommand(it, linkEnd)»
req.getTarget(), req.getSource()
@@ -142,7 +131,6 @@ import xpt.providers.ElementTypes
«ELSE»
return null;
«ENDIF»
- }
'''
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/providers/ViewProvider.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/providers/ViewProvider.xtend
index 323c3939a94..401cdcf7303 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/providers/ViewProvider.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/providers/ViewProvider.xtend
@@ -197,21 +197,11 @@ import xpt.editor.VisualIDRegistry
«generatedMemberComment»«/* XXX: unlike createNode, we don't check op.containerView() for null here. On purpose? */»
protected boolean provides(org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation op) {
org.eclipse.gmf.runtime.emf.type.core.IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- //RS: add code for extended types creation
- if(elementType instanceof org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType) {
- org.eclipse.gmf.runtime.emf.type.core.IElementType closestNonExtendedType = org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils.getClosestDiagramType(elementType);
- if(!«getElementTypesQualifiedClassName()».isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
- return false; // foreign element type.
- }
- } else {
- if (!«getElementTypesQualifiedClassName()».isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
- return false; // foreign element type
- }
+
+ if (!«getElementTypesQualifiedClassName()».isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
+ return false; // foreign element type
}
- //if (!«getElementTypesQualifiedClassName()».isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
- // return false; // foreign element type
- //}
- // END R.S.
+
String elementTypeHint = ((org.eclipse.gmf.runtime.emf.type.core.IHintedType) elementType).getSemanticHint();
if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) {
return false; // our hint is visual id and must be specified, and it should be the same as in element type

Back to the top