1+ /*
2+ * Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
3+ *
4+ * See the AUTHORS file(s) distributed with this work for
5+ * additional information regarding authorship.
6+ *
7+ * This Source Code Form is subject to the terms of the Mozilla Public
8+ * License, v. 2.0. If a copy of the MPL was not distributed with this
9+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
10+ *
11+ * SPDX-License-Identifier: MPL-2.0
12+ */
13+
114import { DefaultEntityInstance , DefaultEnumeration , Property } from '@esmf/aspect-model-loader' ;
215import { Schema } from '../schema' ;
316import { TemplateHelper } from '../../../utils/template-helper' ;
@@ -22,20 +35,20 @@ export class LanguageGenerator {
2235 return `{
2336 ${ ! this . options . templateHelper . isAspectSelected ( this . options ) ? this . getBlockFullAspectVersion ( lang ) : `` }
2437 ${
25- this . options . enableVersionSupport
26- ? ` "${ this . options . selectedModelElement . name . toLowerCase ( ) } .v${ this . options . templateHelper . formatAspectModelVersion (
27- this . options . aspectModelVersion
28- ) } ": {`
29- : ``
30- }
38+ this . options . enableVersionSupport
39+ ? ` "${ this . options . selectedModelElement . name . toLowerCase ( ) } .v${ this . options . templateHelper . formatAspectModelVersion (
40+ this . options . aspectModelVersion
41+ ) } ": {`
42+ : ``
43+ }
3144 ${ new TemplateHelper ( )
32- . getProperties ( this . options )
33- . map ( ( prop : Property , i ) => {
34- return `${ i > 0 ? ', ' : '' }
45+ . getProperties ( this . options )
46+ . map ( ( prop : Property , i ) => {
47+ return `${ i > 0 ? ', ' : '' }
3548 ${ this . getBlockTransProperty ( prop , lang ) }
3649 ${ this . getBlockTransEntity ( prop , lang ) } ` ;
37- } )
38- . join ( '' ) }
50+ } )
51+ . join ( '' ) }
3952
4053
4154 ${ this . getBlockTransCustomColumns ( ) }
@@ -69,12 +82,12 @@ export class LanguageGenerator {
6982 private getBlockFullAspectVersion ( lang : string ) : string {
7083 return `
7184 ${
72- this . options . enableVersionSupport
73- ? ` "${ this . options . aspectModel . name . toLowerCase ( ) } .v${ this . options . templateHelper . formatAspectModelVersion (
74- this . options . aspectModelVersion
75- ) } ": {`
76- : ``
77- }
85+ this . options . enableVersionSupport
86+ ? ` "${ this . options . aspectModel . name . toLowerCase ( ) } .v${ this . options . templateHelper . formatAspectModelVersion (
87+ this . options . aspectModelVersion
88+ ) } ": {`
89+ : ``
90+ }
7891 ${ this . getBlockAspectDetails ( lang ) }
7992 ${ this . options . enableVersionSupport ? `},` : `` }
8093 ` ;
0 commit comments