Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2013-12-19 07:55:52 -0500
committerAnsgar Radermacher2013-12-19 08:03:17 -0500
commita5f279486e2fe2b00d06182126283693095b761b (patch)
treed0bd0e981c9415fc53e507d0d2afdc360df6fcdb /extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src
parentac7745b1afa53790904ff31fb7487e46d9c2b841 (diff)
downloadorg.eclipse.papyrus-a5f279486e2fe2b00d06182126283693095b761b.tar.gz
org.eclipse.papyrus-a5f279486e2fe2b00d06182126283693095b761b.tar.xz
org.eclipse.papyrus-a5f279486e2fe2b00d06182126283693095b761b.zip
- Bug 422244 - [QDesigner] QDesigner should externalize natural language Strings
Diffstat (limited to 'extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src')
-rw-r--r--extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/ClientServerTraceTestModelWizard.java2
-rw-r--r--extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorOTF.java18
-rw-r--r--extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorTrace.java4
-rw-r--r--extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/QompassTraceMechanism.java6
-rw-r--r--extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/StringConstants.java6
-rw-r--r--extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/acceleo/traceLTTng.mtl8
6 files changed, 25 insertions, 19 deletions
diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/ClientServerTraceTestModelWizard.java b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/ClientServerTraceTestModelWizard.java
index 44b716be54a..c3274d24415 100644
--- a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/ClientServerTraceTestModelWizard.java
+++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/ClientServerTraceTestModelWizard.java
@@ -6,6 +6,6 @@ import org.eclipse.papyrus.qompass.modellibs.core.ModelCopyWizard;
public class ClientServerTraceTestModelWizard extends ModelCopyWizard {
public ClientServerTraceTestModelWizard () {
- modelName = "ClientServerTraceTest";
+ modelName = "ClientServerTraceTest"; //$NON-NLS-1$
}
}
diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorOTF.java b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorOTF.java
index 6dae4aa1244..48cf53a4695 100644
--- a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorOTF.java
+++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorOTF.java
@@ -13,10 +13,10 @@ import org.eclipse.uml2.uml.Property;
public class IConfiguratorOTF implements IInstanceConfigurator {
- static final String PROP_PORT_NAME = "portName";
-
- static final String PROP_INSTANCE_NAME = "instanceName";
+ static final String PROP_PORT_NAME = "portName"; //$NON-NLS-1$
+ static final String PROP_INSTANCE_NAME = "instanceName"; //$NON-NLS-1$
+
/**
* Configure the passed trace instance
*
@@ -25,8 +25,8 @@ public class IConfiguratorOTF implements IInstanceConfigurator {
public void configureInstance(InstanceSpecification instance, Property componentPart, ContainerContext context) {
// The tracing code needs informations about the component instance and port.
- DepPlanUtils.configureProperty(instance, PROP_INSTANCE_NAME, "\"" + instance.getName() + "\"");
-
+ DepPlanUtils.configureProperty(instance, PROP_INSTANCE_NAME, StringConstants.QUOTE + instance.getName() + StringConstants.QUOTE);
+
// port in context => interception of port => provide information about port and interface
if(context.port != null) {
// obtain required or provided interface (TODO: will fail, if both are provided!)
@@ -35,15 +35,15 @@ public class IConfiguratorOTF implements IInstanceConfigurator {
intf = PortUtils.getRequired(context.port);
}
- DepPlanUtils.configureProperty(instance, PROP_PORT_NAME, "\"" + context.port.getName() + "\"");
+ DepPlanUtils.configureProperty(instance, PROP_PORT_NAME, StringConstants.QUOTE + context.port.getName() + StringConstants.QUOTE);
if(intf != null) {
// this is specific for OTF:
// each container contains an attribute (id_<name>) for each operation. This is configured here,
// since we add instance information to the trace (is that useful??, seems like a hack)
for(Operation op : intf.getOperations()) {
- String id = Utils.getTop(context.executorIS).getName() + "::Tracing::Trace::ID_" +
- context.executorIS.getName().replace(".", "_") + "_" + op.getName();
- DepPlanUtils.configureProperty(instance, "id_" + op.getName(), id);
+ String id = Utils.getTop(context.executorIS).getName() + "::Tracing::Trace::ID_" + //$NON-NLS-1$
+ context.executorIS.getName().replace(".", "_") + "_" + op.getName(); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ DepPlanUtils.configureProperty(instance, "id_" + op.getName(), id); //$NON-NLS-1$
}
}
}
diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorTrace.java b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorTrace.java
index 7c76623710f..43de8b800c1 100644
--- a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorTrace.java
+++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorTrace.java
@@ -30,11 +30,11 @@ public class IConfiguratorTrace implements IInstanceConfigurator {
}
}
- DepPlanUtils.configureProperty(instance, PROP_INSTANCE_NAME, "\"" + instanceName + "\"");
+ DepPlanUtils.configureProperty(instance, PROP_INSTANCE_NAME, StringConstants.QUOTE + instanceName + StringConstants.QUOTE);
// port in context => interception of port => provide information about port and interface
if(context.port != null) {
- DepPlanUtils.configureProperty(instance, PROP_PORT_NAME, "\"" + context.port.getName() + "\"");
+ DepPlanUtils.configureProperty(instance, PROP_PORT_NAME, StringConstants.QUOTE + context.port.getName() + StringConstants.QUOTE);
}
}
}
diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/QompassTraceMechanism.java b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/QompassTraceMechanism.java
index e9593ba3cd2..e3e0ca8da86 100644
--- a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/QompassTraceMechanism.java
+++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/QompassTraceMechanism.java
@@ -23,8 +23,8 @@ import org.eclipse.papyrus.infra.services.tracepoints.TraceActions.TAOperation;
import org.eclipse.papyrus.infra.services.tracepoints.TracepointConstants;
import org.eclipse.papyrus.qompass.designer.core.Description;
import org.eclipse.papyrus.qompass.designer.core.Log;
-import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.papyrus.qompass.designer.core.Utils;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.NamedElement;
@@ -34,7 +34,7 @@ import org.eclipse.uml2.uml.Property;
public class QompassTraceMechanism implements ITraceMechanism {
- public static final String EC3M_TRACING_URI = "pathmap://QML_TRACE/tracing.uml";
+ public static final String EC3M_TRACING_URI = "pathmap://QML_TRACE/tracing.uml"; //$NON-NLS-1$
public static final URI tracingURI = URI.createURI(EC3M_TRACING_URI);
@@ -104,7 +104,7 @@ public class QompassTraceMechanism implements ITraceMechanism {
public boolean isForTracing(ContainerRule rule) {
for(ConfigOption co : rule.getForConfig()) {
// TODO: not very clean to used fixed string
- if(co.getBase_Class().getName().equals("Trace")) {
+ if(co.getBase_Class().getName().equals("Trace")) { //$NON-NLS-1$
return true;
}
}
diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/StringConstants.java b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/StringConstants.java
new file mode 100644
index 00000000000..171fece98a4
--- /dev/null
+++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/StringConstants.java
@@ -0,0 +1,6 @@
+package org.eclipse.papyrus.qompass.modellibs.tracing;
+
+public class StringConstants {
+ public static final String QUOTE = "\""; //$NON-NLS-1$
+
+}
diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/acceleo/traceLTTng.mtl b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/acceleo/traceLTTng.mtl
index af7a3358147..cdddfb7314a 100644
--- a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/acceleo/traceLTTng.mtl
+++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/acceleo/traceLTTng.mtl
@@ -112,7 +112,7 @@ tracepoint([tpName1()/], [operation.tpName2()/], instanceName[if (operation.para
[/template]
-[template flattenParNameAndType(parameter : Parameter) post(trim())]
+[template public flattenParNameAndType(parameter : Parameter) post(trim())]
[if (type.oclIsTypeOf(DataType))]
[for (attribute : Property | type.oclAsType(DataType).attribute) separator(', ')][attribute.type.cppTypeWB()/], [parameter.name + '_' + attribute.name/][/for]
[else]
@@ -120,7 +120,7 @@ tracepoint([tpName1()/], [operation.tpName2()/], instanceName[if (operation.para
[/if]
[/template]
-[template flattenParName(parameter : Parameter) post(trim())]
+[template public flattenParName(parameter : Parameter) post(trim())]
[if (type.oclIsTypeOf(DataType))]
[for (attribute : Property | type.oclAsType(DataType).attribute) separator(', ')][parameter.name + '.' + attribute.name/][/for]
[else]
@@ -129,7 +129,7 @@ tracepoint([tpName1()/], [operation.tpName2()/], instanceName[if (operation.para
[/template]
-[template flattenCtfType(type : Type, name : String) post(trim())]
+[template public flattenCtfType(type : Type, name : String) post(trim())]
[if (type.oclIsTypeOf(DataType))]
[for (attribute : Property | type.oclAsType(DataType).attribute) separator('\n')][ctfType(attribute.type, name + '_' + attribute.name)/][/for]
[else]
@@ -138,7 +138,7 @@ tracepoint([tpName1()/], [operation.tpName2()/], instanceName[if (operation.para
[/template]
-[template cppTypeWB(type : Type) post(trim())]
+[template public cppTypeWB(type : Type) post(trim())]
[if
(type.qualifiedName = 'UMLPrimitiveTypes::Boolean') or
(type.qualifiedName = 'PrimitiveTypes::Boolean') or

Back to the top