Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/ParserUtils.qvto')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/ParserUtils.qvto17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/ParserUtils.qvto b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/ParserUtils.qvto
new file mode 100644
index 000000000..5958104c8
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/ParserUtils.qvto
@@ -0,0 +1,17 @@
+import xpt.StringOperations;
+
+modeltype genModel uses "http://www.eclipse.org/gmf/2008/GenModel";
+
+library ParserUtils;
+
+helper parserFieldName(element : genModel::GenCommonBase) : String {
+ return element.getUniqueIdentifier().xpandToFirstLower() + 'Parser'
+}
+
+helper parserAccessorName(element : genModel::GenCommonBase) : String {
+ return 'get' + element.getUniqueIdentifier().firstToUpper() + 'Parser'
+}
+
+helper isPatternSpecified(pattern : String) : Boolean {
+ return pattern <> null and pattern.xpandLength() > 0
+}

Back to the top