-
Notifications
You must be signed in to change notification settings - Fork 95
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
added CodeAction for opening XML binding wizard #1088
Conversation
Take a look into the test failures; I think they shouldn't be too hard to resolve |
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/commons/CodeActionFactory.java
Outdated
Show resolved
Hide resolved
e3349c3
to
53b35fa
Compare
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.
The changes that you have made look good, and it works for me.
I think we may want to add a new "extended client capability" for the binding wizard, and hide the CodeAction
when the binding wizard is not supported by the client. That way, clients that have implemented a binding wizard (such as vscode-xml) can send this information to the server, and the CodeAction
is listed. However, if the client hasn't implemented a binding wizard yet (i.e. Eclipse, vim, ...), then the CodeAction
doesn't appear. This should prevent end users from getting confusing messages when trying to use the CodeAction
when it's not supported.
Take a look at ExtendedClientCapabilities.java
, and for an example of how to pass the setting to the language server in the client, see xmlClient.ts:122
in vscode-xml.
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/commons/CodeActionFactory.java
Outdated
Show resolved
Hide resolved
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/settings/SharedSettings.java
Outdated
Show resolved
Hide resolved
org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/XMLAssert.java
Outdated
Show resolved
Hide resolved
...lemminx/extensions/contentmodel/participants/codeactions/NoGrammarConstraintsCodeAction.java
Outdated
Show resolved
Hide resolved
...lemminx/extensions/contentmodel/participants/codeactions/NoGrammarConstraintsCodeAction.java
Outdated
Show resolved
Hide resolved
…bilities dependency
Good job @AlexXuChen |
Added CodeAction for opening XML binding wizard to bind document to existing grammar/schema file.
(edit) made binding wizard CodeAction dependent on client support (reference: #1088 (review))
Closes redhat-developer/vscode-xml/issues/515
Signed-off-by: Alexander Chen alchen@redhat.com