This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 19775 - Code completion does not respect order constraints
Summary: Code completion does not respect order constraints
Status: RESOLVED DUPLICATE of bug 30095
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker with 3 votes (vote)
Assignee: _ pkuzel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-25 09:58 UTC by gthb
Modified: 2007-09-25 01:33 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gthb 2002-01-25 09:58:49 UTC
XML code completion offers all elements allowed
under the current parent element, but does not
respect the DTD's constraints on the order of
these elements. Example:

<!ELEMENT doob (floob,skoob)>
<!ELEMENT floob EMPTY>
<!ELEMENT skoob EMPTY>

Here both <floob> and <skoob> will be offered in the
code completion popup wherever <doob> is the parent.

Only <floob> should be offered directly after <doob>,
only <skoob> after </floob> under a <doob> parent,
and nothing after </skoob> under a <doob> parent.

Yikes, the terminology ...
Comment 1 _ pkuzel 2002-01-25 10:46:43 UTC
Unfortunatelly it is implementation limitation of 3.3. It should be
addressed in 3.4. Following package need to be improved:
nb_all/text-edit/src/org/netbeans/modules/xml/text/completition/dtd/*.
Comment 2 gthb 2002-02-21 11:37:39 UTC
Just to nitpick a little, I would argue that this should
be classified as a defect rather than an enhancement.
It seems like a reasonable correctness requirement on
autocompletion features in editors, that they suggest
only completions that are valid in the grammar of the
document being edited (this is the case e.g. in editors
for programming languages). But it's a minor point, I'll
admit! :)
Comment 3 _ pkuzel 2002-06-03 12:26:20 UTC
Let these are considered while planning next release.
Comment 4 Marek Grummich 2002-07-19 16:55:38 UTC
Target milestone was changed from not determined to TBD
Comment 5 _ pkuzel 2002-08-13 21:48:11 UTC
There is already prepared 
...dtd.ContentModel.java. Unfortunatelly it can 
badly hit performance. 
 
Would you agree with a switch enabled 
explicitly by user if the performance hit 
proves to occur? 
 
It is a subtask of DTD-based completion 
enhacement. 
Comment 6 gthb 2002-08-13 22:04:56 UTC
And off by default? That makes sense
I guess. Is the performance hit 
only
in displaying the autocompletion
popup, or does it impact the 
XML
editor in general?
Comment 7 gthb 2003-02-07 11:08:10 UTC
Isn't this an exact duplicate of 30095 which you just
resolved?
Comment 8 _ pkuzel 2003-02-07 11:47:26 UTC
Yes indeed. I have not realized that this issue has been filled sooo
many times.

Final implementation does not contain proposed switch rather it shows
nonintrusive "Please wait..." result letting a user type (and narrow
concurently computed result) if he realizes faster then the completion.

Thanks for the hint.

*** This issue has been marked as a duplicate of 30095 ***