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.
SchemaBasedCompletionProvider uses CompletionUtil.getPrimaryFile() when given a JTextComponent component as an argument. This is wrong: the proper way is to get the DataObject from the (Base)Document, then get the primary file. CompletionUtil.getPrimaryFile() uses the active TopComponent instead which seems to work because the given JTextComponent usually is in the active TopComponent but it's just by chance no race conditions showed up there. The whole module dependency on Window System API should be removed after the fix.
Integrated into 'main-golden', will be available in build *201203040400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/67c7d11b5455 User: Emilian Bold <emi@netbeans.org> Log: #208852: SchemaBasedCompletionProvider uses wrong primary file
reassigning to the fix author. Thanks, Emilian.