-
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
DTD hover/completion support for documentation #585
Comments
is this a follow up on #577? Could you provide a sample document reproducing this issue? |
No, this is a independent issue. I will upload a service.xml for you to test. |
I see. The comments before the element declaration in the DTD is expected to serve as documentation: <!--
An entity usually represents a business facade and a table in the database. If
an entity does not have any columns, then it only represents a business facade.
The Service Builder will always generate an empty business facade POJO if it
does not exist. Upon subsequent generations, the Service Builder will check to
see if the business facade already exists. If it exists and has additional
methods, then the Service Builder will also update the SOAP wrappers.
If an entity does have columns, then the value object, the POJO class that
is mapped to the database, and other persistence utilities are also generated
based on the order and finder elements.
-->
<!ELEMENT entity (column*, localized-entity?, order?, finder*, reference*, tx-required*)> @angelozerr should know better how it should be to implemented |
At first I noticed that hover has bad renderer with LSP4E. I have never found time to study this case. You can see the trouble in Why we cannot see the whole source link? LSP4E should support markdown, but I'm not sure LSP4XML receive this capability. Is a problem with markdown converter (mylin markdown is used for that)?
Ok the main problem that I see is that we don't collect documentation for DTD. Today we don't support documentation for DTD https://github.com/angelozerr/lsp4xml/blob/master/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/dtd/contentmodel/CMDTDElementDeclaration.java#L94 Today we collect hierarchy element https://github.com/angelozerr/lsp4xml/blob/master/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/dtd/contentmodel/CMDTDDocument.java#L133 I think to manage comment, we should collect it public class CMDTDDocument {
@Override
public void comment(XMLString text, Augmentations augs) throws XNIException {
// TODO: Here we must attach the text comment with the next element declaration
super.comment(text, augs);
}
} @Seiphon is there something that you could try it? |
@Seiphon for the problem with LSP4E, https://bugs.eclipse.org/bugs/show_bug.cgi?id=552429 was merged and now you should see an hyperlink to open the XML Schema: |
Thanks @angelozerr , so the next step is to impletement the collection of DTD documentation, right? |
Exactly! It's just an idea, if you find a better mean please do that. Please write test too with this feature. To do that, I suggest you write your test in |
Hi @angelozerr , sorry for delay. I implement it by my understanding on this pr #592 . If there is something not correct, please let me know, I will update it. |
Fixes eclipse-lemminx#585 Signed-off-by: Seiphon Wang [email protected]
Fixes eclipse-lemminx#585 Signed-off-by: Seiphon Wang <[email protected]>
Fixes eclipse-lemminx#585 Signed-off-by: Seiphon Wang <[email protected]>
@Seiphon your PR is ready to merge. Once you will fix commit description #592 (comment) I would like to merge your great PR Thanks! |
Hi @angelozerr and @fbricon ,
I found when do hover and code completion, the prompt information is not expected.
How do you think about this issue?
Please see the picture:
hover:
code completion:
The expected result should like follows (from Eclipse original XML editor):
hover:
code completion:
cc @jtydhr88
The text was updated successfully, but these errors were encountered: