Bug 214804 - Enumerations in complex types with simple content not showing in content model
Summary: Enumerations in complex types with simple content not showing in content model
Status: CLOSED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xsd (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Gabriel Indik CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-01-09 15:44 EST by Gabriel Indik CLA
Modified: 2008-04-24 00:43 EDT (History)
1 user (show)

See Also:


Attachments
Patch (1.05 KB, patch)
2008-01-09 15:46 EST, Gabriel Indik CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel Indik CLA 2008-01-09 15:44:03 EST
When a complex type element in an XML schema has simple content with enumerations, these do not appear in the content model. This prevents the XML Editor content assist from showing the correct options. Also, no combo box appears in the XML Editor design view.
Comment 1 Gabriel Indik CLA 2008-01-09 15:46:28 EST
Created attachment 86505 [details]
Patch

This patch fixes the issue by obtaining the simple type content from complex types when enumerations are being retrieved.
Comment 2 Valentin Baciu CLA 2008-01-09 15:51:32 EST
Moving to xsd as the code affected is in xsd.core.
Comment 3 Keith Chong CLA 2008-01-09 16:05:59 EST
Thanks Valentin.
Comment 4 Valentin Baciu CLA 2008-01-09 16:15:02 EST
Hi Keith, Gabriel, as I mentioned, it would be safe to add a unit test for this as well. 

Keith, if we don't have a JUnit plug-in for xsd.core already, please open a bug and create the plug-in and let's get the ball rolling with creating unit tests. 

The content model adapter for XSD is a fairly sensitive piece of code used for content assist and more and we need to start giving it some code coverage through unit tests.
Comment 5 Keith Chong CLA 2008-01-09 16:16:57 EST
Targetting this fix for 3.0 M5
Comment 6 Keith Chong CLA 2008-01-09 16:46:12 EST
See bug 214819
Comment 7 Keith Chong CLA 2008-01-16 11:48:53 EST
Reassigning back to you Gabriel since you've provided the patch.

I've released the change to WTP3.0 M5.
Comment 8 Keith Chong CLA 2008-01-16 11:49:37 EST
Fixed.
Comment 9 Gabriel Indik CLA 2008-01-22 15:48:08 EST
Closing
Comment 10 David Williams CLA 2008-04-24 00:43:55 EDT
mass change to add 'contributed' keyword based on bugzilla query, please correct if that's not accurate (by marking patches as obsolete and removing the 'contributed' keyword.