Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326669 - XML Annotations/Documentation View
Summary: XML Annotations/Documentation View
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 3.3 M3   Edit
Assignee: David Carver CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-30 09:49 EDT by David Carver CLA
Modified: 2010-10-14 15:18 EDT (History)
1 user (show)

See Also:
nsand.dev: review+


Attachments
XML Documentation View (7.04 KB, patch)
2010-09-30 09:51 EDT, David Carver CLA
no flags Details | Diff
javadoc annotations icon to be used with XML Doc view. (323 bytes, image/gif)
2010-09-30 09:52 EDT, David Carver CLA
no flags Details
patch with tweaks (9.13 KB, patch)
2010-10-14 15:04 EDT, Nick Sandonato CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Carver CLA 2010-09-30 09:49:30 EDT
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.
Comment 1 David Carver CLA 2010-09-30 09:51:10 EDT
Created attachment 179954 [details]
XML Documentation View
Comment 2 David Carver CLA 2010-09-30 09:52:10 EDT
Created attachment 179955 [details]
javadoc annotations icon to be used with XML Doc view.
Comment 3 David Carver CLA 2010-09-30 09:53:45 EDT
Adding Nick for review and feedback.
Comment 4 Nick Sandonato CLA 2010-10-04 15:13:31 EDT
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?
Comment 5 David Carver CLA 2010-10-04 17:27:07 EDT
(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.
Comment 6 Nick Sandonato CLA 2010-10-14 15:04:25 EDT
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).
Comment 7 Nick Sandonato CLA 2010-10-14 15:11:43 EDT
Checked in the changes to HEAD. Thanks for the new view, Dave.
Comment 8 David Carver CLA 2010-10-14 15:18:30 EDT
(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.