Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2015-03-25 07:48:58 +0000
committerAnsgar Radermacher2015-03-25 07:49:39 +0000
commitf56c059eebc4f1e006b78b7042f9f1c2fef033cf (patch)
tree084e61f3f50503543158e795fac909680687305c /extraplugins/codegen
parentd27f528c9faa0fa974639fb788604236b11be838 (diff)
downloadorg.eclipse.papyrus-f56c059eebc4f1e006b78b7042f9f1c2fef033cf.tar.gz
org.eclipse.papyrus-f56c059eebc4f1e006b78b7042f9f1c2fef033cf.tar.xz
org.eclipse.papyrus-f56c059eebc4f1e006b78b7042f9f1c2fef033cf.zip
463003 - [C++ codegen] regressions related to templates and initializers (commit also changed GenUtils)
Diffstat (limited to 'extraplugins/codegen')
-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