Skip to content
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
merged 1 commit into from
Aug 3, 2022

Conversation

JessicaJHee
Copy link
Contributor

Fixes #1255

Signed-off-by: Jessica He jhe@redhat.com

@angelozerr
Copy link
Contributor

@JessicaJHee let's start supporting optional element. For optional attribute, please create an issue for that.

@JessicaJHee JessicaJHee marked this pull request as ready for review July 25, 2022 19:19
…complex-type.2.4.b

Signed-off-by: Jessica He <jhe@redhat.com>
Copy link
Contributor

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

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

Works well!

@datho7561 datho7561 merged commit fd0cec5 into eclipse-lemminx:main Aug 3, 2022
@JessicaJHee JessicaJHee deleted the issue1255 branch August 8, 2022 13:56
}
}
}
return elementOptionality.get(childElementName);
Copy link
Contributor

Choose a reason for hiding this comment

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

@datho7561 , @JessicaJHee

[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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CodeAction for cvc-complex-type.2.4.b: "insert all expected" vs. "insert all possible"
4 participants