Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Exposing removeFromWorkingSet() API seems error prone #1451

@peterflynn

Description

@peterflynn

A few sprints ago we changed removeFromWorkingSet() from a private method to a public one, to support #1197 (see 59e40a9).

It seems easy to misread this as the API to call when you want the same effect as the user clicking the "X" button in the working set. However, it's actually a low-level model API that doesn't handle prompting for unsaved changes, etc. (The FILE_CLOSE command would be the right thing to call).

I propose we change removeFromWorkingSet() back to private, and have the DocumentCommandHandlers error case call notifyFileDeleted() instead (which is more semantically correct anyway, and is already a public API).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions