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.
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)
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)
Just checked - Find usages is working fine. Its find unused query components that gives the NPE. Please correct bug decription.
Wanted to add that only Query -> Find Unused Components is giving NPE. Other query options are working fine.
Fixed. changeset a6185ffeaf94 in main details: http://hg.netbeans.org/main?cmd=changeset;node=a6185ffeaf94
fixed
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)