reqlanOverviewIdeasFilesCode filesClustersAttributesGraphPrint
Ideas/refactor_changes

Idea detail

refactor_changes

reqlan rq/extension/refactor_support.rq:4

block

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.

Jump to outbound references

Jump to inbound references

Navigation

Source file

reqlan rq/extension/refactor_support.rq

community 31

community cluster

refactor_support.rq

file cluster

reqlan rq/extension

folder cluster

status: Not present

status cluster

tag: Not present

tag cluster

Printable page

Static print-friendly idea sheet.

Attributes

No attributes declared.

Ancestor context

refactor_file_moves

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_rename

Syntactic 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_move

An 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_delete

An 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"].

Outbound references

KindIdeaPathSnippet
file_reference ../../packages/analytical/src/index-store/workspace-index.ts packages/analytical/src/index-store/workspace-index.ts workspace-index.ts
file_reference ../../packages/extension/src/analytical_submodule/index-store/index-service.ts packages/extension/src/analytical_submodule/index-store/index-service.ts index-service.ts
file_reference ../../packages/extension/src/mutation_hooks_module/file-move-plan.ts packages/extension/src/mutation_hooks_module/file-move-plan.ts —
file_reference ../../packages/extension/src/mutation_hooks_module/file-mutation-gate.ts packages/extension/src/mutation_hooks_module/file-mutation-gate.ts —
file_reference ../../packages/extension/src/mutation_hooks_module/register-file-mutation-hooks.ts packages/extension/src/mutation_hooks_module/register-file-mutation-hooks.ts register-file-mutation-hooks.ts
file_reference ../../packages/extension/src/refactor_module/register-comment-rename-provider.ts packages/extension/src/refactor_module/register-comment-rename-provider.ts —
file_reference ../../packages/extension/src/refactor_module/register-idea-refactor-commands.ts packages/extension/src/refactor_module/register-idea-refactor-commands.ts —
file_reference ../../packages/language/src/file-path-rewrite.ts packages/language/src/file-path-rewrite.ts —
file_reference ../../packages/language/src/reqlan-code-action-provider.ts packages/language/src/reqlan-code-action-provider.ts —
file_reference ../../packages/language/src/reqlan-comment-rename.ts packages/language/src/reqlan-comment-rename.ts —
file_reference ../../packages/language/src/reqlan-idea-refactor.ts packages/language/src/reqlan-idea-refactor.ts reqlan-idea-refactor.ts
file_reference ../../packages/language/src/reqlan-name-provider.ts packages/language/src/reqlan-name-provider.ts —
file_reference ../../packages/language/src/reqlan-path-references.ts packages/language/src/reqlan-path-references.ts —
file_reference ../../packages/language/src/reqlan-rename-provider.ts packages/language/src/reqlan-rename-provider.ts —
file_reference ../../packages/language/test/comment-rename.test.ts:builds rename edits for matching comment idea tokens packages/language/test/comment-rename.test.ts:builds rename edits for matching comment idea tokens —
file_reference ../../packages/language/test/file-path-rewrite.test.ts:buildInboundPathRewriteEdits quotes replacement paths packages/language/test/file-path-rewrite.test.ts:buildInboundPathRewriteEdits quotes replacement paths —
file_reference ../../packages/language/test/file-path-rewrite.test.ts:preserves extensionless inbound paths packages/language/test/file-path-rewrite.test.ts:preserves extensionless inbound paths —
file_reference ../../packages/language/test/file-path-rewrite.test.ts:updates inbound import path when the target file moves packages/language/test/file-path-rewrite.test.ts:updates inbound import path when the target file moves —
file_reference ../../packages/language/test/file-path-rewrite.test.ts:updates paths when a file moves to a sibling directory packages/language/test/file-path-rewrite.test.ts:updates paths when a file moves to a sibling directory —
file_reference ../../packages/language/test/idea-refactor.test.ts:delete plan removes declaration and bracket references packages/language/test/idea-refactor.test.ts:delete plan removes declaration and bracket references —
file_reference ../../packages/language/test/idea-refactor.test.ts:move plan cuts from source and inserts into destination packages/language/test/idea-refactor.test.ts:move plan cuts from source and inserts into destination —
file_reference ../../packages/language/test/linking.test.ts:rename finds all idea references including wikilinks packages/language/test/linking.test.ts:rename finds all idea references including wikilinks —
file_reference ../../packages/language/test/rename-provider.test.ts:rename also updates rq comment idea tokens in the same document packages/language/test/rename-provider.test.ts:rename also updates rq comment idea tokens in the same document —
file_reference ../../packages/language/test/rename-provider.test.ts:rename updates declaration and wikilink references packages/language/test/rename-provider.test.ts:rename updates declaration and wikilink references —
file_reference ./features-mutation-hooks.rq reqlan rq/extension/features-mutation-hooks.rq —
file_reference ./syntax/features-syntax.rq reqlan rq/extension/syntax/features-syntax.rq —
references refactor_file_moves reqlan rq/extension/refactor_support.rq refactor_file_moves
references refactor_symbol_delete reqlan rq/extension/refactor_support.rq refactor_symbol_delete
references refactor_symbol_move reqlan rq/extension/refactor_support.rq refactor_symbol_move
references refactor_symbol_rename reqlan rq/extension/refactor_support.rq refactor_symbol_rename

Inbound references

KindIdeaPathSnippet
references refactor_symbol_delete reqlan rq/extension/refactor_support.rq refactor_changes
references refactor_symbol_move reqlan rq/extension/refactor_support.rq refactor_changes

Unresolved references

KindIdeaPathSnippet
None

Local graph

Initialising graph…