-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide option to only insert required elements for code action cvc_complex_type_2_4_b #1257
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JessicaJHee
commented
Jul 22, 2022
...x/src/main/java/org/eclipse/lemminx/extensions/xsd/contentmodel/CMXSDElementDeclaration.java
Outdated
Show resolved
Hide resolved
...minx/src/test/java/org/eclipse/lemminx/extensions/contentmodel/XMLSchemaDiagnosticsTest.java
Show resolved
Hide resolved
angelozerr
reviewed
Jul 25, 2022
...x/src/main/java/org/eclipse/lemminx/extensions/xsd/contentmodel/CMXSDElementDeclaration.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Jul 25, 2022
...se.lemminx/src/main/java/org/eclipse/lemminx/extensions/contentmodel/utils/XMLGenerator.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Jul 25, 2022
...se.lemminx/src/main/java/org/eclipse/lemminx/extensions/contentmodel/utils/XMLGenerator.java
Outdated
Show resolved
Hide resolved
@JessicaJHee let's start supporting optional element. For optional attribute, please create an issue for that. |
angelozerr
reviewed
Jul 25, 2022
...x/src/main/java/org/eclipse/lemminx/extensions/dtd/contentmodel/CMDTDElementDeclaration.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Jul 27, 2022
...nx/src/main/java/org/eclipse/lemminx/extensions/contentmodel/model/CMElementDeclaration.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Jul 27, 2022
...nx/src/main/java/org/eclipse/lemminx/extensions/contentmodel/model/CMElementDeclaration.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Jul 27, 2022
...mminx/extensions/contentmodel/participants/codeactions/cvc_complex_type_2_4_bCodeAction.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Jul 27, 2022
...mminx/extensions/contentmodel/participants/codeactions/cvc_complex_type_2_4_bCodeAction.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Jul 27, 2022
...x/src/main/java/org/eclipse/lemminx/extensions/xsd/contentmodel/CMXSDElementDeclaration.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Jul 27, 2022
...x/src/main/java/org/eclipse/lemminx/extensions/xsd/contentmodel/CMXSDElementDeclaration.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Jul 27, 2022
...x/src/main/java/org/eclipse/lemminx/extensions/xsd/contentmodel/CMXSDElementDeclaration.java
Outdated
Show resolved
Hide resolved
…complex-type.2.4.b Signed-off-by: Jessica He <jhe@redhat.com>
datho7561
approved these changes
Aug 3, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well!
rgrunber
reviewed
Aug 17, 2022
} | ||
} | ||
} | ||
return elementOptionality.get(childElementName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Error - 9:44:43 a.m.] Aug. 17, 2022 09:44:43 org.eclipse.lemminx.services.XMLCodeActions doCodeActions()
Message: Error while processing code actions for the participant 'org.eclipse.le
mminx.extensions.contentmodel.participants.ContentModelCodeActionParticipant'.
java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because the return value of "java.util.Map.get(Object)" is null
at org.eclipse.lemminx.extensions.xsd.contentmodel.CMXSDElementDeclaration.isOptional(CMXSDElementDeclaration.java:338)
at org.eclipse.lemminx.extensions.contentmodel.utils.XMLGenerator.isGenerateChild(XMLGenerator.java:405)
at org.eclipse.lemminx.extensions.contentmodel.utils.XMLGenerator.generate(XMLGenerator.java:150)
at org.eclipse.lemminx.extensions.contentmodel.utils.XMLGenerator.generate(XMLGenerator.java:124)
at org.eclipse.lemminx.extensions.contentmodel.utils.XMLGenerator.generate(XMLGenerator.java:107)
at org.eclipse.lemminx.extensions.contentmodel.participants.codeactions.cvc_complex_type_2_4_bCodeAction.doCodeAction(cvc_complex_type_2_4_bCodeAction.java:99)
at org.eclipse.lemminx.extensions.contentmodel.participants.ContentModelCodeActionParticipant.doCodeAction(ContentModelCodeActionParticipant.java:51)
at org.eclipse.lemminx.services.XMLCodeActions.doCodeActions(XMLCodeActions.java:60)
at org.eclipse.lemminx.services.XMLLanguageService.doCodeActions(XMLLanguageService.java:247)
at org.eclipse.lemminx.XMLTextDocumentService.lambda$codeAction$23(XMLTextDocumentService.java:464)
at org.eclipse.lemminx.commons.ModelTextDocuments.lambda$computeModelAsync$0(ModelTextDocuments.java:118)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
This was referenced Aug 17, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1255
Signed-off-by: Jessica He jhe@redhat.com