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 85814 - Umbrella for discussion: Things you'd like to see in the new 6.0 editor and beyond
Summary: Umbrella for discussion: Things you'd like to see in the new 6.0 editor and b...
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 10 votes (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
: 74209 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-26 18:13 UTC by _ wadechandler
Modified: 2016-07-07 07:25 UTC (History)
7 users (show)

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 _ wadechandler 2006-09-26 18:13:10 UTC
This is an umbrella issue to help keep comments from being lost in the mailing
list.  PLEASE FOCUS ON THE EDITOR....i.e. don't include wizards that aren't
actually part of the editor module.  There has been a major discussion on the
nbusers mail list on this topic.  Hopefully this discussion can be post here by
the respective users and ideas can be obtained and broken out.  For those ideas
keep them  in their own issues.
Comment 1 greggwon 2006-09-26 18:42:31 UTC
There are several things going on with editor interfaces and plugability in
these discussions.  It seems that there might be a case for separating the
editor into a true MVC architecture.  This would allow the content (M) to be
separated from the editor (C) and the windowing implementation(V).  Right now,
its the M and V parts that are tightly interlaced to allow XML viewing to be
different from Java viewing.  The editor part just gets lumped into that
relationship, and is not an extractable or substitutable part of the system. 
Make the (C) part extractable or substitutable, and we'll be able to have
different editor bindings for different peoples needs.  In the end, it should be
possible to have a window open with VI bindings accessing the same file that is
open in another window with MATISSE editing the components of the GUI form
associated with that class.  You could also imagine having a VI window and a
form of the existing Java editor in use in two different windows to take
advantage of particular key bindings that make particular tasks easier to perform.
Comment 2 brviking 2006-09-26 18:43:34 UTC
I would like the CC on editor be "context sensitive", like intelissense (from
Visual Studio tools), but with a plus (of course, this could be disabled by
default):
- One CTRL+Space show options for "in context imports" (methods/attributes on
same class, classes on same package, classes already imported); Having two (or
more) classes with same name, latest used is show first.
- Second CTRL+Space show options for all JDK and project libraries, with
following priority: Latest used; Project Libraries; JDK. Even these order of
precedence should be an option where developer could customize.
Comment 3 wqtnetbeans 2006-09-29 17:11:28 UTC
Date: Sat, 23 Sep 2006 12:19:44 +0800
From: James <james.eliyezar@gmail.com>
Content-Type: multipart/alternative; 
	boundary="----=_Part_2178_31187611.1158985184714"
Subject: [nbusers] Things you'd like to see in the new 6.0 editor


I would love to see the next version of NetBeans to support.
1. Add just a catch clause to an already existing try-catch statement.
2. Provision to comment/uncomment using /* and */ (NB now supports // style
comments only)
3. Fast code completion.
4. Reliable and Stable code completion.
      - When i have some jar as a library in my NB project and if i build
that jar from some other project, NB is not scanning the classpaths
properly.
    As a result, it offers no code completion for the classes in the
particular jar file.
5. Smart code completion.
    - In IDEA there is a short cut key mapping namely "CTRL+ SHIFT + SPACE".
     Suppose if you type JLabel label = and press "CTRL + SHIFT + SPACE",
IDEA will automatically complete the code by writing new JLabel();
6. Quick navigation between methods using "ALT + down arrow " and "ALT + up
arrow".
7. Automatic imports.
   - Now to fix imports, we need to press "ALT + SHIFT + F" everytime even
if have to add just one import statement.
   - Suppose you are typing
             File myFile = new File("sample.txt");
    then IDE must know that it should import java.io.*;
    - Only when there are more than one import options available then the
IDE should display a suggestion bulb (which now NB does)
8. Different colours for variables
       - static variables should have different colour from ordinary
variables.
       - there should be provision to find the unused variables easily.
       - provision to identify final, private, public, protected variables
easily (by using different colours?)
9. Good version control.
     - if you check out a source code and then make modifications, Eclipse
and IDEA will add some background colours to identify the modified portion
very easily. This is an excellent and must to have feature that i really
miss in NB.
    - in short NB editor should help the developer to identify the recently
modified portion of the code easily.
    - provision to compare between the older version and the current version
by a mere right click. (Not two different files, but two different versions
of the same file. NB should track the changes to some extent atleast till
checking in).

10. Visual designer for HTML and JSP pages (not just JSF).
11. Integrated MyFaces support.
      - While creating a JSF project itself, NB should provide facility to
choose the implementation.

Though Eclipse and IDEA (to some extent) offer limited features compared to
NB, their users are addicted to those IDE's because of one MAIN reason.
Eclipse and IDEA have far more superior editor when compared to NB.

I would even go to an extent and say that Eclipse is nothing but an
excellent editor. (everything else is a plugin).

NetBeans has thrashed Eclipse in every other area like GUI building, J2EE,
Mobility etc, etc. but certainly not in the editor area.

If only NetBeans can provide these and other editor features mentioned by
our beloved friends, NB can not only become a Eclipse killer but also an
IDEA killer too.
(J2EE support in IDEA is really crappy when compared to NB, but why the IDEA
users are loving that IDE is just, just because of its editor)


We badly need this NB.
We want you to rule the world.
Will you take this oppurtunity and become the defacto Java IDE and make the
dreams of millions of your admirers a reality?
Comment 4 wqtnetbeans 2006-09-29 17:12:01 UTC
a. Provide key-combo for all refactor features (currently only the a few
have this, such as "shift+alt+R" for rename).
b. Revisit and align consistence of key-combo to either IntelliJ/Eclipse.
(This will make migration to NB much easier. eg. in NB "shift+alt+O" and
"shift+alt+R" are really bad key-combos for really good features).
c. At the start of the IDE, have a pop-up "Productivity tips..." window that
advertise the key-combos. (Of course user should have the option of deselect
and not to show it).
Comment 5 wqtnetbeans 2006-09-29 17:14:33 UTC
*** Issue 74209 has been marked as a duplicate of this issue. ***
Comment 6 wqtnetbeans 2006-09-29 23:38:11 UTC
It'd be nice to have one-key-stroke code generations on an existing class

1. constructor
2. getter/setter 
3. equals() and hashCode()
4. toString()
5. JUnit test
6. over ride method...
7. delegate method...

Those are from IntelliJ, which I think is very neat. Among them, 2, 5, and 6 are
already available in NB; but it'd nice to have them under one "generate..." menu
or something like that.

Below is a sample from IntelliJ. Note that only user input is the two String
feilds; the rest are generated by the IDE.

public class MyClass {
   String f1;
   String f2;

   public boolean equals(Object o) {
       if (this == o) return true;
       if (o == null || getClass() != o.getClass()) return false;

       final MyClass myClass = (MyClass) o;

       if (f1 != null ? !f1.equals(myClass.f1) : myClass.f1 != null)
return false;
       if (f2 != null ? !f2.equals(myClass.f2) : myClass.f2 != null)
return false;

       return true;
   }

   public int hashCode() {
       int result;
       result = (f1 != null ? f1.hashCode() : 0);
       result = 29 * result + (f2 != null ? f2.hashCode() : 0);
       return result;
   }


   public String toString() {
       return "MyClass{" +
               "f1='" + f1 + '\'' +
               ", f2='" + f2 + '\'' +
               '}';
   }
}

There is list discussion at
http://www.netbeans.org/servlets/ReadMsg?list=nbusers&msgNo=67017

Thanks,
Qingtian
Comment 7 varunrupela 2006-10-03 08:22:10 UTC
It will be great to see the Netbeans Editor help quicken development with the
following features. 

1. Type "new ClassThatDoesNotExist()", keep cursor on the same line, use keys
Alt+Enter, the editor can provide option to "create an empty class" (and create
one when this option is selected).

2. Type "new ExistingClass()",  keep cursor on the same line, use keys
Alt+Enter, the editor can provide option to "assign to a variable" (of
ExistingClass or a superclass of ExistingClass) (when this option is selected, a
new object must be declared and assigned this statement).

3. if you use Alt+Enter key when the cursor is on a method/constructor
parameter, the editor can provide option to "assign to a local-variable/field".
On selecting the option, the assignment must complete and the editor must also
define the local-variable/field for you. Particularly useful with constructors.

4. if you use Alt+Enter key when the cursor is on a method name of the method
declaration, the editor can provide an option to "inline method-call". Selection
of this option must replace all calls to a method with the code contained in the
method (and the method itself, optionally deleted). If the cursor was on a
method call, then there can be an option to only inline this particular method
call and not all of them.
This is particularly useful when you create a method using Ctrl+Shift+m and then
decide it doesn't fit and you don't want it anymore (Ctrl + z doesn't seem to
work to revert back to the way code looked before creating the method)

5. if you use Alt+Enter key when the cursor is on a constant, the editor can
provide option to "inline constant". Selection of this option must replace the
reference to a constant with the literal that it represents.

6. Type "new ExistingClass(acceptedParameter, newParameter)" (where a
constructor "ExistingClass(acceptedParameter) exists, but there is no
constructor that takes this new parameter), if you use keys Alt+Enter, the
editor must provide option to "create new constructor".

7. if you use Alt+Enter key when a string literal is selected in the editor, the
editor must provide option to "create/declare a variable/constant".

8. Need a Refactor option to "move a method to another class" (move to
superclass already exists).

9. Need something like Ctrl + "." (in eclipse) that takes the cursor to the
first compilation error in the file open in the editor. (don't want to use mouse
on the right frame with error markings)

10. When typing super() the editore can suggest method parameters and complete
the call for you.
Comment 8 deeptinker 2006-10-07 02:58:26 UTC
I request that all editor options -- by right click, multiple key press,
whatever -- also be exposed in the menus somewhere.  Even if it is dimmed out
99% of the time, it will tell me that it is possible to do it.  If interested, I
can then search the help for more information about how to invoke it.
Comment 9 wqtnetbeans 2006-10-13 21:53:48 UTC
Code navigation between super and overriding methods:

There should be an in-editor, two-way navigation between super and overriding
methods.

How many times have you "ctrl + click" a method name and got stuck at the
Interface method declaration, while what you really want is one of the
implimenting methods? The only thing you can do now is "find usage" of all the
subtypes of the current Interface, go into the one impl class you want, and then
try to find your way into the specific method. 

The new feature, as in IntelliJ, is having a "downwards arrow" besides the super
class method. When you click on it, it drops down and shows you all the impl
methods in all the impl classes. When you click on one of the method in the
dropdown, you go into the impl method code, not just the impl class. If there is
only one impl method/class, clicking the arrow should take you directly to the
one impl method, bypassing the dropdown selection.

A similar "upwards arrow" should exist for all the overriding methods to
navigate backwards.
Comment 10 wqtnetbeans 2006-10-13 22:11:01 UTC
*** Issue 74875 has been marked as a duplicate of this issue. ***
Comment 11 jproto 2006-10-17 08:26:20 UTC
It could be very nice to have a real setting of code formatter such as Jalopy 
witch would works on Matisse files (with protected code).
Comment 12 wqtnetbeans 2006-10-17 20:36:21 UTC
Suggestion marker bars similar to the ones for "deprecated":

Currently there is a light yellow bar to highlight the usage of deprecated
methods. Should have a similar bar for other "obvious suggestions", such as:

. unused local veriables
. unused methods (private and public)
. null pointer potentials in code
. redundant initial values (for both local and instance variables)
.....

Comment 13 mclaassen 2006-10-18 16:02:54 UTC
One thing that has bugged my in NB for a long time is the rudimentary tab
switching support.  For instance:

Example scenario
-----------------
1) Say there are several tabs open
2) Edit one of the first files in the tabbed pane
3) Do a DIFF on the file
4) The DIFF tab opens at the end of the open file list
5) Examine the DIFF
6) Close the DIFF tab

Now, which tab is selected?  It is not the tab I was on when I did the DIFF,
instead it is on the tab of the last file opened, and I have to search for tab I
was looking at when I did the DIFF.  It seems like closing a tab should go to
the previously selected tab.  Furthermore, it would be helpful if reselecting
the current tab would act as a toggle to go to the previously selected tab. 
There are Firefox extensions to do this type of thing and I find it very useful.
 I know there is the alt-shift-k stuff, but that is not the same thing since it
tracks cursor movement.  I think the previously selected tab should just be
automatic.
Comment 14 mclaassen 2006-10-18 16:18:04 UTC
This goes along with my previous comment about being able to go to the
previously selected tab.

Why not implement this behavior as a stack of tabs so there could be forward and
back nativation.  And then, to make things really handy, the forward and back
buttons (which are on many mice these days) could navigate the stack.  That
would be a HUGE timesaver!
Comment 15 jproto 2006-10-18 16:30:30 UTC
It could be interesting to be able to have 2 views (or more) opened in full 
screen mode.

Example scenario:
1. Open a .java file in the editor.
2. Left click on the file tab > “Clone Document”.
   You now have 2 tabs pointing on the same file.
3. Drag & Drop second tab on down part of the editor window.
   You now have 2 views of the same file. (I often use that feature)
4. Double click on a Tab (to be more comfortable)
   You now see only one view in full screen mode.

In that case, I would expect to be able to see both views of my file in full 
screen.
In fact, it would be the same with 2 different files.
Comment 16 seamor 2006-10-19 14:25:56 UTC
I would like to se issue 82622 fixed in NB6, since I use regexp search/replace a
lot.
Comment 17 ptoye 2006-10-31 12:38:50 UTC
A button to close all editor panels. As the tabs aren't the same size, closing
each one individually (and I sometimes have 6 or more) is a bit of a pain.

Workaround - get a more responsive mouse.
Comment 18 _ wadechandler 2006-10-31 12:50:16 UTC
>A button to close all editor panels. As the tabs aren't the same size, closing
>each one individually (and I sometimes have 6 or more) is a bit of a pain.
>
>Workaround - get a more responsive mouse.

There is a lot of functionality already here.  For what you are asking right
click on a tab.  You'll see two options for you:
Close All Documents
Close Other Documents
Comment 19 ptoye 2006-11-02 10:05:10 UTC
Improve the select and drag facility. If you select a block of text and start
dragging it, if the cursor wanders a pixel to the left of the displayed text
(which includes the blank column to the left of the text) the drag fails and
you're left where you started. If you want to insert text in the first column,
this means that you have to be very accurate with the mouse.

I'd suggest being less aggressive about the mouse going outside the allowed
area, and not resetting the mouse position to the original place in the text.
Why not use a different cursor, such as a "forbidden" sign, and keep the
displayed area in the same place - if you see what I mean?
Comment 20 ptoye 2006-11-07 22:03:56 UTC
On my previous note, I should have mentioned that the "no entry" sign appears,
but the displayed text jumps back to the original place - this is the problem.
Comment 21 wqtnetbeans 2007-03-14 20:08:17 UTC
Include "line tool" in standard distribution of the editor. 

http://blogs.sun.com/scblog/entry/line_tools_module_updated
Comment 22 Michel Graciano 2007-03-14 21:21:47 UTC
+1
Comment 23 wqtnetbeans 2007-03-15 04:52:06 UTC
BTW, the so called "line tools" have been standard features in both Eclipse and
IntelliJ since forever.
Comment 24 _ sandipchitale 2008-02-06 03:10:39 UTC
Move/Copy Selection/Line Up/Down part of LineTools module is in NetBeans 6.0.
Comment 25 Irina Filippova 2010-02-12 03:57:50 UTC
Reassigned from usersguide to the correct module.
Comment 26 tomwheeler 2011-10-26 13:39:53 UTC
Here are some ways I think the editor could be improved.  I understand that some of these aren't necessarily in the 'editor' component.  I'm using 'editor' here to indicate what a typical user thinks the editor is; that is, the part of the IDE where one interacts with source code.

   49573   Fix Imports should make use of assignment type 
   57853   Fix Import should default to favorite classes 
   120614  Import class on the left side of assignment 
   123054  Better handling inner classes when generating getters & setters 
   154258  sort suggested import class list by libs in project 
   159203  No Null pointer access hint like Eclispe in the Netbeans editor 
   200713  Add refactoring to add null checks into multi-statement lines 
   200712  Add refactoring to break up multi-statement lines 
   203867  Hint implies incorrect type in Quick Fix assignment 
   204043  Show descriptions for hints to explain why the change might be helpful 

Additionally, I want to reiterate that NetBeans ought to support every single refactoring that IntelliJ IDEA and Eclipse supports.  While perhaps anecdotal, NetBeans' lack of support for the refactoring patterns supported in IDEA is the single most important reason why many developers I know refuse to switch from IDEA to NetBeans.  Here's a list of the ones supported in IDEA:

    http://www.jetbrains.com/idea/features/refactoring.html

And here are the ones from Eclipse:

    http://help.eclipse.org/indigo/topic/org.eclipse.jdt.doc.user/reference/ref-menu-refactor.htm

Finally, I'd like to say that IMHO *all* of what the Path Tools module should be available inside NetBeans, not just an action to copy filename and path as described in #153728.  In particular, the ability to open a shell (command prompt) in that directory is important -- I use this almost every day.  Sandip Chitale originally wrote Path Tools for NetBeans, but now only supports the Eclipse version (which adds some additional features such as custom commands):

    http://code.google.com/p/pathtools/
Comment 27 alied 2015-09-04 02:14:17 UTC
just came to this issue searching for something else.
is this still useful?
Comment 28 Martin Balin 2016-07-07 07:25:59 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss