blob: 436b877c11e568dddf5c687e1184528ea6dbf717 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/******************************************************************************
* Copyright (c) 2006, 2020 Borland Software Corporation, CEA LIST, Artal
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Artem Tikhomirov (Borland) - initial API and implementation
* Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Bug 569174
*****************************************************************************/
«IMPORT 'http://www.eclipse.org/papyrus/gmf/2020/GraphicalDefinition'»
«EXTENSION NativeUtil»
«DEFINE Init(instanceVarName : String) FOR gmfgraph::CustomClass -»
«EXPAND customAttribute(instanceVarName) FOREACH attributes -»
«ENDDEFINE»
«DEFINE customAttribute(instanceVarName : String) FOR gmfgraph::CustomAttribute -»
«EXPAND customAttrValueImpl-»
«IF directAccess -»
«instanceVarName».«name» = «EXPAND customAttrValue»;
«ELSE -»
«instanceVarName».set«name.firstToUpper()»(«EXPAND customAttrValue»);
«ENDIF -»
«ENDDEFINE»
«DEFINE customAttrValueImpl FOR gmfgraph::CustomAttribute -»
«IF multiStatementValue-»
«messageFormat(value, Sequence { 'attr' + name.firstToUpper() })-»
«ENDIF-»
«ENDDEFINE»
«DEFINE customAttrValue FOR gmfgraph::CustomAttribute -»
«IF multiStatementValue»attr«name.firstToUpper()»«ELSE-»«value»«ENDIF-»
«ENDDEFINE»
|