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 83584 - NPE on Find Usages invoked on primitive type node
Summary: NPE 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: bhate
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-28 13:06 UTC by Andrei Chistiakov
Modified: 2006-08-31 13:30 UTC (History)
4 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-08-28 13:06:16 UTC
Reproduced in build 060827 (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.NullPointerException: Passed null to FileOwnerQuery.getOwner(FileObject)
	at org.netbeans.api.project.FileOwnerQuery.getOwner(FileOwnerQuery.java:65)
	at
org.netbeans.modules.xml.refactoring.impl.RefactoringUtil.findCurrentProject(RefactoringUtil.java:56)
	at
org.netbeans.modules.xml.refactoring.FindUsageResult.doSearch(FindUsageResult.java:127)
	at
org.netbeans.modules.xml.refactoring.FindUsageResult.get(FindUsageResult.java:100)
	at
org.netbeans.modules.xml.refactoring.ui.readers.WhereUsedReader.loadGraph(WhereUsedReader.java:251)
	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$6.run(RefactoringPanel.java:771)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Comment 1 Nam Nguyen 2006-08-28 22:56:02 UTC
Refactoring or findUsage does not make semantic sense on inherited nodes,
particularly built-in schema datatype.  In general, user should go to
superdefinition and do refactoring/query there.  

I discussed this with Chris.  The solution for this is remove the refactoring
menu from 'Inherited From' child nodes.  Reassign to Ajit.
Comment 2 bhate 2006-08-29 19:28:03 UTC
We should not display the refactor action in readonly schema component nodes
(inhertied from)
We should not enable find usages when fobj can not be found, (for primitive types)
Comment 3 Andrei Chistiakov 2006-08-31 13:30:42 UTC
Verified in build 060831.