Skip to content

Commit 98e0ad6

Browse files
committed
Remove barely used configuration settings
1 parent 8a62e44 commit 98e0ad6

File tree

9 files changed

+27
-116
lines changed

9 files changed

+27
-116
lines changed

package.json

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,11 +1449,6 @@
14491449
"default": false,
14501450
"description": "Controls whether synching a file to the server in a client-side workspace folder will always overwrite the server version, even if it changed since it was last accessed."
14511451
},
1452-
"objectscript.autoPreviewXML": {
1453-
"type": "boolean",
1454-
"default": false,
1455-
"description": "Automatically preview XML export files in UDL format."
1456-
},
14571452
"objectscript.format": {
14581453
"type": "object",
14591454
"description": "Formatting settings.",
@@ -1478,16 +1473,6 @@
14781473
}
14791474
}
14801475
},
1481-
"objectscript.suppressCompileMessages": {
1482-
"default": true,
1483-
"type": "boolean",
1484-
"description": "Suppress popup messages about successful compile."
1485-
},
1486-
"objectscript.suppressCompileErrorMessages": {
1487-
"default": false,
1488-
"type": "boolean",
1489-
"description": "Suppress popup messages about errors during compile, but still focus on Output view."
1490-
},
14911476
"objectscript.debug.debugThisMethod": {
14921477
"type": "boolean",
14931478
"default": true,
@@ -1498,11 +1483,6 @@
14981483
"default": true,
14991484
"markdownDescription": "Show inline `Copy Invocation` CodeLens action for ClassMethods and Routine Labels."
15001485
},
1501-
"objectscript.autoShowTerminal": {
1502-
"description": "Automatically show terminal when connected to docker-compose.",
1503-
"type": "boolean",
1504-
"default": false
1505-
},
15061486
"objectscript.compileOnSave": {
15071487
"description": "Automatically compile an InterSystems file when saved in the editor.",
15081488
"type": "boolean",
@@ -1519,11 +1499,6 @@
15191499
"type": "boolean",
15201500
"default": false
15211501
},
1522-
"objectscript.explorer.alwaysShowServerCopy": {
1523-
"description": "Always show the server copy of a document opened from the InterSystems Explorer.",
1524-
"type": "boolean",
1525-
"default": true
1526-
},
15271502
"objectscript.projects.webAppFileExtensions": {
15281503
"markdownDescription": "When browsing a virtual workspace folder that has a project query parameter, all files with these extensions will be automatically treated as web application files. Extensions added here will be appended to the default list and should **NOT** include a dot. See the [Settings Reference documentation page](https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls?KEY=GVSCO_settings#GVSCO_settings_objectscript) for a list of extensions included by default.",
15291504
"type": "array",
@@ -1534,16 +1509,6 @@
15341509
"pattern": "^[^.]+$"
15351510
}
15361511
},
1537-
"objectscript.showGeneratedFileDecorations": {
1538-
"description": "Controls whether a badge is shown in the file explorer and open editors view for generated files.",
1539-
"type": "boolean",
1540-
"default": true
1541-
},
1542-
"objectscript.webSocketTerminal.syntaxColoring": {
1543-
"description": "Enable syntax coloring for command input in the InterSystems Lite Terminal.",
1544-
"type": "boolean",
1545-
"default": true
1546-
},
15471512
"objectscript.showProposedApiPrompt": {
15481513
"description": "Controls whether a prompt to enable VS Code proposed APIs is shown when a server-side workspace folder is opened.",
15491514
"type": "boolean",

src/commands/compile.ts

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,6 @@ export async function compile(docs: (CurrentTextFile | CurrentBinaryFile)[], fla
283283
const info = docs.length > 1 ? "" : `${docs[0].name}: `;
284284
if (data.status && data.status.errors && data.status.errors.length) {
285285
throw new Error(`${info}Compile error`);
286-
} else if (!conf.get("suppressCompileMessages")) {
287-
vscode.window.showInformationMessage(`${info}Compilation succeeded.`, "Dismiss");
288286
}
289287
if (wsFolder) {
290288
// Make sure that we update the content for any
@@ -308,7 +306,7 @@ export async function compile(docs: (CurrentTextFile | CurrentBinaryFile)[], fla
308306
return docs;
309307
})
310308
.catch(() => {
311-
compileErrorMsg(conf);
309+
compileErrorMsg();
312310
// Always fetch server changes, even when compile failed or got cancelled
313311
return docs;
314312
})
@@ -407,17 +405,13 @@ export async function namespaceCompile(askFlags = false): Promise<any> {
407405
.then((data) => {
408406
if (data.status && data.status.errors && data.status.errors.length) {
409407
throw new Error(`Compiling Namespace: ${api.ns} Error`);
410-
} else if (!config("suppressCompileMessages")) {
411-
vscode.window.showInformationMessage(`Compiling namespace ${api.ns} succeeded.`, "Dismiss");
412408
}
413409
})
414410
.catch(() => {
415-
if (!config("suppressCompileErrorMessages")) {
416-
vscode.window.showErrorMessage(
417-
`Compiling namespace '${api.ns}' failed. Check the 'ObjectScript' Output channel for details.`,
418-
"Dismiss"
419-
);
420-
}
411+
vscode.window.showErrorMessage(
412+
`Compiling namespace '${api.ns}' failed. Check the 'ObjectScript' Output channel for details.`,
413+
"Dismiss"
414+
);
421415
})
422416
.then(() => {
423417
// Always fetch server changes, even when compile failed or got cancelled
@@ -512,11 +506,9 @@ export async function compileExplorerItems(nodes: NodeBase[]): Promise<any> {
512506
const info = nodes.length > 1 ? "" : `${nodes[0].fullName}: `;
513507
if (data.status && data.status.errors && data.status.errors.length) {
514508
throw new Error(`${info}Compile error`);
515-
} else if (!conf.get("suppressCompileMessages")) {
516-
vscode.window.showInformationMessage(`${info}Compilation succeeded.`, "Dismiss");
517509
}
518510
})
519-
.catch(() => compileErrorMsg(conf))
511+
.catch(() => compileErrorMsg())
520512
);
521513
}
522514

@@ -601,11 +593,9 @@ async function promptForCompile(imported: string[], api: AtelierAPI, isIsfs: boo
601593
const info = imported.length > 1 ? "" : `${imported[0]}: `;
602594
if (data.status && data.status.errors && data.status.errors.length) {
603595
throw new Error(`${info}Compile error`);
604-
} else if (!conf.get("suppressCompileMessages")) {
605-
vscode.window.showInformationMessage(`${info}Compilation succeeded.`, "Dismiss");
606596
}
607597
})
608-
.catch(() => compileErrorMsg(conf))
598+
.catch(() => compileErrorMsg())
609599
.finally(() => {
610600
if (isIsfs) {
611601
// Refresh the files explorer to show the new files

src/commands/project.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,6 @@ export async function exportProjectContents(node: ProjectNode | undefined): Prom
967967

968968
export async function compileProjectContents(node: ProjectNode): Promise<any> {
969969
const { workspaceFolderUri, namespace, label } = node;
970-
const conf = vscode.workspace.getConfiguration("objectscript", workspaceFolderUri);
971970
const api = new AtelierAPI(workspaceFolderUri);
972971
api.setNamespace(namespace);
973972
const compileList: string[] = await api
@@ -992,11 +991,9 @@ export async function compileProjectContents(node: ProjectNode): Promise<any> {
992991
.then((data) => {
993992
if (data.status && data.status.errors && data.status.errors.length) {
994993
throw new Error("Compile error");
995-
} else if (!conf.get("suppressCompileMessages")) {
996-
vscode.window.showInformationMessage("Compilation succeeded.", "Dismiss");
997994
}
998995
})
999-
.catch(() => compileErrorMsg(conf))
996+
.catch(() => compileErrorMsg())
1000997
);
1001998
}
1002999

src/commands/webSocketTerminal.ts

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,6 @@ class WebSocketTerminal implements vscode.Pseudoterminal {
147147
return openParen > 0 || openBrace > 0;
148148
}
149149

150-
/** Checks if syntax coloring is enabled */
151-
private _syntaxColoringEnabled(): boolean {
152-
return vscode.workspace.getConfiguration("objectscript.webSocketTerminal").get("syntaxColoring");
153-
}
154-
155150
/**
156151
* Converts `_input` for use as `<commandline>` by VS Code shell integration sequence `OSC 633 ; E ; <commandline> ST`.
157152
* See https://code.visualstudio.com/docs/terminal/shell-integration#_vs-code-custom-sequences-osc-633-st
@@ -400,7 +395,7 @@ class WebSocketTerminal implements vscode.Pseudoterminal {
400395
this._input = inputArr.join("\r\n");
401396
this._moveCursor(-1);
402397
this._hideCursorWrite(`\x1b7\x1b[0J${trailingText}\x1b8`);
403-
if (this._input != "" && this._state == "prompt" && this._syntaxColoringEnabled()) {
398+
if (this._input != "" && this._state == "prompt") {
404399
// Syntax color input
405400
this._socket.send(JSON.stringify({ type: "color", input: this._input }));
406401
}
@@ -419,7 +414,7 @@ class WebSocketTerminal implements vscode.Pseudoterminal {
419414
inputArr[inputArr.length - 1].slice(0, this._cursorCol - this._margin) + trailingText;
420415
this._input = inputArr.join("\r\n");
421416
this._hideCursorWrite(`\x1b7\x1b[0J${trailingText}\x1b8`);
422-
if (this._input != "" && this._state == "prompt" && this._syntaxColoringEnabled()) {
417+
if (this._input != "" && this._state == "prompt") {
423418
// Syntax color input
424419
this._socket.send(JSON.stringify({ type: "color", input: this._input }));
425420
}
@@ -457,7 +452,7 @@ class WebSocketTerminal implements vscode.Pseudoterminal {
457452
this._moveCursor(this._margin - this._cursorCol);
458453
this._hideCursorWrite(`\x1b[0J${this._input}`);
459454
this._cursorCol = this._margin + this._input.length;
460-
if (this._input != "" && this._syntaxColoringEnabled()) {
455+
if (this._input != "") {
461456
// Syntax color input
462457
this._socket.send(JSON.stringify({ type: "color", input: this._input }));
463458
}
@@ -490,7 +485,7 @@ class WebSocketTerminal implements vscode.Pseudoterminal {
490485
this._moveCursor(this._margin - this._cursorCol);
491486
this._hideCursorWrite(`\x1b[0J${this._input}`);
492487
this._cursorCol = this._margin + this._input.length;
493-
if (this._input != "" && this._syntaxColoringEnabled()) {
488+
if (this._input != "") {
494489
// Syntax color input
495490
this._socket.send(JSON.stringify({ type: "color", input: this._input }));
496491
}
@@ -572,7 +567,7 @@ class WebSocketTerminal implements vscode.Pseudoterminal {
572567
this._hideCursorWrite("\x1b[0J");
573568
inputArr[inputArr.length - 1] = "";
574569
this._input = inputArr.join("\r\n");
575-
if (this._input != "" && this._syntaxColoringEnabled()) {
570+
if (this._input != "") {
576571
// Syntax color input
577572
this._socket.send(JSON.stringify({ type: "color", input: this._input }));
578573
}
@@ -704,7 +699,7 @@ class WebSocketTerminal implements vscode.Pseudoterminal {
704699
this._input = "";
705700
this._state = "eval";
706701
this._margin = this._cursorCol = 0;
707-
} else if (this._input != "" && this._state == "prompt" && this._syntaxColoringEnabled()) {
702+
} else if (this._input != "" && this._state == "prompt") {
708703
// Syntax color input
709704
this._socket.send(JSON.stringify({ type: "color", input: this._input }));
710705
}
@@ -730,7 +725,7 @@ class WebSocketTerminal implements vscode.Pseudoterminal {
730725
`\r\n${this.multiLinePrompt}`
731726
)}\x1b8`
732727
);
733-
if (this._state == "prompt" && this._syntaxColoringEnabled()) {
728+
if (this._state == "prompt") {
734729
// Syntax color input
735730
this._socket.send(JSON.stringify({ type: "color", input: this._input }));
736731
}

src/explorer/nodes.ts

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as vscode from "vscode";
22
import { AtelierAPI } from "../api";
3-
import { cspApps, currentWorkspaceFolder, notIsfs, stringifyError, uriOfWorkspaceFolder } from "../utils";
3+
import { cspApps, currentWorkspaceFolder, stringifyError, uriOfWorkspaceFolder } from "../utils";
44
import { StudioActions, OtherStudioAction } from "../commands/studio";
5-
import { config, workspaceState } from "../extension";
5+
import { workspaceState } from "../extension";
66
import { DocumentContentProvider } from "../providers/DocumentContentProvider";
77

88
interface NodeOptions {
@@ -272,22 +272,18 @@ export class ClassNode extends NodeBase {
272272

273273
public getTreeItem(): vscode.TreeItem {
274274
const displayName: string = this.label;
275-
const itemUri = getLeafNodeUri(this);
276-
const isLocalFile = notIsfs(itemUri);
277-
const showServerCopy: boolean = config("explorer.alwaysShowServerCopy", this.workspaceFolder);
278275
const serverCopyUri = getLeafNodeUri(this, true);
279276

280277
return {
281278
collapsibleState: vscode.TreeItemCollapsibleState.None,
282279
command: {
283-
arguments: [isLocalFile && !showServerCopy ? itemUri : serverCopyUri, this.options.project, this.fullName],
280+
arguments: [serverCopyUri, this.options.project, this.fullName],
284281
command: "vscode-objectscript.explorer.open",
285282
title: "Open Class",
286283
},
287-
resourceUri: isLocalFile && !showServerCopy ? itemUri : undefined,
288284
contextValue: "dataNode:classNode",
289285
label: `${displayName}`,
290-
tooltip: isLocalFile && !showServerCopy ? undefined : this.fullName,
286+
tooltip: this.fullName,
291287
};
292288
}
293289
}
@@ -300,22 +296,18 @@ export class CSPFileNode extends NodeBase {
300296

301297
public getTreeItem(): vscode.TreeItem {
302298
const displayName: string = this.label;
303-
const itemUri = getLeafNodeUri(this);
304-
const isLocalFile = notIsfs(itemUri);
305-
const showServerCopy: boolean = config("explorer.alwaysShowServerCopy", this.workspaceFolder);
306299
const serverCopyUri = getLeafNodeUri(this, true);
307300

308301
return {
309302
collapsibleState: vscode.TreeItemCollapsibleState.None,
310303
command: {
311-
arguments: [isLocalFile && !showServerCopy ? itemUri : serverCopyUri, this.options.project, this.fullName],
304+
arguments: [serverCopyUri, this.options.project, this.fullName],
312305
command: "vscode-objectscript.explorer.open",
313306
title: "Open File",
314307
},
315-
resourceUri: isLocalFile && !showServerCopy ? itemUri : undefined,
316308
contextValue: CSPFileNode.contextValue,
317309
label: `${displayName}`,
318-
tooltip: isLocalFile && !showServerCopy ? undefined : this.fullName,
310+
tooltip: this.fullName,
319311
};
320312
}
321313
}
@@ -349,22 +341,18 @@ export class RoutineNode extends NodeBase {
349341

350342
public getTreeItem(): vscode.TreeItem {
351343
const displayName: string = this.label;
352-
const itemUri = getLeafNodeUri(this);
353-
const isLocalFile = notIsfs(itemUri);
354-
const showServerCopy: boolean = config("explorer.alwaysShowServerCopy", this.workspaceFolder);
355344
const serverCopyUri = getLeafNodeUri(this, true);
356345

357346
return {
358347
collapsibleState: vscode.TreeItemCollapsibleState.None,
359348
command: {
360-
arguments: [isLocalFile && !showServerCopy ? itemUri : serverCopyUri, this.options.project, this.fullName],
349+
arguments: [serverCopyUri, this.options.project, this.fullName],
361350
command: "vscode-objectscript.explorer.open",
362351
title: "Open Routine",
363352
},
364-
resourceUri: isLocalFile && !showServerCopy ? itemUri : undefined,
365353
contextValue: "dataNode:routineNode",
366354
label: `${displayName}`,
367-
tooltip: isLocalFile && !showServerCopy ? undefined : this.fullName,
355+
tooltip: this.fullName,
368356
};
369357
}
370358
}

src/extension.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ import {
8686
currentWorkspaceFolder,
8787
outputChannel,
8888
portFromDockerCompose,
89-
terminalWithDocker,
9089
notNull,
9190
currentFile,
9291
isUnauthenticated,
@@ -403,8 +402,6 @@ export async function checkConnection(
403402
panel.tooltip = `ERROR - ${errorMessage}`;
404403
return;
405404
}
406-
const { autoShowTerminal } = config();
407-
autoShowTerminal && terminalWithDocker();
408405
if (dockerPort !== port) {
409406
workspaceState.update(wsKey + ":host", "localhost");
410407
workspaceState.update(wsKey + ":port", dockerPort);
@@ -836,9 +833,6 @@ export function sendDebuggerTelemetryEvent(debugType: string): void {
836833
export function sendLiteTerminalTelemetryEvent(terminalOrigin: string): void {
837834
reporter?.sendTelemetryEvent("liteTerminalStarted", {
838835
terminalOrigin,
839-
"config.webSocketTerminal.syntaxColoring": String(
840-
vscode.workspace.getConfiguration("objectscript.webSocketTerminal").get("syntaxColoring")
841-
),
842836
});
843837
}
844838

@@ -1117,9 +1111,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
11171111
const conf = vscode.workspace.getConfiguration("objectscript");
11181112
const uriString = editor.document.uri.toString();
11191113
await checkConnection(false, editor.document.uri);
1120-
if (conf.get("autoPreviewXML") && editor.document.uri.path.toLowerCase().endsWith("xml")) {
1121-
previewXMLAsUDL(editor, true);
1122-
} else if (
1114+
if (
11231115
conf.get("openClassContracted") &&
11241116
editor.document.languageId == clsLangId &&
11251117
!openedClasses.includes(uriString)
@@ -1931,12 +1923,6 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
19311923
reporter?.sendTelemetryEvent("extensionActivated", {
19321924
languageServerVersion: languageServerExt?.packageJSON.version,
19331925
serverManagerVersion: smExt?.packageJSON.version,
1934-
"config.explorer.alwaysShowServerCopy": String(conf.get("explorer.alwaysShowServerCopy")),
1935-
"config.autoShowTerminal": String(conf.get("autoShowTerminal")),
1936-
"config.suppressCompileMessages": String(conf.get("suppressCompileMessages")),
1937-
"config.suppressCompileErrorMessages": String(conf.get("suppressCompileErrorMessages")),
1938-
"config.autoPreviewXML": String(conf.get("autoPreviewXML")),
1939-
"config.showGeneratedFileDecorations": String(conf.get("showGeneratedFileDecorations")),
19401926
"config.showProposedApiPrompt": String(conf.get("showProposedApiPrompt")),
19411927
"config.unitTest.enabled": String(conf.get("unitTest.enabled")),
19421928
});

src/providers/FileDecorationProvider.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,7 @@ export class FileDecorationProvider implements vscode.FileDecorationProvider {
1818

1919
// Only provide decorations for files that are open and not untitled
2020
const doc = vscode.workspace.textDocuments.find((d) => d.uri.toString() == uri.toString());
21-
if (
22-
doc != undefined &&
23-
!doc.isUntitled &&
24-
[clsLangId, macLangId, intLangId, cspLangId].includes(doc.languageId) &&
25-
vscode.workspace
26-
.getConfiguration("objectscript", vscode.workspace.getWorkspaceFolder(uri))
27-
.get<boolean>("showGeneratedFileDecorations")
28-
) {
21+
if (doc != undefined && !doc.isUntitled && [clsLangId, macLangId, intLangId, cspLangId].includes(doc.languageId)) {
2922
// Use the file's contents to check if it's generated
3023
if (doc.languageId == clsLangId) {
3124
for (let line = 0; line < doc.lineCount; line++) {

src/providers/FileSystemProvider/FileSystemProvider.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -911,12 +911,10 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
911911
const info = compileList.length > 1 ? "" : `${compileList}: `;
912912
if (data.status && data.status.errors && data.status.errors.length) {
913913
throw new Error(`${info}Compile error`);
914-
} else if (!conf.get("suppressCompileMessages")) {
915-
vscode.window.showInformationMessage(`${info}Compilation succeeded.`, "Dismiss");
916914
}
917915
data.result.content.forEach((f) => filesToUpdate.push(f.name));
918916
})
919-
.catch(() => compileErrorMsg(conf))
917+
.catch(() => compileErrorMsg())
920918
);
921919
if (file && (update || filesToUpdate.includes(file.fileName))) {
922920
// This file was just written and the write may have changed its contents or the

0 commit comments

Comments
 (0)