Community
Participate
Working Groups
Currently if using the Tree View (Design tab) of the source editor there is no way to see the corresponding documentation or annotations that the XML file's grammar may have. This patch will add a XML Documentation view, similar to the javadoc documentation view. Selecting a Node in any XML based editor should display the corresponding content model documentation for that node selected. If there is no documentation it will just display the content model. This leverages the MarkupTagInfo class to help format the documentation.
Created attachment 179954 [details] XML Documentation View
Created attachment 179955 [details] javadoc annotations icon to be used with XML Doc view.
Adding Nick for review and feedback.
Hi Dave, Overall, I think this view looks good. Some things I noticed were: 1. Should the default xmlDoc be externalized? 2. The result of presenter.updatePresentation() can return null providing null text, which will generate an SWT Error. (I think this happens if the XML declaration is selected) 3. Currently, the XML Documentation view will actually work with JSP and HTML files as well. It might be worthwhile to just rename the view to "Documentation". 4. Should we use a different icon (possibly the XML comment icon) since the @ symbol doesn't have any inherent meaning in XML?
(In reply to comment #4) > Hi Dave, > > Overall, I think this view looks good. Some things I noticed were: > > 1. Should the default xmlDoc be externalized? > 2. The result of presenter.updatePresentation() can return null providing null > text, which will generate an SWT Error. (I think this happens if the XML > declaration is selected) > 3. Currently, the XML Documentation view will actually work with JSP and HTML > files as well. It might be worthwhile to just rename the view to > "Documentation". > 4. Should we use a different icon (possibly the XML comment icon) since the @ > symbol doesn't have any inherent meaning in XML? Sure, let me work on these enhancements tomorrow and provide a new patch.
Created attachment 180906 [details] patch with tweaks Hey Dave, I wasn't sure if you had a chance to implement the changes, so I made the changes that I suggested in my previous review. Additionally, I also changed it so that this should function based on selections made either in the design or source view (works with XML/XSL/HTML/JSP editors).
Checked in the changes to HEAD. Thanks for the new view, Dave.
(In reply to comment #6) > Created an attachment (id=180906) [details] > patch with tweaks > > Hey Dave, > > I wasn't sure if you had a chance to implement the changes, so I made the > changes that I suggested in my previous review. Additionally, I also changed it > so that this should function based on selections made either in the design or > source view (works with XML/XSL/HTML/JSP editors). Thanks, Nick. I haven't had time to do anything with this.