Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2015-03-25 03:48:58 -0400
committerAnsgar Radermacher2015-03-25 03:50:16 -0400
commit8d913cde38d590954e10e05c19906834fd144f3a (patch)
treec852c7bb21f9b3e1c9238cb91437f9a199a6647c
parentb760eb33ebfeede8ddf1d3cce813c53535a9d6c2 (diff)
downloadorg.eclipse.papyrus-8d913cde38d590954e10e05c19906834fd144f3a.tar.gz
org.eclipse.papyrus-8d913cde38d590954e10e05c19906834fd144f3a.tar.xz
org.eclipse.papyrus-8d913cde38d590954e10e05c19906834fd144f3a.zip
463003 - [C++ codegen] regressions related to templates and initializers (commit also changed GenUtils)
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.codegen.base/src/org/eclipse/papyrus/codegen/base/GenUtils.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.codegen.base/src/org/eclipse/papyrus/codegen/base/GenUtils.java b/extraplugins/codegen/org.eclipse.papyrus.codegen.base/src/org/eclipse/papyrus/codegen/base/GenUtils.java
index ffe9402c666..f71c2d7856d 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.codegen.base/src/org/eclipse/papyrus/codegen/base/GenUtils.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.codegen.base/src/org/eclipse/papyrus/codegen/base/GenUtils.java
@@ -23,7 +23,6 @@ import org.eclipse.emf.common.util.UniqueEList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.uml2.uml.Behavior;
-import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Dependency;
@@ -56,14 +55,14 @@ public class GenUtils {
public static final String NL = System.getProperties().getProperty("line.separator"); //$NON-NLS-1$
/**
- * Retrieve template bindings for the class passed as a Parameter
- * only one template binding can exist for an element
+ * Retrieve first template binding from list of template bindings, if
+ * exactly one exists. Return null otherwise.
*
* @param current
* Class on which the template binding is searched
* @return the template binding of current Class
*/
- public static TemplateBinding getTemplateBindings(Class current) {
+ public static TemplateBinding getTemplateBinding(Classifier current) {
TemplateBinding binding = null;
if (current.getTemplateBindings().size() == 1) {
binding = current.getTemplateBindings().get(0);
@@ -382,8 +381,9 @@ public class GenUtils {
* Is a certain stereotype applied?
*
* @param element
+ * a UML element
* @param stereotype
- * fully qualified stereotype name
+ * The class of an element of a static profile
* @return
*/
public static boolean hasStereotype(Element element, java.lang.Class<? extends EObject> clazz) {

Back to the top