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 101326 - REGRESSION: Code completion is broken
Summary: REGRESSION: Code completion is broken
Status: VERIFIED DUPLICATE of bug 101270
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: pnarayan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-17 12:46 UTC by Mikhail Matveev
Modified: 2007-04-17 17:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Matveev 2007-04-17 12:46:45 UTC
1. Create new schema.
2. Switch to source view.
3. Type <xsd:element name=""/>
4. Type "in" between the quotes (text becomes <xsd:element name="in"/>) and
press Ctrl-Space.
Result: exception comes.
Further code completion calls may produce exceptions too.
Possibly exception appears when beginning of simple type name is typed.

java.lang.IllegalArgumentException: ancestor == descendant!!!
	at
org.netbeans.modules.editor.structure.api.DocumentModel.isDescendantOf(DocumentModel.java:274)
	at
org.netbeans.modules.editor.structure.api.DocumentModel.getChildren(DocumentModel.java:553)
	at
org.netbeans.modules.editor.structure.api.DocumentElement.getChildren(DocumentElement.java:281)
	at
org.netbeans.modules.xml.text.structure.XMLDocumentModelProvider.getDescendantsOfNotSkippedElements(XMLDocumentModelProvider.java:424)
	at
org.netbeans.modules.xml.text.structure.XMLDocumentModelProvider.generateDocumentElements(XMLDocumentModelProvider.java:402)
	at
org.netbeans.modules.xml.text.structure.XMLDocumentModelProvider.updateModel(XMLDocumentModelProvider.java:239)
	at
org.netbeans.modules.editor.structure.api.DocumentModel.updateModel(DocumentModel.java:436)
	at
org.netbeans.modules.editor.structure.api.DocumentModel.access$300(DocumentModel.java:106)
	at
org.netbeans.modules.editor.structure.api.DocumentModel$1.run(DocumentModel.java:420)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)
Comment 1 Petr Blaha 2007-04-17 12:51:17 UTC

*** This issue has been marked as a duplicate of 101270 ***
Comment 2 Mikhail Matveev 2007-04-17 17:07:09 UTC
Verified duplicate