Description
When reading or editing a Markdown OpenFastTrace document, users see its specification item IDs in the Markdown Structure / File Structure view and can jump to an ID with one click.
Each item appears beneath the last Markdown header before it. The IDs remain in their order of appearance in the document, so the outline gives a faithful, lightweight map of the specification currently being read. An item before the first header appears at the document root.
Scope
- Support Markdown documents only.
- Add only recognized OFT specification item declaration IDs to the existing Markdown Structure / File Structure view.
- Place every ID under the last preceding Markdown header, or under the document root if no preceding header exists.
- Keep IDs in source order within each header.
- Navigate to the exact declaration when the user selects an ID.
- Reflect unsaved editor changes.
- Preserve the existing Markdown header tree and its navigation behavior.
Out of scope:
- RST, plain text, source files, and other formats that can contain OFT directives.
- Every textual OFT ID occurrence, including
Covers: references and coverage tags.
- Specification titles, trace status, links, coverage, trace defects, and the requirement network.
- A separate OFT tool window, project-wide OFT browser, or replacement for Go to Symbol.
Motivation
The plugin already supports project-wide search and navigation of OFT IDs. This feature gives users a faster file-local overview while they read a Markdown specification: they can see the declared items in the same structure that organizes the document and navigate without manually scanning a long file.
Technical Notes
Use IntelliJ StructureViewExtension to amend the existing Markdown Structure view rather than replace it. Preserve native Markdown header nodes and add synthetic, navigable OFT ID nodes beneath the relevant header.
Build the nodes from the focused document text using OftSyntaxCore.findDefinitionSpecificationItems() and its source offsets, not from the project index. This reuses the existing recognition rules, includes plain and single-backtick Markdown declaration lines, and keeps the outline accurate for unsaved edits.
Associate each declaration with the last preceding Markdown header, retaining declaration order within that header. Add IntelliJ light-fixture tests for header preservation, root-level declarations, header association, source ordering, navigation, and document-edit updates. Do not add third-party dependencies.
Description
When reading or editing a Markdown OpenFastTrace document, users see its specification item IDs in the Markdown Structure / File Structure view and can jump to an ID with one click.
Each item appears beneath the last Markdown header before it. The IDs remain in their order of appearance in the document, so the outline gives a faithful, lightweight map of the specification currently being read. An item before the first header appears at the document root.
Scope
Out of scope:
Covers:references and coverage tags.Motivation
The plugin already supports project-wide search and navigation of OFT IDs. This feature gives users a faster file-local overview while they read a Markdown specification: they can see the declared items in the same structure that organizes the document and navigate without manually scanning a long file.
Technical Notes
Use IntelliJ
StructureViewExtensionto amend the existing Markdown Structure view rather than replace it. Preserve native Markdown header nodes and add synthetic, navigable OFT ID nodes beneath the relevant header.Build the nodes from the focused document text using
OftSyntaxCore.findDefinitionSpecificationItems()and its source offsets, not from the project index. This reuses the existing recognition rules, includes plain and single-backtick Markdown declaration lines, and keeps the outline accurate for unsaved edits.Associate each declaration with the last preceding Markdown header, retaining declaration order within that header. Add IntelliJ light-fixture tests for header preservation, root-level declarations, header association, source ordering, navigation, and document-edit updates. Do not add third-party dependencies.