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

Show values in list for attribute value completion apply based on XML Schema/DTD #242

Closed
angelozerr opened this issue Nov 30, 2018 · 1 comment
Assignees
Labels
CM Extension Content Model extension (XML Schema & DTD) completion This issue or enhancement is related to completion support enhancement New feature or request
Milestone

Comments

@angelozerr
Copy link
Contributor

When attribute value is linked to a list of values (from XML Schema), when completion is apply for the attribute value, it should be cool to open a second a popup completion to show this list values.

To implement this idea, we must generate snippet syntax like
https://github.com/Microsoft/language-server-protocol/blob/master/snippetSyntax.md#choice

@angelozerr angelozerr changed the title Show values in list for cttribute value completion apply based on XML Schema/DTD Show values in list for attribute value completion apply based on XML Schema/DTD Nov 30, 2018
@angelozerr angelozerr added enhancement New feature or request CM Extension Content Model extension (XML Schema & DTD) completion This issue or enhancement is related to completion support labels Dec 3, 2018
@angelozerr angelozerr self-assigned this Dec 3, 2018
@angelozerr angelozerr added this to the v0.0.3 milestone Dec 3, 2018
angelozerr added a commit that referenced this issue Dec 3, 2018
completion (see #242)

This feature is based on SnippetsBuilder which support choice snippet.
@angelozerr
Copy link
Contributor Author

Snippet choice is now supported for CM Model (completion based on XML Schema/DTD which defines enumeration values). See demo:

snippetchoice

A test exists at https://github.com/angelozerr/lsp4xml/blob/master/org.eclipse.lsp4xml/src/test/java/org/eclipse/lsp4xml/extensions/contentmodel/DTDCompletionExtensionsTest.java#L35

@NikolasKomonen please rebase your PR #240 which supports this choice feature and simplify a lot compeltion item. Hope you will like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CM Extension Content Model extension (XML Schema & DTD) completion This issue or enhancement is related to completion support enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant