rthomas320 commented on code in PR #1502:
URL: https://github.com/apache/daffodil-vscode/pull/1502#discussion_r2690077131
##########
src/language/intellisense-development.md:
##########
@@ -149,10 +147,35 @@ Hover tooltips can be found under
`attributeHoverValues()` in `attributeHoverIte
- `getAttributeCompletionProvider()`: DFDL document provider
- `getTDMLAttributeCompletionProvider()`: TDML document provider
- `getDefinedTypes()`: Scans for xs:simpleType and xs:complexType declarations
-- `prunedDuplicateAttributes()`: Removes attributes already present on element
+- `prunedDuplicateAttributes()`: Removes attributes already present on the
element
**Trigger:** Space (` `) or newline (`\n`)
+##### 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
Review Comment:
"Integrates with DFDL specification data"
I'm not sure this accurate.
##########
src/language/providers/attributeHover.ts:
##########
@@ -15,16 +15,55 @@
* limitations under the License.
*/
+/**
+ * Attribute Hover Provider for DFDL Documents
+ *
+ * This module provides documentation tooltips when users hover over DFDL
attribute names
+ * in XML elements. It displays helpful information including:
+ * - Attribute description and purpose
+ * - Valid values and their meanings
+ * - Usage examples
+ * - Links to DFDL specification documentation
+ * - Default values and behaviors
+ *
+ * Features:
+ * - 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
Review Comment:
"Integration with DFDL specification data"
If this refers to links to the specification, it is not accurate
##########
src/language/providers/attributeHover.ts:
##########
@@ -15,16 +15,55 @@
* limitations under the License.
*/
+/**
+ * Attribute Hover Provider for DFDL Documents
+ *
+ * This module provides documentation tooltips when users hover over DFDL
attribute names
+ * in XML elements. It displays helpful information including:
+ * - Attribute description and purpose
+ * - Valid values and their meanings
+ * - Usage examples
+ * - Links to DFDL specification documentation
Review Comment:
"Links to DFDL specification documentation"
Currently the hover tips do not provide any links to the specification
##########
src/language/providers/attributeHover.ts:
##########
@@ -15,16 +15,55 @@
* limitations under the License.
*/
+/**
+ * Attribute Hover Provider for DFDL Documents
+ *
+ * This module provides documentation tooltips when users hover over DFDL
attribute names
+ * in XML elements. It displays helpful information including:
+ * - Attribute description and purpose
+ * - Valid values and their meanings
+ * - Usage examples
+ * - Links to DFDL specification documentation
+ * - Default values and behaviors
+ *
+ * Features:
+ * - 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
+ * - Quick reference without leaving the editor
+ *
+ * The hover information is displayed automatically when the user positions
their cursor
+ * over a DFDL attribute name in the schema.
+ */
+
import * as vscode from 'vscode'
import { attributeCompletion } from './intellisense/attributeItems'
+/**
+ * Registers the hover provider for DFDL attribute documentation.
+ *
+ * This provider displays documentation when users hover over DFDL attribute
names.
+ * It works by:
+ * 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
Review Comment:
"Looking up documentation from the attribute hover items data"
The tool tip displayed is the markdownString value from attributeCompletion
function in attributeItems.ts
##########
src/language/providers/attributeHover.ts:
##########
@@ -15,16 +15,55 @@
* limitations under the License.
*/
+/**
+ * Attribute Hover Provider for DFDL Documents
+ *
+ * This module provides documentation tooltips when users hover over DFDL
attribute names
+ * in XML elements. It displays helpful information including:
+ * - Attribute description and purpose
+ * - Valid values and their meanings
+ * - Usage examples
+ * - Links to DFDL specification documentation
+ * - Default values and behaviors
+ *
+ * Features:
+ * - 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
+ * - Quick reference without leaving the editor
+ *
+ * The hover information is displayed automatically when the user positions
their cursor
+ * over a DFDL attribute name in the schema.
+ */
+
import * as vscode from 'vscode'
import { attributeCompletion } from './intellisense/attributeItems'
+/**
+ * Registers the hover provider for DFDL attribute documentation.
+ *
+ * This provider displays documentation when users hover over DFDL attribute
names.
+ * It works by:
+ * 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
+ * 5. Displaying the documentation in a hover tooltip
+ *
+ * The documentation includes descriptions, valid values, examples, and links
Review Comment:
"The documentation includes descriptions, valid values, examples, and links"
the markdownStrings that supply the hover tips do not include any links.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]