Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2015-06-08 13:22:05 +0000
committerAnsgar Radermacher2015-06-08 14:46:40 +0000
commit76ce897bee3eb326a405e1753b6504380a9b6b3c (patch)
treefd4e26ce93eb66d48f7572945ba3066c7e7d0bc8 /extraplugins/qompass-designer
parent4f2ae110d3c199b79801285d4e1946a05006372d (diff)
downloadorg.eclipse.papyrus-76ce897bee3eb326a405e1753b6504380a9b6b3c.tar.gz
org.eclipse.papyrus-76ce897bee3eb326a405e1753b6504380a9b6b3c.tar.xz
org.eclipse.papyrus-76ce897bee3eb326a405e1753b6504380a9b6b3c.zip
464481 - [C++ codegen] Bad change detection in C/C++ view
Diffstat (limited to 'extraplugins/qompass-designer')
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Messages.java4
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/messages.properties2
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/templates/XtendTemplateBinding.java6
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ContainerDialog.java1
-rw-r--r--extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/TracepointConstants.java3
5 files changed, 14 insertions, 2 deletions
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Messages.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Messages.java
index b710703ff17..effcd06a80c 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Messages.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Messages.java
@@ -116,6 +116,10 @@ public class Messages extends NLS {
public static String UpdateUtils_CannotApplyFCMstereo;
+ public static String XtendTemplateBinding_TemplateNotFound;
+
+ public static String XtendTemplateBinding_TemplateResultIsNotAString;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/messages.properties b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/messages.properties
index aaa63986a94..332fca3462d 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/messages.properties
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/messages.properties
@@ -87,3 +87,5 @@ CompImplSync_InfoSyncViaType=syncViaType => implementation %s
DepPlanUtils_CannotFindAttribute=cannot find attribute %s in classifier %s
DepPlanUtils_ConfigOfPropertyFailed=configuration of property %s failed: type is not a string
UpdateUtils_CannotApplyFCMstereo=cannot apply FCM stereotype. Check whether profile is applied
+XtendTemplateBinding_TemplateNotFound=template with reference <%s.%s> can not be found. Verify whether the reference is correctly spelled, the template has been registered and implements the interface <IXtend> (in oep.designer.core.extensions).
+XtendTemplateBinding_TemplateResultIsNotAString=bind template: return result is not a string
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/templates/XtendTemplateBinding.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/templates/XtendTemplateBinding.java
index f4e7e78fae1..14527c6aa23 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/templates/XtendTemplateBinding.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/templates/XtendTemplateBinding.java
@@ -3,6 +3,7 @@ package org.eclipse.papyrus.qompass.designer.core.templates;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import org.eclipse.papyrus.qompass.designer.core.Messages;
import org.eclipse.papyrus.qompass.designer.core.extensions.IXtend;
import org.eclipse.papyrus.qompass.designer.core.extensions.XtendGenerator;
import org.eclipse.papyrus.qompass.designer.core.transformations.TransformationException;
@@ -43,6 +44,9 @@ public class XtendTemplateBinding {
String templateId = templateRef[0].trim();
String methodName = templateRef[1].trim();
IXtend generator = XtendGenerator.getXtendGenerator(templateId);
+ if (generator == null) {
+ throw new TransformationException(String.format(Messages.XtendTemplateBinding_TemplateNotFound, templateId, methodName));
+ }
try {
Object result;
@@ -61,7 +65,7 @@ public class XtendTemplateBinding {
return result.toString();
}
else {
- throw new TransformationException("bind template: return result is not a string");
+ throw new TransformationException(Messages.XtendTemplateBinding_TemplateResultIsNotAString);
}
} catch (SecurityException | IllegalAccessException
| IllegalArgumentException | InvocationTargetException | NullPointerException e) {
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ContainerDialog.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ContainerDialog.java
index a84df010689..32a4bc5881d 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ContainerDialog.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ContainerDialog.java
@@ -52,7 +52,6 @@ import org.eclipse.uml2.uml.util.UMLUtil;
* TODO: extend rule application to instances (problematic, since rules transformation
* is done on type level)
*
- * @author ansgar
*/
public class ContainerDialog extends SelectionStatusDialog {
diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/TracepointConstants.java b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/TracepointConstants.java
index 1fa3baaf828..2246147467b 100644
--- a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/TracepointConstants.java
+++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/TracepointConstants.java
@@ -24,6 +24,9 @@ public class TracepointConstants {
public static final String isActive = "isActive"; //$NON-NLS-1$
+ /**
+ * if true, marker is a tracepoint. Otherwise it is a breakpoint.
+ */
public static final String isTracepoint = "isTracepoint"; //$NON-NLS-1$
public static final String traceAction = "traceAction"; //$NON-NLS-1$

Back to the top