Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR to fix my previous issues. #1277

Merged
merged 8 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,11 @@
"type": "boolean",
"default": false
},
"objectscript.disableImplicitCodeChange": {
"description": "Disable all code modifications that occur without the user's explicit awareness.",
"type": "boolean",
"default": false
},
hsyhhssyy marked this conversation as resolved.
Show resolved Hide resolved
"objectscript.compileOnSave": {
"description": "Automatically compile an InterSystems file when saved in the editor.",
"type": "boolean",
Expand Down
6 changes: 6 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,12 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
e.files
.filter((uri) => !filesystemSchemas.includes(uri.scheme))
.filter((uri) => ["cls", "inc", "int", "mac"].includes(uri.path.split(".").pop().toLowerCase()))
// If disableImplicitCodeChange is true, disable all changes
// Be aware that if you drag and drop a file for windows expolorer into vscode,
// it will trigger create event, but the file is not actually blank.
// read file content as text and write it back to the file will corrupt it's binary structure.
// so I use filter to skip file instead of 'verbatim output'.
.filter((_) => config("disableImplicitCodeChange") !== true)
hsyhhssyy marked this conversation as resolved.
Show resolved Hide resolved
.map(async (uri) => {
// Determine the file name
const workspace = workspaceFolderOfUri(uri);
Expand Down