Document IntelliSense AttributeHoverProvider + relevant files - #1502
Conversation
rthomas320
left a comment
There was a problem hiding this comment.
Looks good, but contains the code suggested to be modified in PR #1495.
|
@JeremyYao, the conflicts need to be resolved before this can be approved. |
@rthomas320, I copied the md file contents from #1495 (which contains the MD suggested fixes) and then integrated the changes from this PR into #1495 intellisense.md file. |
|
The relevant portion that's added and not inside of #1495 is MD contents that relates to attributeHover.ts. For example ##### attributeHover.ts
**Purpose:** Hover provider that displays documentation tooltips when users hover over DFDL/XSD attribute names. The attribute's tooltips are obtained from `attributeItems.ts`
**Key Functionality:**
- Provides rich formatted documentation for DFDL properties and XSD attributes
- Displays attribute descriptions, valid values, usage examples, and spec references
- Handles both prefixed (dfdl:property) and unprefixed attribute names
- Integrates with DFDL specification data
- Quick reference without leaving the editor
**Documentation Categories:**
- XSD Core Attributes (name, ref, minOccurs, maxOccurs)
- DFDL Length Properties (dfdl:length, dfdl:lengthKind, dfdl:lengthUnits)
- DFDL Encoding (dfdl:encoding, dfdl:utf16Width)
- DFDL Binary/Text Properties (dfdl:binaryNumberRep, dfdl:textNumberPattern)
- DFDL Delimiters (dfdl:separator, dfdl:terminator, dfdl:initiator)
- DFDL Assertions (testKind, test, testPattern)
**Provider Registered:**
- `getAttributeHoverProvider()`: For DFDL documents |
|
Moved to in review due to conflicts being addressed and incorporating changes suggested in #1495. |
rthomas320
left a comment
There was a problem hiding this comment.
I commented on a few items that should be updated.
| - Provides rich formatted documentation for DFDL properties and XSD attributes | ||
| - Displays attribute descriptions, valid values, usage examples, and spec references | ||
| - Handles both prefixed (dfdl:property) and unprefixed attribute names | ||
| - Integrates with DFDL specification data |
There was a problem hiding this comment.
"Integrates with DFDL specification data"
I'm not sure this accurate.
There was a problem hiding this comment.
Good catch! I agree with this. I'll omit the - Integrates with DFDL specification data line.
| * - Attribute description and purpose | ||
| * - Valid values and their meanings | ||
| * - Usage examples | ||
| * - Links to DFDL specification documentation |
There was a problem hiding this comment.
"Links to DFDL specification documentation"
Currently the hover tips do not provide any links to the specification
There was a problem hiding this comment.
I'll have the line omitted.
| * - Rich formatted hover text with markdown support | ||
| * - Context-sensitive documentation for DFDL properties | ||
| * - Handles both prefixed (dfdl:property) and unprefixed attribute names | ||
| * - Integration with DFDL specification data |
There was a problem hiding this comment.
"Integration with DFDL specification data"
If this refers to links to the specification, it is not accurate
There was a problem hiding this comment.
I'll have the line omitted.
| * 1. Detecting the word under the cursor | ||
| * 2. Checking if it's a valid DFDL attribute name | ||
| * 3. Adding the 'dfdl:' prefix if not already present | ||
| * 4. Looking up documentation from the attribute hover items data |
There was a problem hiding this comment.
"Looking up documentation from the attribute hover items data"
The tool tip displayed is the markdownString value from attributeCompletion function in attributeItems.ts
There was a problem hiding this comment.
I'll have this line omitted and I'll re-adjust the bullet point numberings.
| * 4. Looking up documentation from the attribute hover items data | ||
| * 5. Displaying the documentation in a hover tooltip | ||
| * | ||
| * The documentation includes descriptions, valid values, examples, and links |
There was a problem hiding this comment.
"The documentation includes descriptions, valid values, examples, and links"
The markdownStrings that supply the hover tips do not include any links.
There was a problem hiding this comment.
I'll have the line omitted.
|
@rthomas320, performed changes as noted by my comment responses |
Closes #1493
Description
Document IntelliSense AttributeHoverProvider + relevant files
Wiki
Review Instructions including Screenshots
Ensure comments and documentation looks valid. Additionally, items in src/language/providers/intellisense/attributeItems.ts have been shuffled around. Make sure no items in there are missing or omitted.