Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ParserUtils.qvto')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ParserUtils.qvto20
1 files changed, 16 insertions, 4 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ParserUtils.qvto b/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ParserUtils.qvto
index 5958104c8..b85a0335d 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ParserUtils.qvto
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ParserUtils.qvto
@@ -1,17 +1,29 @@
+/*
+ * Copyright (c) 2007, 2009 Borland Software Corporation
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Dmitry Stadnik (Borland) - initial API and implementation
+ */
+
import xpt.StringOperations;
-modeltype genModel uses "http://www.eclipse.org/gmf/2008/GenModel";
+modeltype gmfgen uses "http://www.eclipse.org/gmf/2009/GenModel";
library ParserUtils;
-helper parserFieldName(element : genModel::GenCommonBase) : String {
+helper parserFieldName(element : gmfgen::GenCommonBase) : String {
return element.getUniqueIdentifier().xpandToFirstLower() + 'Parser'
}
-helper parserAccessorName(element : genModel::GenCommonBase) : String {
+helper parserAccessorName(element : gmfgen::GenCommonBase) : String {
return 'get' + element.getUniqueIdentifier().firstToUpper() + 'Parser'
}
helper isPatternSpecified(pattern : String) : Boolean {
- return pattern <> null and pattern.xpandLength() > 0
+ return (not pattern.oclIsUndefined()) and pattern.size() > 0
}

Back to the top