This is an automated email from the ASF dual-hosted git repository.
rthomas320 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil-vscode.git
The following commit(s) were added to refs/heads/main by this push:
new 3129b98 Fixes missing element suggestions for schema fixes mising
attribute suggestion for complex type corrects some grammar and spelling errors
in intellisense checklist
3129b98 is described below
commit 3129b989993e350216fb7f00c1cde213ffba8c1b
Author: rthomas320 <[email protected]>
AuthorDate: Wed Nov 19 14:17:32 2025 -0500
Fixes missing element suggestions for schema
fixes mising attribute suggestion for complex type
corrects some grammar and spelling errors in intellisense checklist
Closes #1533
Closes #1534
---
src/language/providers/elementCompletion.ts | 2 +-
src/language/providers/utils.ts | 4 +++-
src/tests/DfdlIntellisenseTestingChecklist.md | 10 +++++-----
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/language/providers/elementCompletion.ts
b/src/language/providers/elementCompletion.ts
index 33f2d2b..fea2132 100644
--- a/src/language/providers/elementCompletion.ts
+++ b/src/language/providers/elementCompletion.ts
@@ -270,7 +270,7 @@ function nearestOpenTagChildElements(
)
case 'complexType':
return getElementCompletionItems(
- ['sequence', 'group', 'choice'],
+ ['sequence', 'group', 'choice', 'annotation'],
'',
'',
nsPrefix
diff --git a/src/language/providers/utils.ts b/src/language/providers/utils.ts
index 2d27105..5304f8a 100644
--- a/src/language/providers/utils.ts
+++ b/src/language/providers/utils.ts
@@ -397,6 +397,7 @@ export function checkMultiLineTag(
if (itemsOnLine > 1) {
return [false, isDfdlTag, attributeNames]
}
+ let triggerLine = position.line
let currentLine = position.line
let openTagLine = position.line
let closeTagLine = position.line
@@ -448,7 +449,8 @@ export function checkMultiLineTag(
if (
currentText.includes('<' + nsPrefix + tag) &&
- currentText.includes('>')
+ currentText.includes('>') &&
+ closeTagLine >= triggerLine
) {
attributeNames = getAttributeNames(document, position, nsPrefix, tag)
return [true, isDfdlTag, attributeNames]
diff --git a/src/tests/DfdlIntellisenseTestingChecklist.md
b/src/tests/DfdlIntellisenseTestingChecklist.md
index dc535eb..571798f 100644
--- a/src/tests/DfdlIntellisenseTestingChecklist.md
+++ b/src/tests/DfdlIntellisenseTestingChecklist.md
@@ -85,7 +85,7 @@ Place the cursor at line 68 column 98, within the double
quotes containing the v
- [ ] Verify the dropdown contains binary an text. Select "text" as the value.
- [ ] verify that "binary" is replaced with "text".
-Place the cursor at line 68 column 252 at the end of the line. Backspace over
the last 2 characters "/>". The cursor shoul;d be directly after
dfdl:length="{../../Length - fn:string-length(../Keyword) - 2}". Type a /
(slash '/').
+Place the cursor at line 68 column 252 at the end of the line. Backspace over
the last 2 characters "/>". The cursor shoulld be directly after
dfdl:length="{../../Length - fn:string-length(../Keyword) - 2}". Type a /
(slash '/').
- [ ] Verify that the self closing tag "/> was added to the end of the line.
@@ -100,7 +100,7 @@ Place a cursor at line 71 column 20, after </xs:element>.
Backspace until the cl
Place the cursor at line 73 column 129, before <xs:annotation>. Type
CTRL+space.
-- [ ] Verify the dropdown contains xs:annotation, xs:complexType,
xs:complexType name=,xs:simpleType, and xs:simpleType name=.
+- [ ] Verify the dropdown contains xs:annotation, xs:complexType,
xs:complexType name, xs:simpleType, and xs:simpleType name.
Place the cursor at line 73 column 263, after </xs:annotation>. Backspace to
remove the annoation closing tag. With your cursor just after the </xs:appinfo>
tag, type > (the greater than symbol).
@@ -121,14 +121,14 @@ Place the cursor at line 31 column 39, after
ref="GeneralFormat". Type a space.
- [ ] Verify the dropdown doesnot contain
ref,dfdl:encoding,dfdl:alignment,dfdl:lengthKind,dfdl:representation
-Select alignment from the dropdown. select 1 as the value for alignment.
+Place the cursor at line 31 column 39, after alignment="1". Backspace until
alignment="1" is erased. Type ctrl+space. Select alignment from the dropdown.
select 1 as the value for alignment.
- [ ] Verify that alignment="1" is inserted.
- [ ] Verfiy that alignment does not have the dfdl: prefix.
Place the cursor at line 33 column 1. Type CTRL+space.
-- [ ] Verify the dropdown contains
dfdl:defineEscapeScheme,dfdl:defineFormat,dfdl:defineVariable,dfdl:format.
+- [ ] Verify the dropdown contains
dfdl:defineEscapeScheme,dfdl:defineFormat,dfdl:defineVariable,dfdl:definbeVariable
name,dfdl:format.
Place the cursor at line 52 column 56 at the end of the line. Backspace over
the last two characters "/>". The cursor should be directly after
encoding="ascii". Type a / (slash '/').
@@ -141,7 +141,7 @@ Place the cursor at line 59, column 46, after
representation="text". Type a spac
- [ ] Verify the dropdown does not contain
dfdl:encoding,dfdl:alignment,dfdl:initiator,dfdl:lengthKind,dfdl:representation,dfdl:textNumberRep
-Select dfdl:alignment from the dropdown. select 1 as the value.
+Place the cursor after alignment="1". Backspace until alignment="1" is erased.
Type ctrl+space. Select dfdl:alignment from the dropdown. select 1 as the value.
- [ ] Verify that alignment="1" was inserted.
- [ ] Verify that alignment does not contian the dfdl: prefix.