Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShuai Li2016-01-20 17:25:15 +0000
committerShuai Li2016-01-20 17:38:30 +0000
commita51b0f1854a935185b89120cf81ec7ca76f0fb3d (patch)
tree902c5c1c12ae4f0fd75dd3a87cd8639d0cba6de3 /extraplugins
parent3bc65aee588cd32e0df8354a79dc60c326358576 (diff)
downloadorg.eclipse.papyrus-a51b0f1854a935185b89120cf81ec7ca76f0fb3d.tar.gz
org.eclipse.papyrus-a51b0f1854a935185b89120cf81ec7ca76f0fb3d.tar.xz
org.eclipse.papyrus-a51b0f1854a935185b89120cf81ec7ca76f0fb3d.zip
Bug 486190 - [Codegen C++] Constants are not up to date
- Update constants with what is generated (hard-coded) - Use constants instead of hard-coded values Signed-off-by: Shuai Li <shuai.li@cea.fr>
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/Constants.java8
-rw-r--r--extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/xtend/CppIncludeUtil.xtend9
2 files changed, 9 insertions, 8 deletions
diff --git a/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/Constants.java b/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/Constants.java
index e1f5d37c6ec..6d92c3de0c6 100644
--- a/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/Constants.java
+++ b/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/Constants.java
@@ -23,13 +23,13 @@ public class Constants {
public static final String includeHFile = "// include associated header file"; //$NON-NLS-1$
- public static final String cppIncPreBodyStart = "// Include from CppInclude stereotype (pre-body)"; //$NON-NLS-1$
+ public static final String cppIncPreBodyStart = "// Include from Include stereotype (pre-body)"; //$NON-NLS-1$
- public static final String cppIncPreBodyEnd = "// End of CppInclude stereotype (pre-body)"; //$NON-NLS-1$
+ public static final String cppIncPreBodyEnd = "// End of Include stereotype (pre-body)"; //$NON-NLS-1$
- public static final String cppIncBodyStart = "// Include from CppInclude declaration (body)"; //$NON-NLS-1$
+ public static final String cppIncBodyStart = "// Include from Include declaration (body)"; //$NON-NLS-1$
- public static final String cppIncBodyEnd = "// End of CppInclude stereotype (body)";//$NON-NLS-1$
+ public static final String cppIncBodyEnd = "// End of Include declaration (body)";//$NON-NLS-1$
public static final String derivedIncludes = "// Derived includes directives";//$NON-NLS-1$
diff --git a/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/xtend/CppIncludeUtil.xtend b/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/xtend/CppIncludeUtil.xtend
index 8d3c4b1f90d..15101adfa5d 100644
--- a/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/xtend/CppIncludeUtil.xtend
+++ b/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/xtend/CppIncludeUtil.xtend
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.cpp.codegen.xtend
import org.eclipse.papyrus.C_Cpp.Include
import org.eclipse.uml2.uml.util.UMLUtil
import org.eclipse.papyrus.codegen.base.GenUtils
+import org.eclipse.papyrus.cpp.codegen.Constants
/**
* @author Önder GÜRCAN (onder.gurcan@cea.fr)
@@ -63,11 +64,11 @@ class CppIncludeUtil {
}
static def constIncludePreBodyStart() '''
- // Include from Include stereotype (pre-body)
+ «Constants.cppIncPreBodyStart»
'''
static def constIncludePreBodyEnd() '''
- // End of Include stereotype (pre-body)
+ «Constants.cppIncPreBodyEnd»
'''
static def CppIncludeBody(NamedElement ne) {
@@ -82,11 +83,11 @@ class CppIncludeUtil {
}
static def constIncludeBodyStart() '''
- // Include from Include declaration (body)
+ «Constants.cppIncBodyStart»
'''
static def constIncludeBodyEnd() '''
- // End of Include declaration (body)
+ «Constants.cppIncPreBodyEnd»
'''
}

Back to the top