Skip to content

Commit efda009

Browse files
committed
Brett's comments
1 parent a68c192 commit efda009

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,11 @@
14161416
"type": "boolean",
14171417
"default": true
14181418
},
1419+
"objectscript.refreshClassesOnSync": {
1420+
"description": "Automatically refresh classes after any save or change by compilation",
1421+
"type": "boolean",
1422+
"default": false
1423+
},
14191424
"objectscript.multilineMethodArgs": {
14201425
"markdownDescription": "List method arguments on multiple lines, if the server supports it. **NOTE:** Only supported on IRIS 2019.1.2, 2020.1.1+, 2021.1.0+ and subsequent versions! On all other versions, this setting will have no effect.",
14211426
"type": "boolean",
@@ -1756,4 +1761,4 @@
17561761
"extensionDependencies": [
17571762
"intersystems-community.servermanager"
17581763
]
1759-
}
1764+
}

src/commands/compile.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,12 @@ export async function loadChanges(files: (CurrentTextFile | CurrentBinaryFile)[]
221221
workspaceState.update(`${file.uniqueId}:mtime`, mtime > 0 ? mtime : undefined);
222222
if (notIsfs(file.uri)) {
223223
let content: Document["content"];
224-
if (!isClass(file.uri.path)) {
224+
if (
225+
!(
226+
isClass(file.uri.path) &&
227+
!vscode.workspace.getConfiguration("objectscript", file.uri).get("refreshClassesOnSync")
228+
)
229+
) {
225230
content = (await api.getDoc(file.name, file.uri)).result.content;
226231
} else {
227232
// Insert/update the storage part of class definition.

0 commit comments

Comments
 (0)