Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2015-04-03 09:56:55 -0400
committerVincent Lorenzo2015-04-03 09:56:55 -0400
commit8829dea2a25caa7f1d40d7b0e0ce64fd7e207399 (patch)
tree66546a02e087d608b1fcba443fe74346c43e941d
parent9016676769ec03c67e0dcb7c53424ec532cfac45 (diff)
parent2a6afd0b0ba8a3dd4931a5849ff06b7ed64e7d30 (diff)
downloadorg.eclipse.papyrus-8829dea2a25caa7f1d40d7b0e0ce64fd7e207399.tar.gz
org.eclipse.papyrus-8829dea2a25caa7f1d40d7b0e0ce64fd7e207399.tar.xz
org.eclipse.papyrus-8829dea2a25caa7f1d40d7b0e0ce64fd7e207399.zip
Merge branch 'streams/1.0-maintenance' of ssh://git.eclipse.org:29418/papyrus/org.eclipse.papyrus into maintenance
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppClassifierGenerator.java26
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppEnumerations.java8
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppOperations.java3
3 files changed, 26 insertions, 11 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppClassifierGenerator.java b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppClassifierGenerator.java
index 4702d45f6f4..8abd27aafda 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppClassifierGenerator.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppClassifierGenerator.java
@@ -102,9 +102,10 @@ public class CppClassifierGenerator {
_builder.append(_CppIncludeHeader, "");
_builder.newLineIfNotEmpty();
_builder.newLine();
- EList<TemplateBinding> tb = classifier.getTemplateBindings();
+ TemplateBinding tb = GenUtils.getTemplateBinding(classifier);
_builder.newLineIfNotEmpty();
- TemplateBinding templateElement = tb.get(0);
+ EList<Element> _targets = tb.getTargets();
+ Element templateElement = _targets.get(0);
_builder.newLineIfNotEmpty();
org.eclipse.uml2.uml.Package _package_1 = classifier.getPackage();
String _fullPath = GenUtils.getFullPath(_package_1);
@@ -128,14 +129,21 @@ public class CppClassifierGenerator {
Element _owner_1 = templateElement.getOwner();
String _name_2 = ((NamedElement) _owner_1).getName();
_builder.append(_name_2, "");
+ _builder.append("<");
{
- EList<TemplateParameterSubstitution> _parameterSubstitutions = templateElement.getParameterSubstitutions();
+ EList<TemplateParameterSubstitution> _parameterSubstitutions = tb.getParameterSubstitutions();
+ boolean _hasElements = false;
for(final TemplateParameterSubstitution ps : _parameterSubstitutions) {
+ if (!_hasElements) {
+ _hasElements = true;
+ } else {
+ _builder.appendImmediate(", ", "");
+ }
Object _CppTemplateBindingParameter = CppTemplates.CppTemplateBindingParameter(ps);
_builder.append(_CppTemplateBindingParameter, "");
}
}
- _builder.append(" ");
+ _builder.append("> ");
String _name_3 = classifier.getName();
_builder.append(_name_3, "");
_builder.append(";");
@@ -227,7 +235,7 @@ public class CppClassifierGenerator {
_builder.newLine();
_builder.append("/************************************************************/");
_builder.newLine();
- TemplateBinding tb = GenUtils.getTemplateBindings(((org.eclipse.uml2.uml.Class) classifier));
+ TemplateBinding tb = GenUtils.getTemplateBinding(classifier);
_builder.newLineIfNotEmpty();
EList<Element> _targets = tb.getTargets();
Element templateElement = _targets.get(0);
@@ -239,12 +247,18 @@ public class CppClassifierGenerator {
_builder.append("<");
{
EList<TemplateParameterSubstitution> _parameterSubstitutions = tb.getParameterSubstitutions();
+ boolean _hasElements = false;
for(final TemplateParameterSubstitution ps : _parameterSubstitutions) {
+ if (!_hasElements) {
+ _hasElements = true;
+ } else {
+ _builder.appendImmediate(", ", "");
+ }
Object _CppTemplateBindingParameter = CppTemplates.CppTemplateBindingParameter(ps);
_builder.append(_CppTemplateBindingParameter, "");
}
}
- _builder.append(";");
+ _builder.append(">;");
_builder.newLineIfNotEmpty();
_builder.newLine();
String _closeNS = CppGenUtils.closeNS(classifier);
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppEnumerations.java b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppEnumerations.java
index 145f46a900e..269337d8b4e 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppEnumerations.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppEnumerations.java
@@ -24,18 +24,18 @@ import org.eclipse.xtend2.lib.StringConcatenation;
*/
@SuppressWarnings("all")
public class CppEnumerations {
- public static CharSequence CppEnumerationDefinition(final Enumeration enume) {
+ public static CharSequence CppEnumerationDefinition(final Enumeration enumeration) {
StringConcatenation _builder = new StringConcatenation();
- CharSequence _CppElementDoc = CppDocumentation.CppElementDoc(enume);
+ CharSequence _CppElementDoc = CppDocumentation.CppElementDoc(enumeration);
_builder.append(_CppElementDoc, "");
_builder.newLineIfNotEmpty();
_builder.append("enum ");
- String _name = enume.getName();
+ String _name = enumeration.getName();
_builder.append(_name, "");
_builder.append(" {");
_builder.newLineIfNotEmpty();
{
- EList<EnumerationLiteral> _ownedLiterals = enume.getOwnedLiterals();
+ EList<EnumerationLiteral> _ownedLiterals = enumeration.getOwnedLiterals();
for(final EnumerationLiteral ownedLiteral : _ownedLiterals) {
_builder.append("\t");
CharSequence _CppElementDoc_1 = CppDocumentation.CppElementDoc(ownedLiteral);
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppOperations.java b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppOperations.java
index 79d1a53e9ad..7c3384e9339 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppOperations.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/xtend-gen/org/eclipse/papyrus/cpp/codegen/xtend/CppOperations.java
@@ -219,7 +219,8 @@ public class CppOperations {
}
if (_and) {
ConstInit _stereotypeApplication = UMLUtil.<ConstInit>getStereotypeApplication(operation, ConstInit.class);
- _xifexpression = ((ConstInit) _stereotypeApplication).getInitialisation();
+ String _initialisation = _stereotypeApplication.getInitialisation();
+ _xifexpression = (": " + _initialisation);
}
return _xifexpression;
}

Back to the top