You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "rthomas320 (via GitHub)" <gi...@apache.org> on 2023/07/19 12:50:43 UTC
[GitHub] [daffodil-vscode] rthomas320 opened a new pull request, #707: - Add missing element items xs:pattern, xs:totalDigits,
rthomas320 opened a new pull request, #707:
URL: https://github.com/apache/daffodil-vscode/pull/707
xs:fractionDigits, dfdl:property
- Add missing xs:restriction child elements
- Add missing dfdl:escapeScheme element and the escapeScheme attributes
- add missing dfdl:newVariableInstance element
- add additional missing dfdl:format attributes
- add a preceeding space if missing when auto completing an attribute
- add additional missing attributes
- add a space after inserting an attribute if missing
- add getAnnotationParent function
- add appinfo switch statement
- add getAnnotationParent function
- add switch statement to appinfo case statement
Closes #587
Closes #588
Closes #591
Closes #592
Closes #593
Closes #609
Closes #624
Closes #629
Closes #630
closes #637
--
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: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil-vscode] shanedell commented on a diff in pull request #707: - Add missing element items xs:pattern, xs:totalDigits,
Posted by "shanedell (via GitHub)" <gi...@apache.org>.
shanedell commented on code in PR #707:
URL: https://github.com/apache/daffodil-vscode/pull/707#discussion_r1277708260
##########
src/language/providers/attributeCompletion.ts:
##########
@@ -138,20 +150,37 @@ function checkNearestOpenItem(
triggerText: string,
nsPrefix: string,
preVal: string,
- additionalItems: string
+ additionalItems: string,
+ charBeforeTrigger: string,
+ charAfterTrigger: string
): vscode.CompletionItem[] | undefined {
+ let spacingChar = ''
+ if (
+ charBeforeTrigger !== ' ' &&
+ charBeforeTrigger !== '\n' &&
+ charBeforeTrigger !== '\t'
+ ) {
+ spacingChar = ' '
+ }
Review Comment:
```suggestion
const spacingChar: String =
charBeforeTrigger !== ' ' &&
charBeforeTrigger !== '\n' &&
charBeforeTrigger !== '\t'
? ' '
: ''
```
##########
src/language/providers/elementCompletion.ts:
##########
@@ -203,36 +205,123 @@ function checkTagNearestOpen(
)
case 'restriction':
return getElementCompletionItems(
- ['maxInclusive', 'maxExclusive', 'minInclusive', 'minExclusive'],
+ [
+ 'maxInclusive',
+ 'maxExclusive',
+ 'minInclusive',
+ 'minExclusive',
+ 'pattern',
+ 'totalDigits',
+ 'fractionDigits',
+ 'enumeration',
+ ],
'',
'',
nsPrefix
)
case 'annotation':
return getElementCompletionItems(['appinfo'], '', '', nsPrefix)
case 'appinfo':
- return getElementCompletionItems(
- [
- 'dfdl:assert',
- 'dfdl:discriminator',
- 'dfdl:defineFormat',
- 'dfdl:format',
- 'dfdl:defineVariable',
- 'dfdl:setVariable',
- 'dfdl:defineEscapeScheme',
- 'dfdl:element',
- 'dfdl:simpleType',
- ],
- '',
- '',
- nsPrefix
- )
+ let triggerText = document.lineAt(tagPosition.line).text
+ let iCount = getItemsOnLineCount(triggerText)
+ let newPosition = tagPosition
+ if (iCount < 2) {
+ newPosition = new vscode.Position(
+ tagPosition.line - 1,
+ tagPosition.character
+ )
+ }
Review Comment:
```suggestion
const newPosition =
iCount < 2
? new vscode.Position(tagPosition.line - 1, tagPosition.character)
: tagPosition
```
##########
src/language/providers/attributeCompletion.ts:
##########
@@ -138,20 +150,37 @@ function checkNearestOpenItem(
triggerText: string,
nsPrefix: string,
preVal: string,
- additionalItems: string
+ additionalItems: string,
+ charBeforeTrigger: string,
+ charAfterTrigger: string
): vscode.CompletionItem[] | undefined {
+ let spacingChar = ''
+ if (
+ charBeforeTrigger !== ' ' &&
+ charBeforeTrigger !== '\n' &&
+ charBeforeTrigger !== '\t'
+ ) {
+ spacingChar = ' '
+ }
+ let afterChar = ''
+ if (
+ charAfterTrigger !== ' ' &&
+ charAfterTrigger !== '\n' &&
+ charAfterTrigger !== '\t'
+ ) {
+ afterChar = ' '
+ }
Review Comment:
```suggestion
const afterChar: String =
charAfterTrigger !== ' ' &&
charAfterTrigger !== '\n' &&
charAfterTrigger !== '\t'
? ' '
: ''
```
--
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: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil-vscode] nlewis05 commented on pull request #707: - Add missing element items xs:pattern, xs:totalDigits,
Posted by "nlewis05 (via GitHub)" <gi...@apache.org>.
nlewis05 commented on PR #707:
URL: https://github.com/apache/daffodil-vscode/pull/707#issuecomment-1653984064
+1
--
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: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil-vscode] scholarsmate merged pull request #707: - Add missing element items xs:pattern, xs:totalDigits,
Posted by "scholarsmate (via GitHub)" <gi...@apache.org>.
scholarsmate merged PR #707:
URL: https://github.com/apache/daffodil-vscode/pull/707
--
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: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil-vscode] michael-hoke commented on pull request #707: - Add missing element items xs:pattern, xs:totalDigits,
Posted by "michael-hoke (via GitHub)" <gi...@apache.org>.
michael-hoke commented on PR #707:
URL: https://github.com/apache/daffodil-vscode/pull/707#issuecomment-1654075675
+1
--
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: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org