-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathSysMLMOF2SysMLText.xtend
More file actions
52 lines (43 loc) · 1.51 KB
/
Copy pathSysMLMOF2SysMLText.xtend
File metadata and controls
52 lines (43 loc) · 1.51 KB
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
/*******************************************************************************
* SysML 2 Pilot Implementation
* Copyright (c) 2024 Model Driven Solutions, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Eclipse Public License as published by
* the Eclipse Foundation, version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Eclipse Public License for more details.
*
* You should have received a copy of the Eclipse Public License
* along with this program. If not, see <https://www.eclipse.org/legal/epl-2.0/>.
*
* @license EPL-2.0 <http://spdx.org/licenses/EPL-2.0>
*
*******************************************************************************/
package org.omg.sysml.generation
class SysMLMOF2SysMLText extends MOF2SysMLText {
override generate(org.eclipse.uml2.uml.Package model) {
'''
standard library package SysML {
doc
/*
* This package contains a reflective SysML model of the SysML abstract syntax.
*/
private import ScalarValues::*;
public import Systems::*;
package Systems {
public import KerML::Kernel::*;
«model.getPackage("Systems").toPackageBody»
}
}
'''
}
static def void main(String[] args) {
if (args.length >= 2) {
new SysMLMOF2SysMLText().generate(args.get(0), args.get(1))
}
}
}