Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoracuccuru2012-02-20 08:52:38 +0000
committeracuccuru2012-02-20 08:52:38 +0000
commit78f5e8105430d922ebcb866d194d3b4ed3e82a9e (patch)
tree6cf6a33644368bd645d030e1f59c242be623ad9f /extraplugins/alf
parent4d8a93f97184ec9abc71b2b2cd058fce6796a3bb (diff)
downloadorg.eclipse.papyrus-78f5e8105430d922ebcb866d194d3b4ed3e82a9e.tar.gz
org.eclipse.papyrus-78f5e8105430d922ebcb866d194d3b4ed3e82a9e.tar.xz
org.eclipse.papyrus-78f5e8105430d922ebcb866d194d3b4ed3e82a9e.zip
Removed dependencies to Template Binding Utils
Diffstat (limited to 'extraplugins/alf')
-rw-r--r--extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/SignatureFacade.java40
-rw-r--r--extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/TypeFacade.java18
-rw-r--r--extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/TypeFacadeFactory.java3
3 files changed, 1 insertions, 60 deletions
diff --git a/extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/SignatureFacade.java b/extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/SignatureFacade.java
index de53a815b07..7df4c008993 100644
--- a/extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/SignatureFacade.java
+++ b/extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/SignatureFacade.java
@@ -21,7 +21,6 @@ import java.util.Map;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.alf.alf.InstanceCreationTupleElement;
import org.eclipse.papyrus.alf.alf.QualifiedNameWithBinding;
-import org.eclipse.papyrus.uml.templates.utils.TemplateBindingUtils;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.Classifier;
@@ -306,43 +305,4 @@ public class SignatureFacade {
return false ;
}
- public SignatureFacade bindTemplate(Map<TemplateParameter, ParameterableElement> substitutions) {
- if (this.isATemplate()) {
- TemplateableElement t = (TemplateableElement)this.actualSignatureObject ;
- if (t.getOwnedTemplateSignature().getParameters().size() != substitutions.size()) {
- // Invalid number of template parameter subsitutions
- return null ;
- }
- //Map<Object, EObject> substitutionsMap = new HashMap<Object, EObject>() ;
-
- if (this.isATemplate()) {
- TemplateableElement equivalentBoundElement = null ;
- if (this.actualSignatureObject instanceof Activity) {
- equivalentBoundElement = UMLFactory.eINSTANCE.createActivity() ;
- }
- else if (this.actualSignatureObject instanceof FunctionBehavior) {
- equivalentBoundElement = UMLFactory.eINSTANCE.createFunctionBehavior() ;
- }
- else if (this.actualSignatureObject instanceof StateMachine) {
- equivalentBoundElement = UMLFactory.eINSTANCE.createStateMachine() ;
- }
- else if (this.actualSignatureObject instanceof Interaction) {
- equivalentBoundElement = UMLFactory.eINSTANCE.createInteraction() ;
- }
- else if (this.actualSignatureObject instanceof Operation) {
- equivalentBoundElement = UMLFactory.eINSTANCE.createOperation() ;
- }
- ((NamedElement)equivalentBoundElement).setName(((NamedElement)this.actualSignatureObject).getName()) ;
- org.eclipse.uml2.uml.TemplateBinding generatedTemplateBinding = equivalentBoundElement.createTemplateBinding(((TemplateableElement)this.actualSignatureObject).getOwnedTemplateSignature()) ;
- for (TemplateParameter formal : substitutions.keySet()) {
- TemplateParameterSubstitution tps = generatedTemplateBinding.createParameterSubstitution() ;
- tps.setFormal(formal) ;
- tps.setActual(substitutions.get(formal)) ;
- }
- equivalentBoundElement = (TemplateableElement)new TemplateBindingUtils().getEquivalentBoundElement(equivalentBoundElement) ;
- return SignatureFacadeFactory.eInstance.createSignatureFacade(equivalentBoundElement) ;
- }
- }
- return this ;
- }
}
diff --git a/extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/TypeFacade.java b/extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/TypeFacade.java
index d6eb0258a54..cbcb5f5b3b8 100644
--- a/extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/TypeFacade.java
+++ b/extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/TypeFacade.java
@@ -24,7 +24,6 @@ import org.eclipse.papyrus.alf.alf.SequenceExpansionExpression;
import org.eclipse.papyrus.alf.alf.SuffixExpression;
import org.eclipse.papyrus.alf.alf.TemplateBinding;
import org.eclipse.papyrus.alf.validation.AlfJavaValidator;
-import org.eclipse.papyrus.uml.templates.utils.TemplateBindingUtils;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.ElementImport;
import org.eclipse.uml2.uml.NamedElement;
@@ -179,21 +178,4 @@ public class TypeFacade {
return "" ; // TODO: uncomment when template bindings are supported + this.templateBindingFacade.getLabel() ;
}
- public void bindTemplate(Map<TemplateParameter, ParameterableElement> substitutions) {
- if (this.isATemplate()) {
- Classifier equivalentBoundElement = null ;
- if (this.typeObject instanceof org.eclipse.uml2.uml.Class) {
- equivalentBoundElement = UMLFactory.eINSTANCE.createClass() ;
- equivalentBoundElement.setName(((NamedElement)this.typeObject).getName()) ;
- }
- org.eclipse.uml2.uml.TemplateBinding generatedTemplateBinding = equivalentBoundElement.createTemplateBinding(((TemplateableElement)this.typeObject).getOwnedTemplateSignature()) ;
- for (TemplateParameter formal : substitutions.keySet()) {
- TemplateParameterSubstitution tps = generatedTemplateBinding.createParameterSubstitution() ;
- tps.setFormal(formal) ;
- tps.setActual(substitutions.get(formal)) ;
- }
- this.typeObject = new TemplateBindingUtils().getEquivalentBoundElement(equivalentBoundElement) ;
- }
- }
-
}
diff --git a/extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/TypeFacadeFactory.java b/extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/TypeFacadeFactory.java
index 16639c7535d..21636e1f449 100644
--- a/extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/TypeFacadeFactory.java
+++ b/extraplugins/alf/org.eclipse.papyrus.alf/src/org/eclipse/papyrus/alf/validation/typing/TypeFacadeFactory.java
@@ -36,7 +36,6 @@ import org.eclipse.papyrus.alf.alf.SequenceExpansionExpression;
import org.eclipse.papyrus.alf.alf.SuperInvocationExpression;
import org.eclipse.papyrus.alf.alf.UnqualifiedName;
import org.eclipse.papyrus.alf.scoping.AlfScopeProvider;
-import org.eclipse.papyrus.uml.templates.utils.TemplateBindingUtils;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.ElementImport;
import org.eclipse.uml2.uml.NamedElement;
@@ -380,7 +379,7 @@ public class TypeFacadeFactory {
// actualSubsitutionsMap.put(TemplateBindingUtils.getParameteredElementName(p),
// subsitutionsMap.get(p) ) ;
// }
- boundResolvedClassifier.bindTemplate(substitutionsMap) ;
+ //boundResolvedClassifier.bindTemplate(substitutionsMap) ;
return boundResolvedClassifier;
}

Back to the top