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 59899

Summary: ClassCastException thrown when opening Tools main menu
Product: java Reporter: Jiri Prox <jiriprox>
Component: BeansAssignee: Jan Pokorsky <jpokorsky>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P2    
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Exception

Description Jiri Prox 2005-06-13 13:07:01 UTC
NB 4.1 (200505031930)
JDK 1.5.0_03

ClassCastException is thrown when opening Tools from main menu while some item
form Bean Patterns is selected.

Steps:
1) create some property or event source
2) click on its node in the project window
3) try to open Tools main menu (with mouse, keyboard, shorcut) without losing
focus from the selected item

->java.lang.ClassCastException: org.netbeans.modules.java.JavaDataObject
	at
org.netbeans.modules.javadoc.comments.AutoCommentAction.findInFolder(AutoCommentAction.java:99)
	at
org.netbeans.modules.javadoc.comments.AutoCommentAction.enable(AutoCommentAction.java:89)
Comment 1 Jiri Prox 2005-06-13 13:07:35 UTC
Created attachment 22633 [details]
Exception
Comment 2 Martin Matula 2005-08-18 16:46:43 UTC
Honzo, please look at it.
Comment 3 Jan Pokorsky 2005-08-22 18:15:03 UTC
It is a bug of the beans module since PropertyPatternNode returns wrong cookie.
Moving back to the beans component. I have a fix for this.
Comment 4 Jan Pokorsky 2005-08-22 18:31:09 UTC
fixed in

beans/src/org/netbeans/modules/beans/Pattern.java,v1.12
Comment 5 Jan Pokorsky 2005-08-22 18:36:27 UTC
*** Issue 60982 has been marked as a duplicate of this issue. ***
Comment 6 Jiri Prox 2005-08-23 13:09:43 UTC
verified
Comment 7 Jan Pokorsky 2005-09-01 12:57:02 UTC
*** Issue 62025 has been marked as a duplicate of this issue. ***
Comment 8 Jan Pokorsky 2005-09-13 14:22:31 UTC
*** Issue 63613 has been marked as a duplicate of this issue. ***