Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/ExternalizerUtils.qvto')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/ExternalizerUtils.qvto21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/ExternalizerUtils.qvto b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/ExternalizerUtils.qvto
new file mode 100644
index 000000000..32cae5298
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/ExternalizerUtils.qvto
@@ -0,0 +1,21 @@
+import xpt.StringOperations;
+
+modeltype genModel uses "http://www.eclipse.org/gmf/2008/GenModel";
+
+library ExternalizerUtils;
+
+helper getExternalizerPackageName(generator : genModel::GenEditorGenerator) : String {
+ return generator.editor.packageName
+}
+
+helper getExternalizerClassName() : String {
+ return 'Messages'
+}
+
+helper escapeIllegalKeySymbols(key : String) : String {
+ return key.xpandReplaceAll('[=&"]', '').xpandReplaceAll('[ .]', '_')
+}
+
+helper escapeIllegalMessageSymbols(message : String) : String {
+ return message.xpandReplaceAll('!', '\\!')
+}

Back to the top