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

Mark element coming from XML Schema/DTD for completion #210

Closed
angelozerr opened this issue Nov 9, 2018 · 5 comments · Fixed by #394 or #404
Closed

Mark element coming from XML Schema/DTD for completion #210

angelozerr opened this issue Nov 9, 2018 · 5 comments · Fixed by #394 or #404
Assignees
Labels
CM Extension Content Model extension (XML Schema & DTD) completion This issue or enhancement is related to completion support DTD XSD
Milestone

Comments

@angelozerr
Copy link
Contributor

While studying bug with duplicate elements redhat-developer/vscode-xml#78 (comment) I find it should be good to mark the completion elements origin (from XML Schema, from DTD, copy sibling)

A quick idea is to add - XML Schema:

image

@fbricon @NikolasKomonen @ralfhandl what do you think about that?

@angelozerr angelozerr self-assigned this Nov 9, 2018
@angelozerr angelozerr added this to the v0.0.3 milestone Nov 9, 2018
@angelozerr angelozerr added CM Extension Content Model extension (XML Schema & DTD) completion This issue or enhancement is related to completion support labels Nov 9, 2018
@ralfhandl
Copy link

Will definitely reduce (my 😄) confusion.

@ralfhandl
Copy link

On second thought: it would be even better if copy siblings that are also described in XML Schema or DTD are removed from the list, showing only one entry for equally named elements.

@angelozerr
Copy link
Contributor Author

copy siblings should not done when XML is linked to a grammar. It works like this today when you define a xs:schemaLocation or xsi:noNamespaceShchemaLocation. In your case you have not that, because it uses XML Catalog. It's a bug that I must fix (XMLDocument#hasGrammar should test too grammar coming from XML Catalog). I must fix this bug.

@fbricon
Copy link
Contributor

fbricon commented Nov 15, 2018

Would be even better if the name of the originating schema was used instead of the generic "XML Schema" label

@fbricon fbricon added this to the v0.0.4 milestone Nov 15, 2018
@NikolasKomonen NikolasKomonen removed this from the v0.4.0 milestone Jan 29, 2019
@angelozerr angelozerr added this to the v0.7.0 milestone May 23, 2019
@fbricon fbricon assigned NikolasKomonen and unassigned angelozerr May 24, 2019
@angelozerr
Copy link
Contributor Author

@NikolasKomonen a quick idea that I had to display the XML Schema / DTD URI is to store the key in the content model document https://github.com/angelozerr/lsp4xml/blob/master/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/contentmodel/model/ContentModelManager.java#L117 and after you can use it to display it in the CMLEementDeclaration.

Don't hesitate to ping me if you need more information.

NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue May 27, 2019
the file name of the schema they come from.

Fixes eclipse#210

Signed-off-by: Nikolas Komonen <nikolaskomonen@gmail.com>
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue May 27, 2019
the file name of the schema they come from.

Fixes eclipse#210

Signed-off-by: Nikolas Komonen <nikolaskomonen@gmail.com>
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue May 27, 2019
the file name of the schema they come from.

Fixes eclipse#210

Signed-off-by: Nikolas Komonen <nikolaskomonen@gmail.com>
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue May 27, 2019
the file name of the schema they come from.

Fixes eclipse#210

Signed-off-by: Nikolas Komonen <nikolaskomonen@gmail.com>
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue May 28, 2019
the file name of the schema they come from.

Fixes eclipse#210

Signed-off-by: Nikolas Komonen <nikolaskomonen@gmail.com>
fbricon pushed a commit that referenced this issue May 28, 2019
the file name of the schema they come from.

Fixes #210

Signed-off-by: Nikolas Komonen <nikolaskomonen@gmail.com>
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue May 29, 2019
Fixes eclipse#210

Signed-off-by: Nikolas Komonen <nikolaskomonen@gmail.com>
fbricon pushed a commit that referenced this issue May 29, 2019
Fixes #210

Signed-off-by: Nikolas Komonen <nikolaskomonen@gmail.com>
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue May 29, 2019
Fixes eclipse#210

Signed-off-by: Nikolas Komonen <nikolaskomonen@gmail.com>
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 DTD XSD
Projects
None yet
4 participants