eclipse-pde-partial-idea icon indicating copy to clipboard operation
eclipse-pde-partial-idea copied to clipboard

Documentation for plugin.xml extension points attributes

Open deepamin-intel opened this issue 3 years ago • 8 comments

Is your feature request related to a problem? Please describe. In plugin.xml, Eclipse shows some documentation string if available in schema.xsd file when pressing F2 or documentation key, can we have similar feature.

Describe the solution you'd like Documentation string shown as in eclipse screenshot

image image

deepamin-intel avatar Aug 23 '21 14:08 deepamin-intel

I will try to add document description in DOM extractor.

JaneWardSandy avatar Aug 24 '21 01:08 JaneWardSandy

I’m a bit busy lately, I may not start trying to add this feature until this weekend

JaneWardSandy avatar Aug 24 '21 10:08 JaneWardSandy

I am looking into it, if I can implement it I will push a patch. I only have a little bit of experience with IntelliJ plugin development so it may take some time.

deepamin-intel avatar Aug 26 '21 09:08 deepamin-intel

I had no idea how to implement it, I see the xml document from DomExtender was set setDeclaringElement to field element, and then it will read java doc as document.

JaneWardSandy avatar Aug 31 '21 05:08 JaneWardSandy

I found the extenstion point <lang.documentationProvider language="XML" > which I added in xml.xml howerver I can't find how to trigger the documentation from DOM, I am still trying to find a way for that. I will check if setDeclaringElement helps,

deepamin-intel avatar Aug 31 '21 09:08 deepamin-intel

@JaneWardSandy what's stopping you here? Maybe I can help in clarifying how to go further.

lppedd avatar Apr 14 '22 07:04 lppedd

@lppedd When we using Eclipse modify plugin.xml, it will add document into tag and attribute, even it didn't had competition.

In IDEA, I using DOMExtender to build plugin.xml schema and validate it, I had implemented the completion and valid by Eclipse extension point schema, but now I still don't know how to attach document for tag and attribute. image image

https://github.com/JaneWardSandy/eclipse-pde-partial-idea/blob/5c8192b92d5b0d3eba9e7a6218d180a0996aea49/eclipse-pde-partial-idea/src/main/kotlin/cn/varsa/idea/pde/partial/plugin/dom/plugin/impl/ExtensionsDomExtender.kt#L55-L56

Call registerCollectionChildrenExtension and return com.intellij.util.xml.reflect.DomExtension, it had method setDeclaring(Dom)Element, it can set PsiClass or DomElement to set the document. But I don't know how to set custom document string to it. our's document was read and parse from exsd file, and devkit was from interface. I stop in the step, don't know how to set string for doc, or the internal logical of IDEA render the XML doc from Declaring(Dom)Element

https://github.com/JetBrains/intellij-community/blob/34f3a18a268396354b9bcb6d2edbced33611b317/plugins/devkit/devkit-core/src/dom/impl/ExtensionsDomExtender.java#L52-L56

image

JaneWardSandy avatar Apr 14 '22 09:04 JaneWardSandy

@JaneWardSandy ok, will debug the XML documentation calls tonight and I'll try to come up with something.

lppedd avatar Apr 15 '22 07:04 lppedd