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 128660 - Find unused components for a file not part of a NB project not possible
Summary: Find unused components for a file not part of a NB project not possible
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Sonali Kochar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-28 07:21 UTC by tonybeckham
Modified: 2008-03-03 19:02 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 tonybeckham 2008-02-28 07:21:45 UTC
Choosing "Find Usages" from the query context menu for a schema that is not a part of a netbeans project throws exception.  

Steps:
1. In the IDE open favorites view.
2. Navigate to a schema that is not in a netbeans project
3. right click this file and select query|find usages, exception is thrown.

If this is not correct usage for this action then it should be disabled.

Product Version: NetBeans IDE Dev (Build 200802270005)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb)
Comment 1 tonybeckham 2008-02-28 07:22:47 UTC
Excpetion:

java.lang.NullPointerException
	at org.netbeans.api.project.ProjectUtils.getSources(ProjectUtils.java:93)
	at org.netbeans.modules.xml.schema.refactoring.ui.QueryUtilities.getProjectSourceGroups(QueryUtilities.java:109)
	at
org.netbeans.modules.xml.schema.refactoring.query.readers.QueryUnusedGlobalsReader.findUnusedGlobals(QueryUnusedGlobalsReader.java:176)
	at
org.netbeans.modules.xml.schema.refactoring.query.views.QueryUnusedGlobalsView.createModels(QueryUnusedGlobalsView.java:131)
	at org.netbeans.modules.xml.schema.refactoring.query.QueryUnusedGlobals$1.run(QueryUnusedGlobals.java:147)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 2 Sonali Kochar 2008-02-28 13:09:52 UTC
Just checked - Find usages is working fine. Its find unused query components that gives the NPE. Please correct bug
decription.
Comment 3 Sonali Kochar 2008-02-28 13:12:04 UTC
Wanted to add that only Query -> Find Unused Components is giving NPE. Other query options are working fine.
Comment 4 Sonali Kochar 2008-02-28 17:48:49 UTC
Fixed.
changeset a6185ffeaf94 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=a6185ffeaf94
Comment 5 Sonali Kochar 2008-02-28 17:49:56 UTC
fixed
Comment 6 tonybeckham 2008-03-03 19:02:41 UTC
Fix Verified

Product Version: NetBeans IDE Dev (Build 200803021202)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb)