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 85219

Summary: REGRESSION: Exception on Find Usages invoked on primitive type node
Product: xml Reporter: Andrei Chistiakov <ca-nb>
Component: Schema ToolsAssignee: Nam Nguyen <nnguyen>
Status: VERIFIED FIXED    
Severity: blocker CC: htt, ivansidorkin, kozlov
Priority: P1    
Version: 5.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description Andrei Chistiakov 2006-09-19 11:26:29 UTC
Reproduced in build 060918_1 (JDK 1.6 Beta 2).

To reproduce the bug in column view:

- create a new global element of the boolean type;
- select 'Inherited formn boolean' node and invoke 'Find Usages'.

java.lang.IllegalArgumentException
	at
org.netbeans.spi.project.support.GenericSources$Group.contains(GenericSources.java:137)
	at
org.netbeans.modules.xml.refactoring.FindUsageResult.getSourceGroup(FindUsageResult.java:144)
	at
org.netbeans.modules.xml.refactoring.FindUsageResult.doSearch(FindUsageResult.java:121)
	at
org.netbeans.modules.xml.refactoring.FindUsageResult.get(FindUsageResult.java:107)
	at
org.netbeans.modules.xml.refactoring.ui.readers.WhereUsedReader.loadGraph(WhereUsedReader.java:243)
	at
org.netbeans.modules.xml.refactoring.ui.views.WhereUsedView.createGraph(WhereUsedView.java:173)
	at
org.netbeans.modules.xml.refactoring.ui.views.WhereUsedView.createModels(WhereUsedView.java:161)
	at
org.netbeans.modules.xml.refactoring.ui.j.ui.RefactoringPanel$7.run(RefactoringPanel.java:825)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Comment 1 Andrei Chistiakov 2006-09-19 11:28:21 UTC
See also issue #83584.
Comment 2 Nam Nguyen 2006-09-19 19:50:00 UTC
The reason for regression is that we now need to add refactoring actions on
schema file node in the project explorer.  Through some mystery, the cookies
implmented by SchemaDatatObject.SchemaNode show up on the filter nodes of
GlobalSimpleElementNode in this test case.  Need time/help to track down this
behaviour.
Comment 3 Nam Nguyen 2006-09-19 20:10:40 UTC
Fix by ignoring ModelProvider cookies also showing up on a schema component node.
(ModelProvider and ReferenceableProvider are by design mutual exclusive):

/cvs/xml/refactoring/src/org/netbeans/modules/xml/refactoring/ui/util/Attic/AnalysisUtilities.java,v
 <--  AnalysisUtilities.java
new revision: 1.1.2.13; previous revision: 1.1.2.12
Comment 4 Andrei Chistiakov 2006-09-20 11:27:18 UTC
Verified in build 060919_1.