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 - REGRESSION: Exception on Find Usages invoked on primitive type node
Summary: REGRESSION: Exception on Find Usages invoked on primitive type node
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Nam Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-19 11:26 UTC by Andrei Chistiakov
Modified: 2006-09-20 11:27 UTC (History)
3 users (show)

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 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.