Skip to content

Commit 7ee8b7c

Browse files
authored
Merge branch 'master' into fix-1286
2 parents edf2db6 + 0845858 commit 7ee8b7c

File tree

10 files changed

+31
-62
lines changed

10 files changed

+31
-62
lines changed

.github/SUPPORT.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
- name: Use Node.js
6767
uses: actions/setup-node@v3
6868
with:
69-
node-version: 16
69+
node-version: 18
7070
- run: npm install
7171
- name: lint
7272
if: runner.os == 'Linux'
@@ -136,7 +136,7 @@ jobs:
136136
- name: Use Node.js
137137
uses: actions/setup-node@v3
138138
with:
139-
node-version: 16
139+
node-version: 18
140140
- name: Prepare build
141141
id: set-version
142142
run: |

.github/workflows/prerelease.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- name: Use Node.js
6262
uses: actions/setup-node@v3
6363
with:
64-
node-version: 16
64+
node-version: 18
6565
- run: npm install
6666
- name: lint
6767
if: runner.os == 'Linux'
@@ -131,7 +131,7 @@ jobs:
131131
- name: Use Node.js
132132
uses: actions/setup-node@v3
133133
with:
134-
node-version: 16
134+
node-version: 18
135135
- name: Prepare pre-release build
136136
id: set-version
137137
run: |

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Prerequisites
66

7-
1. [Node.js](https://nodejs.org/) 12.x
7+
1. [Node.js](https://nodejs.org/) 18.x
88
1. Windows, macOS, or Linux
99
1. [Visual Studio Code](https://code.visualstudio.com/)
1010
1. The following VS Code extensions:

images/InterSystems.svg

Lines changed: 0 additions & 25 deletions
This file was deleted.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-objectscript",
33
"displayName": "InterSystems ObjectScript",
44
"description": "InterSystems ObjectScript language support for Visual Studio Code",
5-
"version": "2.10.6-SNAPSHOT",
5+
"version": "2.12.0-SNAPSHOT",
66
"icon": "images/logo.png",
77
"aiKey": "9cd75d51-697c-406c-a929-2bcf46e97c64",
88
"categories": [
@@ -79,11 +79,11 @@
7979
"viewsWelcome": [
8080
{
8181
"view": "explorer",
82-
"contents": "Begin your local ObjectScript development by opening a folder or cloning a repository. Then switch to the new ObjectScript view in the Activity Bar.\nYou can also create a new workspace to [edit or view code directly on an InterSystems server](https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls?KEY=GVSCO_ssworkflow).\n[Choose Server and Namespace](command:vscode-objectscript.addServerNamespaceToWorkspace)"
82+
"contents": "Begin your local ObjectScript development by opening a folder or cloning a repository. Then switch to the InterSystems: Explorer view in the Activity Bar.\nYou can also create a new workspace to [edit or view code directly on an InterSystems server](https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls?KEY=GVSCO_ssworkflow).\n[Choose Server and Namespace](command:vscode-objectscript.addServerNamespaceToWorkspace)"
8383
},
8484
{
8585
"view": "ObjectScriptExplorer",
86-
"contents": "Connect a local workspace folder to an [InterSystems server](https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls?KEY=GVSCO_ssworkflow) if you want to export or import ObjectScript code.\n[Choose Server and Namespace](command:vscode-objectscript.connectFolderToServerNamespace)\nOr [hide this ObjectScript view](command:vscode-objectscript.hideExplorerForWorkspace) if it is not needed for the current workspace.",
86+
"contents": "Connect a local workspace folder to an [InterSystems server](https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls?KEY=GVSCO_ssworkflow) if you want to export or import ObjectScript code.\n[Choose Server and Namespace](command:vscode-objectscript.connectFolderToServerNamespace)\nOr [hide this view](command:vscode-objectscript.hideExplorerForWorkspace) if it is not needed for the current workspace.",
8787
"when": "vscode-objectscript.explorerRootCount == 0"
8888
},
8989
{
@@ -1382,7 +1382,7 @@
13821382
"objectscript.showExplorer": {
13831383
"type": "boolean",
13841384
"default": true,
1385-
"description": "Show the ObjectScript Explorer view."
1385+
"description": "Show the InterSystems Explorer view."
13861386
},
13871387
"objectscript.compileFlags": {
13881388
"type": "string",
@@ -1458,6 +1458,11 @@
14581458
"type": "boolean",
14591459
"default": false
14601460
},
1461+
"objectscript.autoAdjustName": {
1462+
"markdownDescription": "Automatically modify the class name or ROUTINE header to match the file's path when copying or creating a new file. Does not affect `isfs` files.",
1463+
"type": "boolean",
1464+
"default": true
1465+
},
14611466
"objectscript.compileOnSave": {
14621467
"description": "Automatically compile an InterSystems file when saved in the editor.",
14631468
"type": "boolean",
@@ -1474,7 +1479,7 @@
14741479
"default": false
14751480
},
14761481
"objectscript.explorer.alwaysShowServerCopy": {
1477-
"description": "Always show the server copy of a document in the ObjectScript Explorer.",
1482+
"description": "Always show the server copy of a document opened from the InterSystems Explorer.",
14781483
"type": "boolean",
14791484
"default": false
14801485
},
@@ -1511,30 +1516,21 @@
15111516
}
15121517
},
15131518
"views": {
1514-
"ObjectScriptView": [
1519+
"intersystems-community_servermanager": [
15151520
{
15161521
"id": "ObjectScriptExplorer",
15171522
"name": "Explorer",
1518-
"contextualTitle": "ObjectScript Explorer",
1523+
"contextualTitle": "InterSystems",
15191524
"when": "workspaceFolderCount != 0 && config.objectscript.showExplorer == true"
15201525
},
15211526
{
15221527
"id": "ObjectScriptProjectsExplorer",
15231528
"name": "Projects",
1524-
"contextualTitle": "InterSystems Projects",
1529+
"contextualTitle": "InterSystems",
15251530
"when": "workspaceFolderCount != 0"
15261531
}
15271532
]
15281533
},
1529-
"viewsContainers": {
1530-
"activitybar": [
1531-
{
1532-
"icon": "images/InterSystems.svg",
1533-
"id": "ObjectScriptView",
1534-
"title": "ObjectScript"
1535-
}
1536-
]
1537-
},
15381534
"breakpoints": [
15391535
{
15401536
"language": "objectscript"
@@ -1722,5 +1718,8 @@
17221718
"@vscode/debugprotocol": "^1.61.0",
17231719
"vscode-extension-telemetry": "^0.1.6",
17241720
"ws": "^8.14.2"
1725-
}
1721+
},
1722+
"extensionDependencies": [
1723+
"intersystems-community.servermanager"
1724+
]
17261725
}

src/commands/webSocketTerminal.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ class WebSocketTerminal implements vscode.Pseudoterminal {
170170
outputChannel.appendLine(
171171
typeof error == "string" ? error : error instanceof Error ? error.message : JSON.stringify(error)
172172
);
173+
outputChannel.appendLine("Check that the InterSystems server's web server supports WebSockets.");
173174
outputChannel.show(true);
174175
vscode.window.showErrorMessage(
175176
"Failed to initialize WebSocket Terminal. Check 'ObjectScript' Output channel for details.",

src/explorer/explorer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export class ObjectScriptExplorerProvider implements vscode.TreeDataProvider<Nod
158158
.then((data) => data.map((ns) => ({ label: ns })))
159159
.then((data) =>
160160
vscode.window.showQuickPick(data, {
161-
placeHolder: `Choose a namespace on ${api.config.host}:${api.config.port} to add to ObjectScript Explorer`,
161+
placeHolder: `Choose a namespace on ${api.config.host}:${api.config.port} to add to the Explorer`,
162162
})
163163
)
164164
.then((ns) => this.showExtra4Workspace(workspaceFolder, ns.label))

src/extension.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,8 +1045,9 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
10451045
RESTDebugPanel.create(context.extensionUri)
10461046
),
10471047
vscode.commands.registerCommand("vscode-objectscript.exportCurrentFile", exportCurrentFile),
1048-
vscode.workspace.onDidCreateFiles((e: vscode.FileCreateEvent) =>
1049-
Promise.all(
1048+
vscode.workspace.onDidCreateFiles((e: vscode.FileCreateEvent) => {
1049+
if (!config("autoAdjustName")) return;
1050+
return Promise.all(
10501051
e.files
10511052
.filter((uri) => !filesystemSchemas.includes(uri.scheme))
10521053
.filter((uri) => ["cls", "inc", "int", "mac"].includes(uri.path.split(".").pop().toLowerCase()))
@@ -1078,8 +1079,8 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
10781079
// Write the new content to the file
10791080
return vscode.workspace.fs.writeFile(uri, new TextEncoder().encode(newContent.content.join("\n")));
10801081
})
1081-
)
1082-
),
1082+
);
1083+
}),
10831084
vscode.window.onDidChangeActiveTextEditor((editor: vscode.TextEditor) => {
10841085
if (config("openClassContracted") && editor && editor.document.languageId === "objectscript-class") {
10851086
const uri: string = editor.document.uri.toString();

0 commit comments

Comments
 (0)