reqlanOverviewIdeasFilesCode filesClustersAttributesGraphPrint

Printable idea sheet

comment_reference_refactor_support

reqlan rq/extension/mutation/refactor_support.rq:119

Katz 0.215

File and symbol refactors must update comment_reference tokens in code files and in `.rq` comments.
When a file or folder moves or is renamed, rewrite `rq:idea` paths relative to the referencing file: outbound paths inside the moved file, and inbound paths in other files that pointed at it. Aliased paths such as `rq:idea` keep the alias and update the remainder.
When an idea is renamed, update matching comment idea tokens.
When an idea moves to another `.rq` file, rewrite qualified comment paths that targeted the old file for that idea. Pathless `rq:idea` tokens stay as name-only links.
When an idea is deleted, remove comment references that targeted it.
Relates to refactor_file_moves, refactor_symbol_rename, refactor_symbol_move, refactor_symbol_delete, refactor_changes, move_file, rename_file, references_in_functional_code_comments.

implementation
reqlan-path-references.ts, file-path-rewrite.ts, reqlan-idea-refactor.ts, reqlan-comment-rename.ts, file-move-plan.ts, expand-renamed-paths.ts, collect-inbound-referencers.ts, collect-inbound-referencers-core.ts, register-idea-refactor-commands.ts
status
done
tests
file-path-rewrite.test.ts:rewrites inbound comment paths when the target rq file moves, file-path-rewrite.test.ts:finds comment paths in moved rq files together with imports, idea-refactor.test.ts:move plan rewrites qualified comment paths for the moved idea, idea-refactor.test.ts:delete plan removes matching comment references, collect-inbound-referencers.test.ts:includes comment_link target files when an rq file moves, comment-rename.test.ts:builds rename edits for matching comment idea tokens

Interactive page: comment_reference_refactor_support