Idea detail
refactor_changes
reqlan rq/extension/refactor_support.rq:4
Summary
On rename, move, or delete of files or symbols, the extension should update the
idea index, import statements, embedded file references, comment references, and
other idea references that are affected.
The index should be resilient to duplication, particularly when ideas move between files:
the old hosting file URI must be cleared before or when the destination is reindexed.
refactor_file_moves refactor_symbol_rename refactor_symbol_move refactor_symbol_delete
Implemented by workspace-index.ts, index-service.ts, reqlan-idea-refactor.ts, and register-file-mutation-hooks.ts.
Attributes
No attributes declared.
Ancestor context
The extension should watch for file moves and renames, migrate the index for moved . rq files, and update imports and path references both inside the moved file ( outbound ) and in other files that pointed at it ( inbound ), including comment paths in code files. There should be a single prompt per batch asking whether to apply path updates, aligned with [move_file] and [rename_file]. Implemented by ["../../packages/extension/src/mutation_hooks_module/register-file-mutation-hooks.ts"], ["../../packages/extension/src/mutation_hooks_module/file-move-plan.ts"], ["../../packages/extension/src/mutation_hooks_module/file-mutation-gate.ts"], ["../../packages/language/src/file-path-rewrite.ts"], and ["../../packages/language/src/reqlan-path-references.ts"].
refactor_symbol_renameSyntactic symbols ( ideas, ideasets, import aliases, and import paths ) should be renamable via the editor rename action ( F2 / LSP rename ). Rename should update AST references across. rq files and matching `rq:["path".idea]` comment idea tokens in source files. [refactor_support] Implemented by ["../../packages/language/src/reqlan-rename-provider.ts"], ["../../packages/language/src/reqlan-comment-rename.ts"], ["../../packages/language/src/reqlan-name-provider.ts"], and ["../../packages/extension/src/refactor_module/register-comment-rename-provider.ts"].
refactor_symbol_moveAn idea declaration should offer a code action to move it to another. rq file. Moving should cut the declaration from the source, insert it into the destination, rewrite imports and references ( including comment references ), and reindex without leaving duplicate idea rows for the old hosting file. [refactor_support] [refactor_changes] Implemented by ["../../packages/language/src/reqlan-idea-refactor.ts"], ["../../packages/language/src/reqlan-code-action-provider.ts"], and ["../../packages/extension/src/refactor_module/register-idea-refactor-commands.ts"].
refactor_symbol_deleteAn idea declaration should offer a code action to delete it and update references. Deleting should remove the declaration, clear or rewrite AST and comment references that targeted it, and reindex affected files. [refactor_support] [refactor_changes] Implemented by ["../../packages/language/src/reqlan-idea-refactor.ts"], ["../../packages/language/src/reqlan-code-action-provider.ts"], and ["../../packages/extension/src/refactor_module/register-idea-refactor-commands.ts"].
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | refactor_symbol_delete | reqlan rq/extension/refactor_support.rq | refactor_changes |
| references | refactor_symbol_move | reqlan rq/extension/refactor_support.rq | refactor_changes |
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| None | |||
Initialising graph…