diff --git a/README.md b/README.md index bc56cd4..f60854a 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ explains items, coverage and artifact types. | Feature | What it gives you | |---------------------------------------------------------------------|------------------------------------------------------------------| | [Syntax highlighting](doc/user-guide/README.md#syntax-highlighting) | Item IDs, section keywords and coverage tags in their own colors | -| [Hover documentation](doc/user-guide/README.md#hover-documentation) | Title and description of the item an ID refers to | +| [Hover documentation](doc/user-guide/README.md#hover-documentation) | What the item an ID refers to says, section by section | | [Go to definition](doc/user-guide/README.md#go-to-definition) | From a tag to the item, from an item to everything covering it | | [Find references](doc/user-guide/README.md#find-references) | Every coverage tag in the workspace that covers an item | | [Symbol search](doc/user-guide/README.md#symbol-search) | Items through the editor's workspace symbol search | diff --git a/doc/demo/README.md b/doc/demo/README.md index 7f47e5f..71bcb56 100644 --- a/doc/demo/README.md +++ b/doc/demo/README.md @@ -35,10 +35,15 @@ are colored. ### 2. Hover In `src/CoffeeMaker.java`, hover over the target of the first coverage tag, -which is `dsn~brew-cycle~1`. +which is the implementation of `dsn~brew-cycle~1`. > **Expected:** title and description of the design item appear as a tooltip. +Now hover over `dsn~heat-water~2` two tags further down. + +> **Expected:** below the description the tooltip also shows the item's +**Comment**, the section the specification carries for it. + ### 3. Go to definition a) In the same tag, invoke *Go to Definition* on the target diff --git a/doc/spec/features.md b/doc/spec/features.md index e273a3c..7cdd76a 100644 --- a/doc/spec/features.md +++ b/doc/spec/features.md @@ -15,9 +15,9 @@ The language server lists all coverage tags in the workspace that cover a given Needs: req ## Hover Documentation -feat~hover-documentation~1 +feat~hover-documentation~2 -The language server shows a hover tooltip over a coverage tag. The tooltip contains the specification item's title and description. +The language server shows a hover tooltip over a coverage tag. The tooltip describes the specification item the tag refers to. Needs: req diff --git a/doc/spec/requirements.md b/doc/spec/requirements.md index e6614ab..d4a3814 100644 --- a/doc/spec/requirements.md +++ b/doc/spec/requirements.md @@ -36,7 +36,7 @@ req~hover-specification-item~1 When the user hovers over a coverage tag, the server returns a Markdown response describing the specification item. Covers: -* feat~hover-documentation~1 +* feat~hover-documentation~2 Needs: impl, utest diff --git a/doc/user-guide/README.md b/doc/user-guide/README.md index 5172395..1ece178 100644 --- a/doc/user-guide/README.md +++ b/doc/user-guide/README.md @@ -9,7 +9,7 @@ The [demo walkthrough](../demo/README.md) does exactly that. | Feature | Description | |---------------------------------------------|---------------------------------------------------| | [Syntax highlighting](#syntax-highlighting) | IDs, keywords and tags get their own colors | -| [Hover documentation](#hover-documentation) | Title and description of the referenced item | +| [Hover documentation](#hover-documentation) | What the referenced item says, section by section | | [Go to definition](#go-to-definition) | Between a tag and the item, in both directions | | [Find references](#find-references) | Every tag covering an item | | [Symbol search](#symbol-search) | Find items by ID or title | @@ -39,9 +39,19 @@ own name (`[impl~login~2->...]`) and needed coverage (`[dsn->req~login~1>>impl,u ## Hover documentation -Pointing at a specification item ID shows the title and description of the item -it refers to, wherever the ID appears: in a coverage tag, in a `Covers:` list or -on the declaration itself. +Pointing at a specification item ID shows what the item it refers to says, +wherever the ID appears: in a coverage tag, in a `Covers:` list or on the +declaration itself. + +Title and description come first. Below them the tooltip repeats the sections +the item carries, each behind its keyword: `Rationale:`, `Comment:`, `Depends:` +and `Tags:`, and `Status:` where it is not `approved`. A section the item does +not carry is left out. + +`Needs:` and `Covers:` are missing on purpose. Both say where the item sits in +the trace, which the [code lens](#coverage-code-lens) and +[go to definition](#go-to-definition) answer against the current trace instead +of repeating what the item declares.  diff --git a/doc/user-guide/images/hover.png b/doc/user-guide/images/hover.png index a195142..a891204 100644 Binary files a/doc/user-guide/images/hover.png and b/doc/user-guide/images/hover.png differ diff --git a/intellij-plugin/src/main/resources/META-INF/plugin.xml b/intellij-plugin/src/main/resources/META-INF/plugin.xml index fa2b3a2..9a8f42f 100644 --- a/intellij-plugin/src/main/resources/META-INF/plugin.xml +++ b/intellij-plugin/src/main/resources/META-INF/plugin.xml @@ -7,7 +7,7 @@ (OFT) language server into the IDE via the built-in LSP client. The server understands OFT specification items and coverage tags and provides:
Covers: sections and coverage tag targets[impl->...] for every artifact type the workspace needs, including project specific ones.oftignore file in the project root
exclude files from all OFT features, on top of the build output and hidden paths
that are excluded by default