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.
The netbeans.gif image in the attachment shows the sunstudio Run menu when running on java 1.6. Note how the icons "run into" the text. The cause seems to be the check-box (Allow ss_att...) which is baed on BooleanStateAction. If I remove the check-box the run-in problem goes away. I tried to reproduce this with plain swing. See images swing1.5.gif & swing1.6.gif. It seems that swing wasn't doing a good job in 1.5 and then has "fixed" things 1.6. I suppose NB has worked around swings 1.5 menu layout bugs, but that the fixes in 1.6 swing somehow interfere with nb's workaround producing the inferior menu layout.
Created attachment 60515 [details] netbeans.gif
Created attachment 60516 [details] swing1.5.gif
Created attachment 60517 [details] swing1.6.gif
Dafe, Jesse asked me to add this issue into the list of issues for Patch 1. What do you think ? Thanks in advance.
Well, I know nothing about BooleanStateAction, I think it belongs to actions, passing there. But AFAIK Actions class uses regular Swing JCheckBoxMenuItem, I'm not aware of any workaround, so this is mystery to me. Is this bug reproducible always when menu item with checkbox is added?
I don't know about BooleanStateAction either. But I should try it. I let you know.
The implementation of this is in org.netbeans.modules.openide.awt.DefaultAWTBridge and org.openide.awt.Actions what are out of my scope. I'm sorry.
OK, but i don't know how to fix it, sorry. If anybody knows, patches are welcomed.
I'm not able to reproduce with NB 6.1 running on Windows XP and JDK 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11 I'll try with a solaris machine later. ivan, are you able to reproduce it with NB 6.1 in your setup?
Well, depends which 6.1 ... If I use the binary bits that thp has (netbeans-6.1-200804211638-cpp) I can reproduce it. If I use my own bits built off of release61 I can't. I'm trying to freshen my clone of release61 ... and having problems. I also should try java 1.6.1 ...
ivan, could you investigate it more, please. I've never seen any bug like that in standard distro (but I haven't tried cpp for looong time). If it is reproducible only in cpp builds then it might be caused by some cpp code. What about full distro?
I intend to investigate more ... just having trouble getting my clones refreshed and juggling everything else :-)
marking INCOMPLETE till ivan will provide more info
Sorry it took so long, I ran afoul of problems with external.py. If I use netbeans-6.1_fixes-200805270103-cpp the symptoms are present If I use my build of the current trunk bits the symptoms go away. As much as I don't like inexplicable fixes i'll have to declare this as implicitly fixed.
>As much as I don't like inexplicable fixes i'll have to declare this as implicitly fixed. Could you elaborate on "what is different or fixed in 6.5 and not in 6.1 more?" If you need fix in the 6.1 then we have to either find what will fix it for you or we can close this issue as worksforme. Up to you guys. From my point of view - works for me in 6.5. Feel free to reopen with more detail about the differences between cpp 6.1 build and trunk
I built my own NB from the following repositories: release61 release61_fixes main The problem doesn't show up in _any_ of my personal builds. It only shows up when we use the cached bits that thomas gets from somehwre.
We're still seeing the problem with nb65. And fortunately I've finally traced the problem to it's source org.openide.awt.Actions.CheckMenuBridge.updateButtonIcon() uses an image, gap.gif, to pad the spacing between the checkbox and the text. That should be changed to empty.gif. gap.gif is a bit narrower than empty.gif and that is the right padding for 1.5, but the "improvement" in menu layout from JDK 1.5 to 1.6 requires the padding to be wider and empty.gif seems to be just right. I'll be adding some attachments for reproducible testcases ...
Created attachment 71015 [details] swing-base demonstration of the problem
Created attachment 71016 [details] NB based demonstration of the problem
In the swing based demonstration of the problem (project GUIPlay) choose the Menu menu. It has a pullright, an action with an icon and an action w/o an icon. Choose the action with an icon. This will add more actions to the menu, including a CheckBox action. This menu isn't padded right. Now look at the source for Window.addCheckBoxMenuItem(). It has two menuItem.setIcon()s commented out. If you use gap.gif the menu looks wrong. If you use empty.gif the menu looks right. In the NB-based demonstration of the problem (project MenuItemBug) choose the Debug menu. At the top it has two new items: Dummy and Checkit. Checkit is the one that causes problems. If gap.gif is used the menu is poorly layed out. If empty.gif is used the menu looks right.
This issue is critical for sunstudio IDE, please fix it as soon as practical.
Yes, accepted, I will look at it ASAP.
ivan, thank you for excellent report. I modified code in Actions.CheckMenuBridge to put "empty.gif" on JDK 1.6 and newer, according to your instructions. And it really does the trick, as I verified by running your nb module sample. So hopefully fixed now: 8cbdc375ba72
I had two concerns ... - One was whether the new wider padding would affect menus with _only_ checkboxes. The NB View menu is an example. Fortunately it seems to be OK although I don't understand why. Make sure you check for this on other platforms. - This fix might have an undesirable effect if NB is run on JDK 1.5 ... but is NB supposed to run on 1.5 anymore?
Integrated into 'main-golden', will be available in build *200810040600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/8cbdc375ba72 User: Dafe Simonek <dsimonek@netbeans.org> Log: #133556: Spacing icon changed for jdk 1.6 and newer to align menu well
Yes I checked on Win OS, both with Metal and Win L&F. Will try with GTK L&F also... As for JDK 1.5, look at the patch, we are still using "gap.gif" spacing for JDK 1.5 and "empty.gif" only for JDK 1.6 and newer. NB is supposed to run well on two latest JDKs which are in FCS state, so for now NB should run well on JDK 1.5. Once JDK 1.7 FCS will be available on supported platforms we can say goodbye to 1.5.x
Mariane, you've put sustaining to Cc: field with a note, that it has been requested for release in NB 6.1 Patch 1. I don't see any "61fixes*" keyword in Status whiteboard including it's history. This issue is not going to make it into NB 6.1 Patch 4. We may consider releasing it as part of services-driven NB 6.1 Patch5 release once it would have been scheduled (if it would ever happen). Please mark this issue with 61fixes5-candidate keyword in Status whiteboard or remove sustaining from Cc:, whatever you prefer. For 61fixes5-candidate it has to be verified in trunk (NB 6.5) first. Thanks, -R10a
Ruda, I was told (I think Jesse Grodnik sent me a list of issues, they wanted to fix into one of the patches) to do so. I do not have strong opinion about that, so if the request doesn't exist anymore (Jesse?), remove sustaining from cc list. Thanks in advance.
Removing SSIDE. Fix has been delivered to SS.