Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 5958104c859e03d0f5802149c2a3bdffe4f6fadd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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