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 85330 - NPE when mouse is moving over popup menu of the annotation
Summary: NPE when mouse is moving over popup menu of the annotation
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:
: 85373 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-20 12:36 UTC by Andrei Chistiakov
Modified: 2006-09-22 11:23 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-20 12:36:17 UTC
Reproduced in build 060919_1 (JDK 1.6 Beta 2).

To reproduce the bug:
- create a new schema;
- add a new global annotation component;
- right-click the annotation in column view and place the mouse cursor over
'Refactor' submenu.

java.lang.NullPointerException
	at
org.netbeans.modules.xml.refactoring.RefactorRequest.getModel(RefactorRequest.java:109)
	at
org.netbeans.modules.xml.refactoring.actions.SafelyRenameAction.enable(SafelyRenameAction.java:104)
	at org.openide.util.actions.NodeAction.isEnabled(NodeAction.java:176)
	at org.openide.awt.Actions$MenuBridge.updateState(Actions.java:818)
	at org.openide.awt.Actions.connect(Actions.java:155)
...
Comment 1 Chris Webster 2006-09-20 16:13:54 UTC
I don't think the annotation should have a refactoring menu, or minimally this
should be disabled. 

Comment 2 bhate 2006-09-20 19:15:37 UTC
the enable api in saferename and safedelete actions try to get model even
though, the activated nodes are not referenceable. In such case refereceable is
null and we get NPE, added check.
fixed in safedelete and saferename actions.
Comment 3 bhate 2006-09-20 19:20:48 UTC
*** Issue 85373 has been marked as a duplicate of this issue. ***
Comment 4 Andrei Chistiakov 2006-09-22 11:23:59 UTC
Verified in build 060921_1.