@@ -18,7 +18,7 @@ import {
18
18
openLowCodeEditors ,
19
19
compileErrorMsg ,
20
20
} from "../../utils" ;
21
- import { FILESYSTEM_READONLY_SCHEMA , FILESYSTEM_SCHEMA , intLangId , macLangId } from "../../extension" ;
21
+ import { FILESYSTEM_READONLY_SCHEMA , FILESYSTEM_SCHEMA } from "../../extension" ;
22
22
import { addIsfsFileToProject , modifyProject } from "../../commands/project" ;
23
23
import { DocumentContentProvider } from "../DocumentContentProvider" ;
24
24
import { Document , UserAction } from "../../api/atelier" ;
@@ -124,18 +124,11 @@ export function generateFileContent(
124
124
sourceLines . shift ( ) ;
125
125
const routineName = fileName . split ( "." ) . slice ( 0 , - 1 ) . join ( "." ) ;
126
126
const routineType = fileExt != "mac" ? `[Type=${ fileExt . toUpperCase ( ) } ]` : "" ;
127
- if ( sourceLines . length === 0 && fileExt !== "inc" ) {
128
- const languageId = fileExt === "mac" ? macLangId : intLangId ;
129
-
130
- // Labels cannot contain dots
131
- const firstLabel = routineName . replaceAll ( "." , "" ) ;
132
-
133
- // Be smart about whether to use a Tab or a space between label and comment.
134
- // Doing this will help autodetect to do the right thing.
135
- const lineStart = vscode . workspace . getConfiguration ( "editor" , { languageId, uri } ) . get ( "insertSpaces" )
136
- ? " "
137
- : "\t" ;
138
- sourceLines . push ( `${ firstLabel } ${ lineStart } ;` ) ;
127
+ if ( ! sourceLines . length ) {
128
+ // Add a macro comment line
129
+ if ( fileExt != "int" ) sourceLines . push ( "#;" ) ;
130
+ // Add a trailing newline
131
+ sourceLines . push ( "" ) ;
139
132
}
140
133
return {
141
134
content : [ `ROUTINE ${ routineName } ${ routineType } ` , ...sourceLines ] ,
0 commit comments