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 103615 - MD - button in submenu causes crash of form and IDE
Summary: MD - button in submenu causes crash of form and IDE
Status: VERIFIED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: App Framework (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Joshua Marinacci
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-10 08:09 UTC by Jana Maleckova
Modified: 2007-11-23 08:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
103615 (1.61 KB, text/plain)
2007-05-10 08:28 UTC, Jana Maleckova
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jana Maleckova 2007-05-10 08:09:51 UTC
NetBeans IDE Dev (Build 200705081800)
1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105
Windows XP version 5.1 running on x86
en_GB (nb); Cp1252

Description:
=============
jdk enables to add object of type "Component" in JMenu but in form there seems
to be forbidden. It's not possible to insert it from inspector (popup - add from
palette) and also directly from palette by drag and drop.
But if e.g button is firstly inserted somewhere in layout and then moved by
mouse in menu in design, then button is finally added in appropriate submenu
without any problem. Result of this action is that if frame is reopen, user is
warmed that frame is damaged. 

Steps which cause that many exceptions are thrown and IDE must be restarted

1. create jframe and insert jMenuBar (have simple java project)
2. insert jButton somewhere in layout
3. move jButton to menu - drag it and move above one of two menus in menubar
4. insert another jMenu (jMenu3) in the same submenu as jButton is
5. invoke custom editor of action for jMenu3 (custom editor is simple)
6. select "using editor" -  Value from existing component
7. check radio button Property and set e.g jMenu1.action
8. save and reopen your jFrame
See form is damaged.
9. push view only and click on jMenu3 in design and an exception occurs
Than this exception occurs all the time and some time IDE gets stuck and must be
killed 

StackTrace:
===========
java.lang.AssertionError
	at
org.netbeans.modules.java.source.usages.RepositoryUpdater.getClassPathEntry(RepositoryUpdater.java:2479)
	at
org.netbeans.modules.java.source.usages.RepositoryUpdater.access$3000(RepositoryUpdater.java:134)
	at
org.netbeans.modules.java.source.usages.RepositoryUpdater$CompileWorker.parseFiles(RepositoryUpdater.java:1282)
	at
org.netbeans.modules.java.source.usages.RepositoryUpdater$CompileWorker.updateFolder(RepositoryUpdater.java:1473)
Comment 1 Jana Maleckova 2007-05-10 08:28:27 UTC
Created attachment 42256 [details]
103615
Comment 2 Joshua Marinacci 2007-05-29 18:34:03 UTC
I don't think we have ever supported adding non-menu components to a menu, even though Swing itself 
allows it. Should we fix this by disabling the ability to drag a component already in the form to the menu? 
This should probably be looked at by the usability designers.
Comment 3 Joshua Marinacci 2007-05-31 19:45:15 UTC
I have committed a fix. Now you cannot drag a non-menu component into a menu.
Comment 4 Jana Maleckova 2007-06-22 08:35:21 UTC
verified on

Product Version: NetBeans IDE Dev (Build 200706220441) Java: 1.6.0_02-ea; Java HotSpot(TM) Client VM 1.6.0_02-ea-b02
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)
Comment 5 Jana Maleckova 2007-11-23 08:54:34 UTC
tested on NetBeans IDE 6.0 RC2 (Build 200711201000)