Skip to content

Commit bcfecd5

Browse files
Merge pull request #921 from gjsjohnmurray/pre-sync-1.6.0
Add 1.6.0 changes to prerelease branch
2 parents 47ce5c4 + 20618b2 commit bcfecd5

File tree

13 files changed

+138
-78
lines changed

13 files changed

+138
-78
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
## [1.7.2022040601] 06-Apr-2022 pre-release
4+
Add 1.6.0 changes.
5+
36
## [1.5.2022032101] 21-Mar-2022 pre-release
47
Add 1.4.4 changes.
58

@@ -20,6 +23,20 @@ Add 1.4.1 changes.
2023

2124
## [1.5.2022011401] 14-Jan-2022 pre-release
2225
Add 1.4.0 changes.
26+
## [1.6.0] 06-Apr-2022
27+
Minimum VS Code version is now 1.66.0
28+
- Enhancements
29+
- Colorize text in Output channel (API has finalized) (#910)
30+
- Add `objectscript.export.exactFilter` setting (#913)
31+
- Improve error message when debugging fails to start (#908)
32+
- Fixes
33+
- Align `objectscript.openClassContracted` setting with Studio's behavior (#876)
34+
- Properly handle errors when previewing XML as UDL (#906)
35+
- Fix importing of web app files (#777)
36+
- Correctly use `http.proxyStrictSSL` setting (#919)
37+
- Fix problems caused by extension running on server and VS Code UI in web browser (#911)
38+
- Upgrade vulnerable dependencies.
39+
2340
## [1.4.4] 21-Mar-2022
2441
- Enhancements
2542
- Compile asynchronously to avoid timing out (#890)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ To unlock these features (optional):
6262

6363
1. Download and install a beta version from GitHub. This is necessary because Marketplace does not allow publication of extensions that use proposed APIs.
6464
- Go to https://github.com/intersystems-community/vscode-objectscript/releases
65-
- Locate the beta immediately above the release you installed from Marketplace. For instance, if you installed `1.4.4`, look for `1.4.5-beta.1`. This will be functionally identical to the Marketplace version apart from being able to use proposed APIs.
66-
- Download the VSIX file (for example `vscode-objectscript-1.4.5-beta.1.vsix`) and install it. One way to install a VSIX is to drag it from your download folder and drop it onto the list of extensions in the Extensions view of VS Code.
65+
- Locate the beta immediately above the release you installed from Marketplace. For instance, if you installed `1.6.0`, look for `1.6.1-beta.1`. This will be functionally identical to the Marketplace version apart from being able to use proposed APIs.
66+
- Download the VSIX file (for example `vscode-objectscript-1.6.1-beta.1.vsix`) and install it. One way to install a VSIX is to drag it from your download folder and drop it onto the list of extensions in the Extensions view of VS Code.
6767

6868
2. From [Command Palette](https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_command-palette) choose `Preferences: Configure Runtime Arguments`.
6969
3. In the argv.json file that opens, add this line (required for both Stable and Insiders versions of VS Code):

docs/RunDebug.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,6 @@ Clicking on the green arrow runs the currently selected debug configuration.
110110

111111
When starting **objectscript launch** debug session, make sure that the file containing the **program** that you are debugging is open in your editor and is the active tab. VS Code will start a debug session with the server of the file in the active editor (the tab that the user is focused on).
112112

113-
Debugging commands and items on the **Run** menu function much as they do for other languages supported by VS Code. For information on VS Code debugging, see the documentation resources listed at the start of this section.
113+
This extension uses WebSockets to communicate with the InterSystems server during debugging. If you are experiencing issues when trying to start a debugging session, check that the InterSystems server's web server allows WebSocket connections.
114+
115+
Debugging commands and items on the **Run** menu function much as they do for other languages supported by VS Code. For information on VS Code debugging, see the documentation resources listed at the start of this section.

docs/SettingsReference.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ The extensions in the InterSystems ObjectScript Extension Pack provide many sett
4646
| `"objectscript.export.atelier"` | Export source code as Atelier did it, with packages as subfolders. | `boolean` | `true` | |
4747
| `"objectscript.export.category"` | Category of source code to export: `CLS` = classes; `RTN` = routines; `CSP` = csp files; `OTH` = other. Default is `*` = all. | `string` or `object` | `"*"` | |
4848
| `"objectscript.export.dontExportIfNoChanges"` | Do not rewrite the local file if the content is identical to what came from the server. | `boolean` | `false` | |
49+
| `"objectscript.export.exactFilter"` | SQL filter to limit what to export. | `string` | `""` | The filter is applied to document names using the [LIKE predicate](https://irisdocs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_like) (i.e. `Name LIKE 'exactFilter'`). If provided, `objectscript.export.filter` is ignored. |
4950
| `"objectscript.export.filter"` | SQL filter to limit what to export. | `string` | `""` | The filter is applied to document names using the [LIKE predicate](https://irisdocs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_like) (i.e. `Name LIKE '%filter%'`). |
5051
| `"objectscript.export.folder"` | Folder for exported source code within workspace. | `string` | `"src"` | |
5152
| `"objectscript.export.generated"` | Export generated source code files, such as INTs generated from classes. | `boolean` | `false` | |
@@ -56,7 +57,7 @@ The extensions in the InterSystems ObjectScript Extension Pack provide many sett
5657
| `"objectscript.format.functionCase"` | Case for system functions and system variables. | `"upper"`, `"lower"` or `"word"` | `"word"` | Has no effect if the `InterSystems Language Server` extension is installed and enabled. |
5758
| `"objectscript.ignoreInstallServerManager"` | Do not offer to install the [intersystems-community.servermanager](https://marketplace.visualstudio.com/items?itemName=intersystems-community.servermanager) extension. | `boolean` | `false` | |
5859
| `"objectscript.multilineMethodArgs"` | List method arguments on multiple lines, if the server supports it. | `boolean` | `false` | 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. |
59-
| `"objectscript.openClassContracted"` | Automatically collapse all folding ranges when a class is opened for the first time. | `boolean` | `false` | |
60+
| `"objectscript.openClassContracted"` | Automatically collapse all class member folding ranges when a class is opened for the first time. | `boolean` | `false` | |
6061
| `"objectscript.overwriteServerChanges"` | Overwrite a changed server version without confirmation when importing the local file. | `boolean` | `false` | |
6162
| `"objectscript.serverSideEditing"` | Allow editing code directly on the server after opening it from ObjectScript Explorer. | `boolean` | `false` | |
6263
| `"objectscript.serverSourceControl.disableOtherActionTriggers"` | Prevent server-side source control 'other action' triggers from firing. | `boolean` | `false` | |

package-lock.json

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

package.json

Lines changed: 22 additions & 27 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": "1.5.2022032101-SNAPSHOT",
5+
"version": "1.7.2022040601-SNAPSHOT",
66
"icon": "images/logo.png",
77
"aiKey": "9cd75d51-697c-406c-a929-2bcf46e97c64",
88
"categories": [
@@ -47,12 +47,11 @@
4747
}
4848
],
4949
"engines": {
50-
"vscode": "^1.63.0"
50+
"vscode": "^1.66.0"
5151
},
5252
"enabledApiProposals": [
5353
"fileSearchProvider",
54-
"textSearchProvider",
55-
"outputChannelLanguage"
54+
"textSearchProvider"
5655
],
5756
"activationEvents": [
5857
"onDebug",
@@ -92,8 +91,7 @@
9291
"viewsWelcome": [
9392
{
9493
"view": "explorer",
95-
"contents": "Begin 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://intersystems-community.github.io/vscode-objectscript/serverside/).\n[Choose Server and Namespace](command:vscode-objectscript.addServerNamespaceToWorkspace)",
96-
"when": "!isWeb"
94+
"contents": "Begin 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://intersystems-community.github.io/vscode-objectscript/serverside/).\n[Choose Server and Namespace](command:vscode-objectscript.addServerNamespaceToWorkspace)"
9795
},
9896
{
9997
"view": "ObjectScriptExplorer",
@@ -550,8 +548,7 @@
550548
{
551549
"category": "ObjectScript",
552550
"command": "vscode-objectscript.export",
553-
"title": "Export Code from Server",
554-
"enablement": "!isWeb"
551+
"title": "Export Code from Server"
555552
},
556553
{
557554
"category": "ObjectScript",
@@ -669,8 +666,7 @@
669666
{
670667
"category": "ObjectScript",
671668
"command": "vscode-objectscript.serverActions",
672-
"title": "Server Actions...",
673-
"enablement": "!isWeb"
669+
"title": "Server Actions..."
674670
},
675671
{
676672
"category": "ObjectScript",
@@ -707,20 +703,17 @@
707703
{
708704
"category": "ObjectScript",
709705
"command": "vscode-objectscript.addServerNamespaceToWorkspace",
710-
"title": "Add Server Namespace to Workspace...",
711-
"enablement": "!isWeb"
706+
"title": "Add Server Namespace to Workspace..."
712707
},
713708
{
714709
"category": "ObjectScript",
715710
"command": "vscode-objectscript.connectFolderToServerNamespace",
716-
"title": "Connect Folder to Server Namespace...",
717-
"enablement": "!isWeb"
711+
"title": "Connect Folder to Server Namespace..."
718712
},
719713
{
720714
"category": "ObjectScript",
721715
"command": "vscode-objectscript.hideExplorerForWorkspace",
722-
"title": "Hide Explorer for Workspace",
723-
"enablement": "!isWeb"
716+
"title": "Hide Explorer for Workspace"
724717
},
725718
{
726719
"category": "ObjectScript",
@@ -746,34 +739,32 @@
746739
"category": "ObjectScript",
747740
"command": "vscode-objectscript.showClassDocumentationPreview",
748741
"title": "Show Class Documentation Preview",
749-
"enablement": "!isWeb",
750742
"icon": "$(open-preview)"
751743
},
752744
{
753745
"category": "ObjectScript",
754746
"command": "vscode-objectscript.exportCurrentFile",
755-
"title": "Export Current File from Server",
756-
"enablement": "!isWeb"
747+
"title": "Export Current File from Server"
757748
}
758749
],
759750
"keybindings": [
760751
{
761752
"command": "vscode-objectscript.compile",
762753
"key": "Ctrl+F7",
763754
"mac": "Cmd+F7",
764-
"when": "!isWeb && editorLangId =~ /^objectscript/"
755+
"when": "editorLangId =~ /^objectscript/"
765756
},
766757
{
767758
"command": "vscode-objectscript.compileAll",
768759
"key": "Ctrl+Shift+F7",
769760
"mac": "Cmd+Shift+F7",
770-
"when": "!isWeb && editorLangId =~ /^objectscript/"
761+
"when": "editorLangId =~ /^objectscript/"
771762
},
772763
{
773764
"command": "vscode-objectscript.viewOthers",
774765
"key": "Ctrl+Shift+V",
775766
"mac": "Cmd+Shift+V",
776-
"when": "!isWeb && editorLangId =~ /^objectscript/"
767+
"when": "editorLangId =~ /^objectscript/"
777768
}
778769
],
779770
"configuration": {
@@ -898,6 +889,7 @@
898889
"atelier": true,
899890
"generated": false,
900891
"filter": "",
892+
"exactFilter": "",
901893
"category": "*",
902894
"noStorage": false,
903895
"dontExportIfNoChanges": false,
@@ -957,6 +949,10 @@
957949
"markdownDescription": "SQL filter to limit what to export. The filter is applied to document names using the [LIKE predicate](https://irisdocs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_like) (i.e. `Name LIKE '%filter%'`).",
958950
"type": "string"
959951
},
952+
"exactFilter": {
953+
"markdownDescription": "SQL filter to limit what to export. The filter is applied to document names using the [LIKE predicate](https://irisdocs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_like) (i.e. `Name LIKE 'exactFilter'`). If provided, `objectscript.export.filter` is ignored.",
954+
"type": "string"
955+
},
960956
"category": {
961957
"markdownDescription": "Category of source code to export: `CLS` = classes; `RTN` = routines; `CSP` = csp files; `OTH` = other. Default is `*` = all.",
962958
"type": [
@@ -1068,7 +1064,7 @@
10681064
"default": false
10691065
},
10701066
"objectscript.openClassContracted": {
1071-
"description": "Automatically collapse all folding ranges when a class is opened for the first time.",
1067+
"description": "Automatically collapse all class member folding ranges when a class is opened for the first time.",
10721068
"type": "boolean",
10731069
"default": false
10741070
},
@@ -1084,7 +1080,7 @@
10841080
{
10851081
"id": "ObjectScriptExplorer",
10861082
"name": "Explorer",
1087-
"when": "!isWeb && workspaceFolderCount != 0 && config.objectscript.showExplorer == true"
1083+
"when": "workspaceFolderCount != 0 && config.objectscript.showExplorer == true"
10881084
}
10891085
]
10901086
},
@@ -1114,7 +1110,6 @@
11141110
"label": "ObjectScript Debug",
11151111
"program": "./out/debug/debugAdapter.js",
11161112
"runtime": "node",
1117-
"when": "!isWeb",
11181113
"configurationAttributes": {
11191114
"launch": {
11201115
"required": [],
@@ -1207,14 +1202,14 @@
12071202
"test": "node ./out/test/runTest.js",
12081203
"lint": "eslint src/**",
12091204
"lint-fix": "eslint --fix src/**",
1210-
"download-api": "vscode-dts dev 1.65.0",
1205+
"download-api": "vscode-dts dev 1.66.0",
12111206
"postinstall": "npm run download-api"
12121207
},
12131208
"devDependencies": {
12141209
"@types/glob": "^7.1.2",
12151210
"@types/mocha": "^7.0.2",
12161211
"@types/node": "^14.18.0",
1217-
"@types/vscode": "^1.43.0",
1212+
"@types/vscode": "^1.66.0",
12181213
"@types/ws": "^7.2.5",
12191214
"@types/xmldom": "^0.1.29",
12201215
"@typescript-eslint/eslint-plugin": "^4.32.0",

src/api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ export class AtelierAPI {
286286
const agent = new http.Agent({
287287
keepAlive: true,
288288
maxSockets: 10,
289-
rejectUnauthorized: https && config("http.proxyStrictSSL"),
289+
rejectUnauthorized: https && vscode.workspace.getConfiguration("http").get("proxyStrictSSL"),
290290
});
291291

292292
let pathPrefix = this._config.pathPrefix || "";

src/commands/compile.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@ import {
1414
} from "../extension";
1515
import { DocumentContentProvider } from "../providers/DocumentContentProvider";
1616
import {
17+
cspAppsForUri,
1718
currentFile,
1819
CurrentFile,
1920
currentFileFromContent,
20-
currentWorkspaceFolder,
2121
outputChannel,
2222
throttleRequests,
23-
uriOfWorkspaceFolder,
2423
} from "../utils";
2524
import { PackageNode } from "../explorer/models/packageNode";
2625
import { NodeBase } from "../explorer/models/nodeBase";
@@ -423,10 +422,7 @@ export async function importFolder(uri: vscode.Uri, noCompile = false): Promise<
423422
return importFiles([uripath], noCompile);
424423
}
425424
let globpattern = "*.{cls,inc,int,mac}";
426-
const workspace = currentWorkspaceFolder();
427-
const workspacePath = uriOfWorkspaceFolder(workspace).fsPath;
428-
const folderPathNoWorkspaceArr = uripath.replace(workspacePath + path.sep, "").split(path.sep);
429-
if (folderPathNoWorkspaceArr.includes("csp")) {
425+
if (cspAppsForUri(uri).findIndex((cspApp) => uri.path.includes(cspApp + "/") || uri.path.endsWith(cspApp)) != -1) {
430426
// This folder is a CSP application, so import all files
431427
// We need to include eveything becuase CSP applications can
432428
// include non-InterSystems files

src/commands/export.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ export async function exportAll(): Promise<any> {
246246
}
247247
const api = new AtelierAPI(workspaceFolder);
248248
outputChannel.show(true);
249-
const { category, generated, filter } = config("export", workspaceFolder);
249+
const { category, generated, filter, exactFilter } = config("export", workspaceFolder);
250250
// Replicate the behavior of getDocNames() but use StudioOpenDialog for better performance
251251
let filterStr = "";
252252
switch (category) {
@@ -263,11 +263,18 @@ export async function exportAll(): Promise<any> {
263263
filterStr = "Type %INLIST $LISTFROMSTRING('0,1,2,3,11,12')";
264264
break;
265265
}
266-
if (filter !== "") {
267-
if (filterStr !== "") {
268-
filterStr += " AND ";
266+
if (filter !== "" || exactFilter !== "") {
267+
if (exactFilter !== "") {
268+
if (filterStr !== "") {
269+
filterStr += " AND ";
270+
}
271+
filterStr += `Name LIKE '${exactFilter}'`;
272+
} else {
273+
if (filterStr !== "") {
274+
filterStr += " AND ";
275+
}
276+
filterStr += `Name LIKE '%${filter}%'`;
269277
}
270-
filterStr += `Name LIKE '%${filter}%'`;
271278
}
272279
return api
273280
.actionQuery("SELECT Name FROM %Library.RoutineMgr_StudioOpenDialog(?,?,?,?,?,?,?,?)", [

0 commit comments

Comments
 (0)