fix: filetree rename file correctly #3108
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Types
Background or solution
๐ค Generated by Copilot at b1b9c17
File
orDirectory
instances before calling methods or accessing properties that are specific to those types, such asupdateMetaData
,updateChildren
,fileStat
, orchildren
(link, link, link, link, link, link, link, link)uri
in a comment infile-tree.service.ts
to follow the code style convention (link)updateChildren
to theFileTreeService
class infile-tree.service.ts
that recursively updates the metadata of the children nodes of a moved directory node (link)refresh
method in theFileTreeService
class infile-tree.service.ts
to accept either a directory or a file node as an argument and refresh the parent directory of a file node or the directory node itself (link)rename
method in theFileTreeModelService
class infile-tree-model.service.ts
to set or unset theupdateRefreshable
flag before and after certain file operations, such as moving, validating, or deselecting nodes, to indicate whether the file tree service should refresh the file tree data (link, link)close #3090
Changelog
๐ค Generated by Copilot at b1b9c17
This pull request enhances the file tree service and model by adding or improving type guards, metadata, and refresh logic. These changes improve the type safety, consistency, and usability of the file tree data and operations. The files affected are
file-tree.service.ts
,file-tree-model.service.ts
, andfile-tree-node.define.ts
.