The editor loose focuses often.
1) Create a java class
2) Add the lines Rectangle rect = new Rectangle();
3) Click on the light bulb to view the available classes to import.
4) Select the appropriate imported class.
5) Notice that you can no longer type in the editor.
Open any dialog box (ie New Page) and then the focus returns.
Unfortunately since I don't have a break key on the Mac I can't use that windowing feature to determine who has focus.
This problem seems to only happen on the Mac, but I believe there are enough users today using it, that this should be
considered high priority. I will open this a P2 since there is a work around, but I believe it should be considered a P1.
What I know about this from previous reports on similar issues:
-there is a bug on Apple JDK that is causing this problem (Milos should know more about this)
-Honza (jpokorsky) did a workaround for this issue in NB codebase some time ago
-since then we got a report that sometimes the workaround does not help. The problem however was not reproducible on the
Mac available to Honza, so he couldn't come with a better workaround.
In my opinion, vast majority of users do not use mouse to invoke the editor hints (similarly for CC and Insert Code),
which does not cause this problem, AFAIK. The workaround is to use Alt-Enter, arrow keys and Enter/ESC to control the
hints instead of mouse.
Sorry, but unless someone comes with a better workaround for this problem, we probably cannot do anything about this.
I mean: vast majority of users use keyboard instead of mouse to work with hints, etc., and use of keyboard does not, to
my knowledge, cause this problem.
But it is not only editor hints that cause this. This was just an example of something I could regularly reproduce. I
hit it all the time just using debugger. I understand if you are unable to fix it, but it should be viewed as a issue
that should be fixed for 6.0.
For hints, there is already issue #119430. You can try to reproduce with the attached patch and send us your
messages.log. AFAIK we do not have available any general solution that would fix all popupXfocus issues on Mac.
I understand that this is a high priority for Mac users, but since we don't have solution for it I'm going to ask for
Nb6 waiver. If this is not approved it is likely to become a showstopper for the release.
Sounds good. I will work on a more reproducable test case for the other scenarios as well as update my build with the
just for the record:
there were a bunch of serious focus lost issues in 1.5 developer previews on mac. We have workarounded some, apple fixes
others but some randomly prevail. The randomness seems to vary computer by computer. I haven't seen the it on mmy mac
for ages. Probably both usage patterns and hardware at play. Even when I tried to reproduce the "mouse click on hint"
focus lost case for jpokorsky, it always worked fine for me.
Just as another datapoint:
Is this NetBeans specific or a general Swing bug on OSX?
we were solving many focus related problems for 5.0/5.5 in regard to apple's jdk 1.5 release.
It's working on other platforms fine, so I assume this to be another apple bug. However when I was looking into it, I
was not able to produce a simple swing-only testcase that demonstrates the problem.
One source of Swing bugs is updating GUI state from other threads than the AWT thread. This can lead to all kinds of bad
bugs which appears to be Swing bugs but really are application bugs. Some years ago I remember playing with using
patched versions of JComponent (set via bootclasspath) which would do an assert SwingUtilities.isEventDispatchThread()
from all the relevant component methods, in order to try to catch code that is illegally updating GUI state. We might
have such bugs lingering in the code, and whether or not it shows up as Swing bugs varies from OSX to other platforms.
It might be a useful thing to look into, especially testing areas reported to have a lot of problems with focus.
tor: go for it, if you feeling lucky today.
There were no objections against the waiver request, so I'm marking it as 6.0_WAIVER_APPROVED.
*** Issue 122219 has been marked as a duplicate of this issue. ***
*** Issue 126057 has been marked as a duplicate of this issue. ***
Since this issue has same symptoms as issue 119617, which contains more information and more recent comments, I'm
marking this as duplicate.
*** This issue has been marked as a duplicate of 119617 ***