Skip to content

Support deleting folders#1705

Merged
isc-klu merged 16 commits intomasterfrom
delete-folder
Feb 5, 2026
Merged

Support deleting folders#1705
isc-klu merged 16 commits intomasterfrom
delete-folder

Conversation

@isc-klu
Copy link
Collaborator

@isc-klu isc-klu commented Jan 28, 2026

Major Changes

This PR fixes #1638.

Previously, the plugin only supported deletion of individual files. It now deletes all files whose paths start with the affected path:

  • If the affected path points to a single file, that file is deleted (unchanged behavior).
  • If the affected path is a directory, all files under that directory are deleted.

To support this, WSFolderIndex now stores mappings only for importable files (web app files and virtual documents).

Additional Changes

  • Removed the “Launch Extension Alone” debug option, which is no longer valid since the extension now depends on InterSystems Server Manager.
  • Simplified updateIndexForDocument(uri, docs?, uris?, content?) → updateIndex(uri, content?) because no external callers supply docs or uris.
  • Simplified removeDocumentFromIndex(uri, docs?, uris?) → removeDocumentFromIndex(uri, docs, uris) since all callers supply the parameters.
  • Simplified isClassOrRtn(uri | str) → isClassOrRtn(str) by requiring callers to handle the needed uri → string conversion.
  • Renamed uriIsParentOf → uriContains because the function is checking the containment relationship (reflective, transitive closure of the parent relationship) rather than just the parent relationship.
  • Loosen uriContains (previously, uriIsParentOf) to also return true when its inputs are identical documents rather than folders.
  • Deduplicated the WSFolderIndex["documents"] and WSFolderIndex["uris"] types.
  • Deduplicated a repeated check used for watcher.onDid{Change, Create, Delete}.
  • Added Prettier as an optional dev dependency to match .vscode/settings.json and assist future contributors with linting.

@isc-bsaviano

This comment was marked as resolved.

@isc-bsaviano
Copy link
Contributor

I downloaded the latest test VSIX for this PR (attached to this Actions run) and deletions weren't working for me at all. I deleted a individual routine from the files explorer, but it wasn't deleted on the server.

@isc-klu
Copy link
Collaborator Author

isc-klu commented Feb 4, 2026

I downloaded the latest test VSIX for this PR (attached to this Actions run) and deletions weren't working for me at all. I deleted a individual routine from the files explorer, but it wasn't deleted on the server.

The recent commits fix a problem with deleting individual documents, which probably fix your problem. I incorrectly assumed that uriIsParentOf returns true when the two input URIs are identical. It's fixed now. Could you try again?

I tested with the following set up:

Screenshot 2026-02-04 at 2 50 35 PM

Both deletion of individual documents and deletion of the P1 folder work for me.

@isc-bsaviano
Copy link
Contributor

I tested the latest VSIX. File and folder deletes both work. I tested with classes, a CSP file, and an abstract document. I did notice that getServerDocName() did not return the correct name for DFI files, but that issue is a separate issue that is not caused by this PR. Therefore I'll approve this and then look into that issue.

@isc-klu isc-klu merged commit b5a29ec into master Feb 5, 2026
5 checks passed
@isc-klu isc-klu deleted the delete-folder branch February 5, 2026 16:28
LeoAnders added a commit to consistem/vscode-objectscript that referenced this pull request Feb 17, 2026
…am (#94)

* Prevent users from accidentally opening multiple copies of the same class or routine (intersystems-community#1666)

* Fix opening server-side generated INT routines (intersystems-community#1668)

* Fix running unit tests from a root test item (intersystems-community#1669)

* Bump js-yaml from 4.1.0 to 4.1.1 (intersystems-community#1670)

Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](nodeca/js-yaml@4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump glob from 11.0.1 to 11.1.0 (intersystems-community#1673)

Bumps [glob](https://github.com/isaacs/node-glob) from 11.0.1 to 11.1.0.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](isaacs/node-glob@v11.0.1...v11.1.0)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 11.1.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix automatic refresh of server-side documents after save and compile (intersystems-community#1678)

* Fix `Show Plan` for IRIS 2026.1+ (intersystems-community#1679)

* Insert file stub snippet when creating a new class or routine using client-side editing (intersystems-community#1681)

* chore: `npm audit fix` (intersystems-community#1682)

* Trigger server-side source control `OpenedDocument` UserAction after a project is modified (intersystems-community#1685)

* Remove barely used configuration settings (intersystems-community#1683)

* Prepare 3.4.0 release (intersystems-community#1692)

* auto bump version with release

* Add `Func` suffix to `Copy Invocation` result for Queries (intersystems-community#1695)

* Fix extension activation when clicking on InterSystems view container in an empty workspace folder (intersystems-community#1694)

* Update contributing guidelines (intersystems-community#1700)

* Remove UI component dependency from REST debugging Webview (intersystems-community#1702)

* Bump @isaacs/brace-expansion from 5.0.0 to 5.0.1 (intersystems-community#1708)

Bumps @isaacs/brace-expansion from 5.0.0 to 5.0.1.

---
updated-dependencies:
- dependency-name: "@isaacs/brace-expansion"
  dependency-version: 5.0.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Integrate new BPL Editor (intersystems-community#1699)

* Adopt new VS Code APIs to improve QuickPicks (intersystems-community#1709)

* Support deleting folders (intersystems-community#1705)

Fix intersystems-community#1638 and improve maintainability

---------

Co-authored-by: klu <kc.lu@intersystems.com>

* Fix mapping of client-side DFI file to its document name (intersystems-community#1711)

* Move command to export Project contents to Command Palette (intersystems-community#1707)

* Bump webpack from 5.98.0 to 5.105.0 (intersystems-community#1712)

Bumps [webpack](https://github.com/webpack/webpack) from 5.98.0 to 5.105.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Changelog](https://github.com/webpack/webpack/blob/main/CHANGELOG.md)
- [Commits](webpack/webpack@v5.98.0...v5.105.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-version: 5.105.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove barely used commands (intersystems-community#1710)

* Bump axios from 1.13.2 to 1.13.5 (intersystems-community#1714)

Bumps [axios](https://github.com/axios/axios) from 1.13.2 to 1.13.5.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.13.2...v1.13.5)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Open all web links in Integrated Browser (intersystems-community#1713)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Brett Saviano <bsaviano@intersystems.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Murray <johnm@georgejames.com>
Co-authored-by: ProjectBot <bot@users.noreply.github.com>
Co-authored-by: Kuang-Chen (KC) Lu <klu@intersystems.com>
Co-authored-by: klu <kc.lu@intersystems.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client-side editing: Deleting a folder should delete any contained documents on the server

2 participants

Comments