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 134273 - quick fix changes focus to a new editor window when creating some new code elements
Summary: quick fix changes focus to a new editor window when creating some new code el...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-30 16:52 UTC by mohamedsamy
Modified: 2013-09-02 14:22 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mohamedsamy 2008-04-30 16:52:09 UTC
When applying some quick fixes that create new entities (a class, a method..etc) the editor focus will move to another
editor window containing the newly created entity. This assumes that the user wants to edit the newly created entity
right away.

I think one of the main motives behind quick fix is to facilitate top-down design where the programmer 'uses' a lot of
code without worrying about implementing them right away and focuses on the code at hand. My personal use case is to
call many non-existing functions and then quick fix my way to implement all of them. Having to switch back and forth
between the main code window and the code windows for all the newly created elements is a real distraction.

I recommend examining the significance of this use case and its importance for developers and offering an option, if
possible, to "quickfix in place" without changing editor focus.

To reproduce:

- Create a simple class that instantiates another, nonexistant class
  class Foo {
  
      public Foo() {
          new Boo();
      }
  }

- Click the "QuickFix" lamp icon, which will offer to create a new class. Confirm that selection.
- Focus will immediately switch to "Boo.java", to modify the newly created class.
Comment 1 Vitezslav Stejskal 2008-05-04 16:46:37 UTC
> This assumes that the user wants to edit the newly created entity right away.

Not only that. It is also a confirmation for the user that the entity has been really created. This is not to say that
your usecase is not valid. But I can imagine that each approach will have many people arguing for it. Maybe we could
create an option for this and let everybody choose the style they prefer.
Comment 2 Jan Becicka 2008-05-15 13:25:29 UTC
Max volunteered :)