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 267224 - Code Assistance submenu UI issue
Summary: Code Assistance submenu UI issue
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: ilia
: 232861 268327 (view as bug list)
Depends on:
Reported: 2016-07-20 10:30 UTC by ilia
Modified: 2016-10-09 17:00 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Bug appearance - type 1 (206.51 KB, image/gif)
2016-07-28 10:29 UTC, ilia
Bug appearance - type 2 (156.11 KB, image/gif)
2016-07-28 10:29 UTC, ilia
UI snapshot (279.91 KB, image/png)
2016-07-28 10:34 UTC, ilia

Note You need to log in before you can comment on or make changes to this bug.
Description ilia 2016-07-20 10:30:48 UTC
Code Assistance context menu -> expand submenu: items "Configure Code Assistance" and "Failed Directives" are not selectable/ invisible sometimes.
Comment 1 ilia 2016-07-28 10:29:19 UTC
Created attachment 161480 [details]
Bug appearance - type 1
Comment 2 ilia 2016-07-28 10:29:47 UTC
Created attachment 161481 [details]
Bug appearance - type 2
Comment 3 ilia 2016-07-28 10:30:45 UTC
Fixed in:

Removed lazy initialization (no notable profit from lazy initialization were found for this specific case). 

I did an investigation for this problem, however, even with investigation I don't understand the real cause of this issue.

The problem is appearing in Java cluster too (See attachments [1] and [2]).

[1] Bug appearance - type 1
[2] Bug appearance - type 2
Comment 4 ilia 2016-07-28 10:34:47 UTC
Created attachment 161482 [details]
UI snapshot
Comment 5 ilia 2016-07-28 11:40:50 UTC

I've investigated both Java part (Open Required Projects submenu) and CND part (Code Assistance submenu). Results are identical. The only difference: if Java menu is stuck, all JMenuItems are stuck. If CND menu is stuck, only Node.Presenters are stuck, other JMenuItems are OK (Code assistance submenu consists from basic JMenuItems and presenters (Actions$MenuItem).


I attached a debugger and made an UI screenshot. The results are interesting (see a screenshot [3]:

When the bug appears (no difference if it's a case 1 or 2) the bounds of a glitchy JMenuItems are [x=0, y=0, width=0, height=0].
When submenu is created all items have zero bounds, because they are invisible yet.

So i traced the moment of bounds change for a glitchy menu item (Configure code assistance) in hope that i'll see a moment when bounds are set to 0.

  Component:223 (field "x"). Modification only.
Breakpoint Condition: getText().startsWith("Configure")

Result: I don't see someone changes size to [x=0, y=0, width=0, height=0].
So, seems item doesn't change size after created.


This issue seems so appear when class AAA extends JMenu and overrides getPopupMenu() method.
Comment 6 Quality Engineering 2016-08-02 01:58:27 UTC
Integrated into 'main-silver', will be available in build *201608020002* on (upload may still be in progress)

User: Ilia Gromov <>
Log: Fixed #267224 - Code Assistance submenu UI issue
Comment 7 Alexander Simon 2016-09-01 07:15:29 UTC
The menu behavior is worse then was.
- sometimes menu is not accessible. It is not big deal - invoke again.
- sometimes menu has wrong content and user can invoke wrong menu item.
For example: content menu may show "not checked code assistance" for project with enabled code assistance.

Please rollback the fix or provide additional fix.
Comment 8 Vladimir Kvashin 2016-09-13 12:16:18 UTC
Ilia, are you going to backout changes? We are getting close to RC1, 
please either do this ASAP or ask someone other does this.
Comment 10 Alexander Simon 2016-09-20 14:36:32 UTC
Rollback was transplanted to releases, branch release82, change set:
Comment 11 Alexander Simon 2016-09-20 14:37:28 UTC
downgrade priority
Comment 12 Alexander Simon 2016-10-03 18:45:57 UTC
*** Bug 268327 has been marked as a duplicate of this bug. ***
Comment 13 Alexander Simon 2016-10-09 17:00:13 UTC
*** Bug 232861 has been marked as a duplicate of this bug. ***