Skip to content

Document IntelliSense AttributeHoverProvider + relevant files - #1502

Merged
rthomas320 merged 1 commit into
apache:mainfrom
ctc-oss:jy/1493
Jan 21, 2026
Merged

Document IntelliSense AttributeHoverProvider + relevant files#1502
rthomas320 merged 1 commit into
apache:mainfrom
ctc-oss:jy/1493

Conversation

@JeremyYao

@JeremyYao JeremyYao commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

Closes #1493

Description

Document IntelliSense AttributeHoverProvider + relevant files

Wiki

  • I have determined that no documentation updates are needed for these changes
  • I have added following documentation for these changes

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.

@JeremyYao
JeremyYao requested a review from rthomas320 October 30, 2025 14:06
@JeremyYao JeremyYao self-assigned this Oct 30, 2025
@JeremyYao JeremyYao added documentation Improvements or additions to documentation code quality Issues related to code quality code completion Issues related to DFDL code completion capability labels Oct 30, 2025
@JeremyYao JeremyYao added this to the 1.5.0 milestone Oct 30, 2025
@JeremyYao JeremyYao moved this to In Review in daffodil-vscode v1.5.0 Oct 30, 2025

@rthomas320 rthomas320 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but contains the code suggested to be modified in PR #1495.

@scholarsmate

Copy link
Copy Markdown
Contributor

@JeremyYao, the conflicts need to be resolved before this can be approved.

@scholarsmate scholarsmate left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, but need to resolve the conflicts.

@JeremyYao

Copy link
Copy Markdown
Contributor Author

Looks good, but contains the code suggested to be modified in PR #1495.

@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.

@JeremyYao

Copy link
Copy Markdown
Contributor Author

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

@JeremyYao JeremyYao moved this from In Progress to In Review in daffodil-vscode v1.6.0 Jan 8, 2026
@JeremyYao

Copy link
Copy Markdown
Contributor Author

Moved to in review due to conflicts being addressed and incorporating changes suggested in #1495.

@rthomas320 rthomas320 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Integrates with DFDL specification data"
I'm not sure this accurate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Links to DFDL specification documentation"
Currently the hover tips do not provide any links to the specification

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Integration with DFDL specification data"
If this refers to links to the specification, it is not accurate

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Looking up documentation from the attribute hover items data"
The tool tip displayed is the markdownString value from attributeCompletion function in attributeItems.ts

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@rthomas320 rthomas320 Jan 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The documentation includes descriptions, valid values, examples, and links"
The markdownStrings that supply the hover tips do not include any links.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have the line omitted.

@JeremyYao

Copy link
Copy Markdown
Contributor Author

@rthomas320, performed changes as noted by my comment responses

@rthomas320 rthomas320 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@rthomas320
rthomas320 merged commit 294a769 into apache:main Jan 21, 2026
172 of 188 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in daffodil-vscode v1.6.0 Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code completion Issues related to DFDL code completion capability code quality Issues related to code quality documentation Improvements or additions to documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Task: Document IntelliSense AttributeHoverProvider + relevant files

4 participants