Skip to content

Commit

Permalink
Merge branch 'master' into fix-1286
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-bsaviano authored Jan 5, 2024
2 parents edf2db6 + 0845858 commit 7ee8b7c
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 62 deletions.
7 changes: 0 additions & 7 deletions .github/SUPPORT.md

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: npm install
- name: lint
if: runner.os == 'Linux'
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- name: Prepare build
id: set-version
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: npm install
- name: lint
if: runner.os == 'Linux'
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- name: Prepare pre-release build
id: set-version
run: |
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Prerequisites

1. [Node.js](https://nodejs.org/) 12.x
1. [Node.js](https://nodejs.org/) 18.x
1. Windows, macOS, or Linux
1. [Visual Studio Code](https://code.visualstudio.com/)
1. The following VS Code extensions:
Expand Down
25 changes: 0 additions & 25 deletions images/InterSystems.svg

This file was deleted.

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.

35 changes: 17 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-objectscript",
"displayName": "InterSystems ObjectScript",
"description": "InterSystems ObjectScript language support for Visual Studio Code",
"version": "2.10.6-SNAPSHOT",
"version": "2.12.0-SNAPSHOT",
"icon": "images/logo.png",
"aiKey": "9cd75d51-697c-406c-a929-2bcf46e97c64",
"categories": [
Expand Down Expand Up @@ -79,11 +79,11 @@
"viewsWelcome": [
{
"view": "explorer",
"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)"
"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)"
},
{
"view": "ObjectScriptExplorer",
"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.",
"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.",
"when": "vscode-objectscript.explorerRootCount == 0"
},
{
Expand Down Expand Up @@ -1382,7 +1382,7 @@
"objectscript.showExplorer": {
"type": "boolean",
"default": true,
"description": "Show the ObjectScript Explorer view."
"description": "Show the InterSystems Explorer view."
},
"objectscript.compileFlags": {
"type": "string",
Expand Down Expand Up @@ -1458,6 +1458,11 @@
"type": "boolean",
"default": false
},
"objectscript.autoAdjustName": {
"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.",
"type": "boolean",
"default": true
},
"objectscript.compileOnSave": {
"description": "Automatically compile an InterSystems file when saved in the editor.",
"type": "boolean",
Expand All @@ -1474,7 +1479,7 @@
"default": false
},
"objectscript.explorer.alwaysShowServerCopy": {
"description": "Always show the server copy of a document in the ObjectScript Explorer.",
"description": "Always show the server copy of a document opened from the InterSystems Explorer.",
"type": "boolean",
"default": false
},
Expand Down Expand Up @@ -1511,30 +1516,21 @@
}
},
"views": {
"ObjectScriptView": [
"intersystems-community_servermanager": [
{
"id": "ObjectScriptExplorer",
"name": "Explorer",
"contextualTitle": "ObjectScript Explorer",
"contextualTitle": "InterSystems",
"when": "workspaceFolderCount != 0 && config.objectscript.showExplorer == true"
},
{
"id": "ObjectScriptProjectsExplorer",
"name": "Projects",
"contextualTitle": "InterSystems Projects",
"contextualTitle": "InterSystems",
"when": "workspaceFolderCount != 0"
}
]
},
"viewsContainers": {
"activitybar": [
{
"icon": "images/InterSystems.svg",
"id": "ObjectScriptView",
"title": "ObjectScript"
}
]
},
"breakpoints": [
{
"language": "objectscript"
Expand Down Expand Up @@ -1722,5 +1718,8 @@
"@vscode/debugprotocol": "^1.61.0",
"vscode-extension-telemetry": "^0.1.6",
"ws": "^8.14.2"
}
},
"extensionDependencies": [
"intersystems-community.servermanager"
]
}
1 change: 1 addition & 0 deletions src/commands/webSocketTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ class WebSocketTerminal implements vscode.Pseudoterminal {
outputChannel.appendLine(
typeof error == "string" ? error : error instanceof Error ? error.message : JSON.stringify(error)
);
outputChannel.appendLine("Check that the InterSystems server's web server supports WebSockets.");
outputChannel.show(true);
vscode.window.showErrorMessage(
"Failed to initialize WebSocket Terminal. Check 'ObjectScript' Output channel for details.",
Expand Down
2 changes: 1 addition & 1 deletion src/explorer/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class ObjectScriptExplorerProvider implements vscode.TreeDataProvider<Nod
.then((data) => data.map((ns) => ({ label: ns })))
.then((data) =>
vscode.window.showQuickPick(data, {
placeHolder: `Choose a namespace on ${api.config.host}:${api.config.port} to add to ObjectScript Explorer`,
placeHolder: `Choose a namespace on ${api.config.host}:${api.config.port} to add to the Explorer`,
})
)
.then((ns) => this.showExtra4Workspace(workspaceFolder, ns.label))
Expand Down
9 changes: 5 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1045,8 +1045,9 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
RESTDebugPanel.create(context.extensionUri)
),
vscode.commands.registerCommand("vscode-objectscript.exportCurrentFile", exportCurrentFile),
vscode.workspace.onDidCreateFiles((e: vscode.FileCreateEvent) =>
Promise.all(
vscode.workspace.onDidCreateFiles((e: vscode.FileCreateEvent) => {
if (!config("autoAdjustName")) return;
return Promise.all(
e.files
.filter((uri) => !filesystemSchemas.includes(uri.scheme))
.filter((uri) => ["cls", "inc", "int", "mac"].includes(uri.path.split(".").pop().toLowerCase()))
Expand Down Expand Up @@ -1078,8 +1079,8 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
// Write the new content to the file
return vscode.workspace.fs.writeFile(uri, new TextEncoder().encode(newContent.content.join("\n")));
})
)
),
);
}),
vscode.window.onDidChangeActiveTextEditor((editor: vscode.TextEditor) => {
if (config("openClassContracted") && editor && editor.document.languageId === "objectscript-class") {
const uri: string = editor.document.uri.toString();
Expand Down

0 comments on commit 7ee8b7c

Please sign in to comment.