Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0efefbd53fe80bf2d2d66363706c7992d89e7c98 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
/**
 * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
 * 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:
 * 		Juergen Haug (initial contribution)
 */
package org.eclipse.etrice.core.etphys.postprocessing;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.etrice.core.common.postprocessing.PostprocessingHelpers;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.GeneratedMetamodel;

@SuppressWarnings("all")
public class DocuPostprocessor {
  public void process(final GeneratedMetamodel metamodel) {
    final EPackage pckg = metamodel.getEPackage();
    EClass cls = PostprocessingHelpers.getClass(pckg, "PhysicalModel");
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("The root object for the physical model. It gives access to the systems, node classes");
    _builder.newLine();
    _builder.append("and runtimes defined.");
    _builder.newLine();
    PostprocessingHelpers.setDocumentation(cls, _builder.toString());
    EAttribute _attribute = PostprocessingHelpers.getAttribute(cls, "name");
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("The model name is a dot separated fully qualified name and is");
    _builder_1.newLine();
    _builder_1.append("used to provide a name space.");
    _builder_1.newLine();
    PostprocessingHelpers.setDocumentation(_attribute, _builder_1.toString());
    EReference _reference = PostprocessingHelpers.getReference(cls, "imports");
    StringConcatenation _builder_2 = new StringConcatenation();
    _builder_2.append("A list of all imported models.");
    _builder_2.newLine();
    PostprocessingHelpers.setDocumentation(_reference, _builder_2.toString());
    EReference _reference_1 = PostprocessingHelpers.getReference(cls, "systems");
    StringConcatenation _builder_3 = new StringConcatenation();
    _builder_3.append("A list of all defined physical systems.");
    _builder_3.newLine();
    PostprocessingHelpers.setDocumentation(_reference_1, _builder_3.toString());
    EReference _reference_2 = PostprocessingHelpers.getReference(cls, "nodeClasses");
    StringConcatenation _builder_4 = new StringConcatenation();
    _builder_4.append("A list of all defined node classes.");
    _builder_4.newLine();
    PostprocessingHelpers.setDocumentation(_reference_2, _builder_4.toString());
    EReference _reference_3 = PostprocessingHelpers.getReference(cls, "runtimeClasses");
    StringConcatenation _builder_5 = new StringConcatenation();
    _builder_5.append("A list of all defined runtime classes.");
    _builder_5.newLine();
    PostprocessingHelpers.setDocumentation(_reference_3, _builder_5.toString());
    EClass _class = PostprocessingHelpers.getClass(pckg, "PhysicalSystem");
    cls = _class;
    StringConcatenation _builder_6 = new StringConcatenation();
    _builder_6.append("This model object represents a complete physical system.");
    _builder_6.newLine();
    PostprocessingHelpers.setDocumentation(cls, _builder_6.toString());
    EAttribute _attribute_1 = PostprocessingHelpers.getAttribute(cls, "name");
    StringConcatenation _builder_7 = new StringConcatenation();
    _builder_7.append("The name of the physical system by which it is referred to in the model.");
    _builder_7.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_1, _builder_7.toString());
    EReference _reference_4 = PostprocessingHelpers.getReference(cls, "nodeRefs");
    StringConcatenation _builder_8 = new StringConcatenation();
    _builder_8.append("A list of referenced nodes.");
    _builder_8.newLine();
    PostprocessingHelpers.setDocumentation(_reference_4, _builder_8.toString());
    EReference _reference_5 = PostprocessingHelpers.getReference(cls, "docu");
    StringConcatenation _builder_9 = new StringConcatenation();
    _builder_9.append("This is an optional documentation.");
    _builder_9.newLine();
    PostprocessingHelpers.setDocumentation(_reference_5, _builder_9.toString());
    EClass _class_1 = PostprocessingHelpers.getClass(pckg, "NodeRef");
    cls = _class_1;
    StringConcatenation _builder_10 = new StringConcatenation();
    _builder_10.append("This stands for a node instance in a specific role.");
    _builder_10.newLine();
    PostprocessingHelpers.setDocumentation(cls, _builder_10.toString());
    EAttribute _attribute_2 = PostprocessingHelpers.getAttribute(cls, "name");
    StringConcatenation _builder_11 = new StringConcatenation();
    _builder_11.append("The name of the reference by which it is referred to in the model.");
    _builder_11.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_2, _builder_11.toString());
    EReference _reference_6 = PostprocessingHelpers.getReference(cls, "type");
    StringConcatenation _builder_12 = new StringConcatenation();
    _builder_12.append("The node class of this reference.");
    _builder_12.newLine();
    PostprocessingHelpers.setDocumentation(_reference_6, _builder_12.toString());
    EReference _reference_7 = PostprocessingHelpers.getReference(cls, "docu");
    StringConcatenation _builder_13 = new StringConcatenation();
    _builder_13.append("This is an optional documentation.");
    _builder_13.newLine();
    PostprocessingHelpers.setDocumentation(_reference_7, _builder_13.toString());
    EClass _class_2 = PostprocessingHelpers.getClass(pckg, "NodeClass");
    cls = _class_2;
    StringConcatenation _builder_14 = new StringConcatenation();
    _builder_14.append("This defines a node class.");
    _builder_14.newLine();
    PostprocessingHelpers.setDocumentation(cls, _builder_14.toString());
    EAttribute _attribute_3 = PostprocessingHelpers.getAttribute(cls, "name");
    StringConcatenation _builder_15 = new StringConcatenation();
    _builder_15.append("The name of the node class by which it is referred to in the model.");
    _builder_15.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_3, _builder_15.toString());
    EReference _reference_8 = PostprocessingHelpers.getReference(cls, "docu");
    StringConcatenation _builder_16 = new StringConcatenation();
    _builder_16.append("This is an optional documentation.");
    _builder_16.newLine();
    PostprocessingHelpers.setDocumentation(_reference_8, _builder_16.toString());
    EReference _reference_9 = PostprocessingHelpers.getReference(cls, "runtime");
    StringConcatenation _builder_17 = new StringConcatenation();
    _builder_17.append("This is the associated runtime class.");
    _builder_17.newLine();
    PostprocessingHelpers.setDocumentation(_reference_9, _builder_17.toString());
    EAttribute _attribute_4 = PostprocessingHelpers.getAttribute(cls, "priomin");
    StringConcatenation _builder_18 = new StringConcatenation();
    _builder_18.append("This is the minimal thread priority for this node type.");
    _builder_18.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_4, _builder_18.toString());
    EAttribute _attribute_5 = PostprocessingHelpers.getAttribute(cls, "priomax");
    StringConcatenation _builder_19 = new StringConcatenation();
    _builder_19.append("This is the maximum thread priority for this node type.");
    _builder_19.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_5, _builder_19.toString());
    EReference _reference_10 = PostprocessingHelpers.getReference(cls, "threads");
    StringConcatenation _builder_20 = new StringConcatenation();
    _builder_20.append("This is a list of all threads defined for this node.");
    _builder_20.newLine();
    PostprocessingHelpers.setDocumentation(_reference_10, _builder_20.toString());
    EClass _class_3 = PostprocessingHelpers.getClass(pckg, "PhysicalThread");
    cls = _class_3;
    StringConcatenation _builder_21 = new StringConcatenation();
    _builder_21.append("This defines a physical thread running in a node.");
    _builder_21.newLine();
    PostprocessingHelpers.setDocumentation(cls, _builder_21.toString());
    EAttribute _attribute_6 = PostprocessingHelpers.getAttribute(cls, "name");
    StringConcatenation _builder_22 = new StringConcatenation();
    _builder_22.append("The name of the thread by which it is referred to in the model.");
    _builder_22.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_6, _builder_22.toString());
    EAttribute _attribute_7 = PostprocessingHelpers.getAttribute(cls, "default");
    StringConcatenation _builder_23 = new StringConcatenation();
    _builder_23.append("If this is {@code true} then this is the default thread.");
    _builder_23.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_7, _builder_23.toString());
    EAttribute _attribute_8 = PostprocessingHelpers.getAttribute(cls, "execmode");
    StringConcatenation _builder_24 = new StringConcatenation();
    _builder_24.append("This is the execution mode of the thread.");
    _builder_24.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_8, _builder_24.toString());
    EAttribute _attribute_9 = PostprocessingHelpers.getAttribute(cls, "prio");
    StringConcatenation _builder_25 = new StringConcatenation();
    _builder_25.append("This is the priority of the thread.");
    _builder_25.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_9, _builder_25.toString());
    EAttribute _attribute_10 = PostprocessingHelpers.getAttribute(cls, "stacksize");
    StringConcatenation _builder_26 = new StringConcatenation();
    _builder_26.append("This is the stacksize of the thread.");
    _builder_26.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_10, _builder_26.toString());
    EAttribute _attribute_11 = PostprocessingHelpers.getAttribute(cls, "msgblocksize");
    StringConcatenation _builder_27 = new StringConcatenation();
    _builder_27.append("This is the msgblocksize of the thread.");
    _builder_27.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_11, _builder_27.toString());
    EAttribute _attribute_12 = PostprocessingHelpers.getAttribute(cls, "msgpoolsize");
    StringConcatenation _builder_28 = new StringConcatenation();
    _builder_28.append("This is the msgpoolsize of the thread.");
    _builder_28.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_12, _builder_28.toString());
    EClass _class_4 = PostprocessingHelpers.getClass(pckg, "RuntimeClass");
    cls = _class_4;
    StringConcatenation _builder_29 = new StringConcatenation();
    _builder_29.append("This defines a runtime class.");
    _builder_29.newLine();
    PostprocessingHelpers.setDocumentation(cls, _builder_29.toString());
    EAttribute _attribute_13 = PostprocessingHelpers.getAttribute(cls, "name");
    StringConcatenation _builder_30 = new StringConcatenation();
    _builder_30.append("The name of the runtime class by which it is referred to in the model.");
    _builder_30.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_13, _builder_30.toString());
    EReference _reference_11 = PostprocessingHelpers.getReference(cls, "docu");
    StringConcatenation _builder_31 = new StringConcatenation();
    _builder_31.append("This is an optional documentation.");
    _builder_31.newLine();
    PostprocessingHelpers.setDocumentation(_reference_11, _builder_31.toString());
    EAttribute _attribute_14 = PostprocessingHelpers.getAttribute(cls, "threadModel");
    StringConcatenation _builder_32 = new StringConcatenation();
    _builder_32.append("This distinguishes single and multi threaded.");
    _builder_32.newLine();
    PostprocessingHelpers.setDocumentation(_attribute_14, _builder_32.toString());
  }
}

Back to the top