Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 11b3a64d0e8524a7d0319bb554ecbc0f4d3bc6f9 (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
/*******************************************************************************
 * 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.etmap.postprocessing

import org.eclipse.xtext.GeneratedMetamodel

import static extension org.eclipse.etrice.core.common.postprocessing.PostprocessingHelpers.*

class DocuPostprocessor {
		
	def process(GeneratedMetamodel metamodel) {
		val pckg = metamodel.EPackage
		
		//------------------------------------------------------------------
		var cls = pckg.getClass("MappingModel")
		cls.setDocumentation(
			'''
				The root object for the mapping model. It gives access to the mappings defined.
			''')
		
		cls.getAttribute("name").setDocumentation(
			'''
				The model name is a dot separated fully qualified name and is
				used to provide a name space.
			''')
		
		cls.getReference("imports").setDocumentation(
			'''
				A list of all imported models.
			''')
		
		cls.getReference("mappings").setDocumentation(
			'''
				A list of all defined mappings.
			''')
		
		//------------------------------------------------------------------
		cls = pckg.getClass("Mapping")
		cls.setDocumentation(
			'''
				This is the mapping of a logical system (defined in a ROOM model) to a
				physical system (defined in a physical model).
			''')
		
		cls.getReference("logicalSys").setDocumentation(
			'''
				This is the logical system being mapped.
			''')
		
		cls.getReference("physicalSys").setDocumentation(
			'''
				This is the physical system being mapped to.
			''')
		
		cls.getReference("subsysMappings").setDocumentation(
			'''
				This is a list of nested mappings of the sub systems of this system.
			''')
		
		//------------------------------------------------------------------
		cls = pckg.getClass("SubSystemMapping")
		cls.setDocumentation(
			'''
				This is the mapping of a sub system (defined in a ROOM model) to a
				node (defined in a physical model).
			''')
		
		cls.getReference("logicalSubSys").setDocumentation(
			'''
				This is the logical sub system being mapped.
			''')
		
		cls.getReference("node").setDocumentation(
			'''
				This is the node being mapped to.
			''')
		
		cls.getReference("threadMappings").setDocumentation(
			'''
				This is a list of nested mappings of logical to physical threads.
			''')
		
		//------------------------------------------------------------------
		cls = pckg.getClass("ThreadMapping")
		cls.setDocumentation(
			'''
				This is the mapping of a logical thread (defined in a ROOM model) to a
				physical thread (defined in a physical model).
			''')
		
		cls.getReference("logicalThread").setDocumentation(
			'''
				This is the logical thread being mapped.
			''')
		
		cls.getReference("physicalThread").setDocumentation(
			'''
				This is the physical thread being mapped to.
			''')
		
	}
	
}

Back to the top