Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 91823 - Schema Based code completion should provide completion values for attributes of type enumeration
Schema Based code completion should provide completion values for attributes ...
Status: RESOLVED FIXED
Product: xml
Classification: Unclassified
Component: Schema Tools
5.x
All All
: P3 with 2 votes (vote)
: 6.x
Assigned To: issues@xml
issues@xml
:
: 132041 (view as bug list)
Depends on:
Blocks: 122444
  Show dependency treegraph
 
Reported: 2007-01-04 14:50 UTC by vivekjain
Modified: 2008-06-14 06:21 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vivekjain 2007-01-04 14:50:43 UTC
Schema Based code completion should provide completion values for attributes of
type enumeration.

If a user is authoring an xml file with the schema support, and asks for
completion for the value of attribute of type enumeration, Schema Based
completion must provide list of valid values with respect to attribute's type.

For example consider the following xml file which needs completion for attribute
'modifier':

<component xmlns='http://www.sun.com/schema/SPS'
  xsi:schemaLocation='http://www.sun.com/schema/SPS ../schema/component.xsd' 
  modifier="[CTRL_SPACE]">

    <extends>
        <type name='system#file'></type>
    </extends>
</component>

--------------SCHEMA-----------------
...
  <simpleType name="modifierEnumType">
    <restriction base="string">
      <enumeration value="ABSTRACT"/>
      <enumeration value="FINAL"/>
    </restriction>
  </simpleType>
...
------------SCHEMA-END---------------

If user ask for completion for the 'modifier' attribute, where 'modifier'
attribute is of type 'modifierEnumType', schema based code-completion should
read the schema and provide the valid values that is 'ABSTRACT' & 'FINAL' in our
example.

Currently schema based code completion is not providing the values for
Enumeration type attributes but validation against schema will detect the error
if user provide some invalid value. Following is the error I got when I provide
the value 'abc' instead of values 'ABSTRACT' or 'FINAL'.

----------------------------------OUTPUT------------------------------------
Value 'abc' is not facet-valid with respect to enumeration '[ABSTRACT, FINAL]'.
It must be a value from the enumeration.

The value 'abc' of attribute 'modifier' on element 'component' is not valid with
respect to its type, 'modifierEnumType'.
----------------------------------------------------------------------------

Since the schema knows the possible values for particular attribute, Schema
based code completion should provide those values in completion list.

Thanks & Regards,
Vivek
Comment 1 Samaresh Panda 2008-04-04 15:40:29 UTC
*** Issue 132041 has been marked as a duplicate of this issue. ***
Comment 2 Andrei Badea 2008-04-07 13:01:05 UTC
This doesn't look like an enhancement.
Comment 3 Samaresh Panda 2008-04-16 18:11:54 UTC
post 6.1.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo