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 77193 - Dismissing code completion in options dialog can dismiss dialog
Summary: Dismissing code completion in options dialog can dismiss dialog
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Options (show other bugs)
Version: 5.x
Hardware: Macintosh All
: P4 blocker (vote)
Assignee: David Strupl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-01 01:02 UTC by _ tboudreau
Modified: 2010-10-20 08:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2006-06-01 01:02:18 UTC
Try editing a code template (abbreviation) in the options window.  At some point, you will type . and 
code completion will pop up.  It will probably find no completions, and you will want to press ESC and 
get it out of the way.  This actually works correctly...except that if there's a GC or something right when 
you press ESC, it's very, very easy to end up pressing ESC twice.  The second press dismisses the 
options dialog, which is very annoying.

I'm really not sure who should own this big - the editor, the options dialog, the java module.  Multiple 
possible solutions:

1.  Suppress code completion for the template editor
2.  Editor automatically figures out it's in a dialog and suppresses code completion if it's top level 
ancestor is a dialog (this would cure this problem anywhere else it exists, but might upset someone 
somewhere)
3.  Don't have ESC close the options dialog when focus is in the editor (not really a good choice) 

1 seems best to me if there's a way that it can be done.
Comment 1 Vitezslav Stejskal 2007-02-15 02:03:55 UTC
It's a bit funny. I am able to get 'No suggestions' completion for the first
time I open Tools-Options, but after the dialog has been closed once there is no
code completion any more. Anyway, I think it should be solved in the options
dialog itself (more preciely in its Code templates panel) in a similar way as
<Enter> is handled. If the focus is in the JEditorPane with the code template's
body <Enter> does not close the dialog either. The same should be done for <Esc>
I think.

I personally thing that CC should work even in dialogs like this one. It
probably won't be able to offer more than just a default JDK stuff but even that
could be useful.
Comment 2 novakm 2007-10-31 17:16:31 UTC
It seems CC is not working in code template in latest build of 6.0. Was suggestion number 1 implemented and is it
considered as fixed then?
Comment 3 Vitezslav Stejskal 2007-11-01 10:14:34 UTC
I doubt anybody was fixing this, so I would rather leave it open please.
Comment 4 Jan Becicka 2008-02-15 09:23:24 UTC
I see "No Suggestions" always.
Comment 5 Jiri Prox 2008-04-11 00:44:01 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 6 Quality Engineering 2009-12-21 05:19:37 UTC
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. 

We apologize for any inconvenience.


Thank you.
The NetBeans Team
Comment 7 _ tboudreau 2009-12-21 14:53:17 UTC
Reverting bogus issue closure
Comment 8 David Strupl 2010-10-20 08:20:32 UTC
I am not going to work on this.
Comment 9 _ tboudreau 2010-10-20 08:36:26 UTC
Oh, for chrissakes - is one line

KeyEvent.consume()

or perhaps

if (EventQueue.getCurrentEvent() instanceof KeyEvent && ((KeyEvent) EventQueue.getCurrentEvent()).getKeyCode() == VK_ENTER) EventQueue.getCurrentEvent().consume();

in the handler that closes the popup *really* hard to write?!
Comment 10 David Strupl 2010-10-20 08:43:18 UTC
Oh, after your comment it is really hard to even bother looking at any of your reports. BTW if it is "that" easy --- being just a tiny tiny bit of polite and attach a patch would greatly improve the probability of someone applying such a change.

Fixing a "problem" that you accidentally hit Esc twice - give me a break!