Você está na página 1de 11

České vysoké učení technické v Praze

Fakulta elektrotechnická

Návrh Uživatelského Rozhraní
X36NUR

Editors Comparison
(NetBeans IDE, Eclipse,  
IntelliJ IDEA)

Roman Hák

May 5, 2008
Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA) Roman Hák

Goal and purpose of test


Purpose of this test is to compare three the most widely used IDEs (Integrated Development
Environments) from the scope of usability its editors with focus on source code editing in Java
language. Compared IDEs are NetBeans IDE, Eclipse and IntelliJ IDEA.

Goal of this test is to find differences/similarities of tested editors. Analyze solutions from the scope
of usability and decide which solution is the best. Based on the best solution give some advices and
recommendations for NetBeans IDE.

Versions of tested IDEs


● NetBeans IDE 6.1 (Sun Microsystems)
● Eclipse 3.3.2 (Eclipse contributors)
● IntelliJ IDEA 7.0.3 (JetBrains)

Target user
The target user for this test is junior Java programmer with advanced knowledge of programming.
He knows Java language and basic libraries from Java API. He has experience with creating small
projects with few packages and classes. He expects from IDE to make his work easier, increase his
productivity and gives him comfort for developing.

Cognitive walkthrough
I choose a cognitive walkthrough as a usability inspection method. Every step made during test is
evaluated by four main questions:
● Will the user try to achieve the effect that the subtask has? Does the user understand that
this subtask is needed to reach the user's goal?
● Will the user notice that the correct action is available? E.g. is the button visible?
● Will the user understand that the wanted subtask can be achieved by the action? E.g.
the right button is visible but the user does not understand the text and will therefore not
click on it.
● Does the user get feedback? Will the user know that he has done the right thing after
performing the action?

Editors comparison is very specific type of test and some tasks could not be easily evaluated by this
four questions. The most of actions and task are well designed and are proved by time. Keeping this
in mind I will not answer on all of this questions in this work, but instead of that I will show good
and bad designs used in IDEs and I will give recommendations and advices for NetBeans IDE.

2
Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA) Roman Hák

1. Basic code editing

1.1 Code formating


NetBeans IDE 6.1 IntelliJ IDEA 7.0 Eclipse 3.3.2
Format whole source Yes Yes Yes
Format selected part Yes Yes Yes
only
User's specific Yes Yes Yes
formatting of code

All three IDEs support code formatting of whole source or of selected part only. They all allows
user to set his specific formatting.

Eclipse and NetBeans IDE


There is no bad design found in Eclipse and NetBeans. All actions are available and the user
clearly understand whole process and gets acceptable feedbacks.

IntelliJ IDEA
Every time the user of IntelliJ IDEA choose to reformat code the Reformat Code dialog appears on
the screen. This dialog asks him if he want to reformat whole code or selected part only. This is not
necessary, because editor can easily predict user's selection. If there is no selected part of source
whole source should be reformatted. Otherwise the selected part should be reformatted.

1.1 Find/Replace

NetBeans IDE 6.1 IntelliJ IDEA 7.0 Eclipse 3.3.2


Find Yes Yes Yes
Replace Yes Yes Yes

All IDEs supports finding and replacing with options like case matching, regular expressions etc. In
functionality there are almost no differences between IDEs.

Eclipse
Eclipse has one common dialog window for both finding and replacing. With respect of fast
accessibility of find function, this is not well designed. Another reason why this is not good to have
finding dialog, is that the dialog itself overlaps editor and the user needs to move it outside first to
see the code (see figure 1.1).

3
Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA) Roman Hák

1.1 Find/Replace dialog in Eclipse

IntelliJ IDEA
IntelliJ IDEA has fast pop-up top bar for finding and special dialog window for replacing. This is
very well designed because finding is very frequently used and needs to be fast accessible.

NetBeans IDE
NetBeans uses similar approach to IntelliJ IDEA except the pop-up bar is not on the top of editor's
window but on the bottom of it.

1.2 Code completion

All IDEs have same design for code completion. When the user invokes the code completion
feature, a code completion box will appear, displaying a list of words that can complete the text
typed in the editor. This behavior is provided by many other source code editors and there is no
need to change anything.

4
Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA) Roman Hák

Anyway there is one special feature IntelliJ IDEA brings to code completion. You could use
“CamelHump” for searching in list of words that can complete the text (see figure 1.2).

1.2 "CamelHump" searching in IntelliJ IDEA 7.0

Recommendation for NetBeans IDE


● add “CamelHump” support for searching

1.3 Use hints

Eclipse
While some use hint is available the bulb icon will appear on editor's left side bar with line numbers
on appropriate line. When user moves mouse cursor on the bulb the text with hint explanation will
pop-up. Clicking on the bulb list of solutions is shown. User can click on one of them to solve
situation. During whole process the user clearly understands what is happening and knows what to
do next. There is no design issue.

IntelliJ IDEA
In IntelliJ IDEA there is also the bulb icon on editor's left side bar while some hint is available. The
user must click on the icon to see the hint text (see figure 1.3). Even clicking on the text will show
the list with solutions. Again the user can click on one of them to perform action. It is not a good
idea that the user need to click on bulb icon to see the hint text. The rest of the process is user
friendly and there are no other design issues.

5
Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA) Roman Hák

1.3 Use hint in IntelliJ IDEA

NetBeans IDE
There is same design progress like in Eclipse. Like was written above this is designed very well and
needs no change.

1.4 Macros

NetBeans IDE 6.1 IntelliJ IDEA 7.0 Eclipse 3.3.2


Macros support Yes Yes No
Macros editing Yes Yes No

Eclipse
Eclipse has no support for macros.

IntelliJ IDEA
IntelliJ IDEA starts (resp. stops) macro recording from menu Tools → Start Macro Recording
(resp. Stop Macro Recording) . After recording is stopped the user is prompted by dialog to set the
macro's name. Once the macro's name is set it is automatically added to menu Tools → “macro's
name” and user can anytime call the macro from here. The user can edit macro in Edit Macros
dialog where he can delete and rename macro or remove any action from macro. Edit Macros dialog
is in menu Tools → Edit Macros. The bad design here is that the user cannot set the keyboard
shortcut for the macro in this dialog. The only way to do this is to go to Settings → Keymap →
Macros.

NetBeans IDE
There are two ways in NetBeans to start (resp. stop) macro recording. One way is from menu Edit
→ Start Macro Recording (resp. Stop Macro Recording). The second and very easy to use way are

6
Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA) Roman Hák

two icons in editor window's tool bar. After recording is done the user is prompted to set the
macro's name and Editor Macros dialog is opened. The user can remove, rename, edit macro or set
keyboard shortcut for it. There is another way to set shortcut for macro in menu Tools → Options
→ Keymap → Editor Macros. This is designed very well since the user can edit shortcut for a
macro on every of two places where he could expect to. Bad thing is that there is no way to run
macro without setting a shortcut for it and then use it. Macros' editor called Editor Macros is only
accessible from menu Tools → Options → Editor → Macros. Good idea would be to add Editor
Macros menu item to menu Edit and add Editor Macros icon to editor's window tool bar next to
start and stop macro recording icons.

Recommendation for NetBeans IDE


● add Editor Macros menu item to menu Edit
● add Editor Macros icon to editor's window tool bar next to macro recording icons
● add Run Macros sub menu to menu Edit. This sub menu will contain list of all available
macros to run

2. Syntax highlighting

All three IDEs supports syntax highlighting on a very high level. All of them allows user to change
predefined colors by the way he likes it.

I did not find any bad designs in syntax highlighting. I have got only one recommendation for
NetBeans IDE. Words TODO, FIXME etc. in to do tasks should have bold font face because they
need to call user 's attention. Maybe there could be option to colorize to do tasks by a different color
than other comments.

3. Code navigation

3.1 Navigator

NetBeans IDE 6.1 IntelliJ IDEA 7.0 Eclipse 3.3.2


Structured view Yes Yes Yes
Filters Yes Yes Yes
(inherited members
filter missing)
Quick search Yes Yes Yes
Pop-up navigator No No Yes

All tested IDEs have very good navigator with structured view support and number of very useful
filters. There are no issues in design.

7
Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA) Roman Hák

Eclipse has a sort of pop-up navigator (see figure 3.1), which NetBeans and IDEA have not. This is
very good idea because user could keep his eyes focused on editor window and could not focus on
the side navigator window. This approach is faster and very comfortable, especially when user has
small display and his navigator window is closed.

Recommendations for NetBeans IDE


● add pop-up navigator with quick search

3.1 Pop-up navigator in Eclipse 3.3.2

3.2 Tasks management

NetBeans IDE 6.1 IntelliJ IDEA 7.0 Eclipse 3.3.2


List of tasks in active Yes Yes No
source file
List of tasks in project Yes Yes Yes
Filtering Yes Yes Yes
New task definition Yes Yes Yes

In tasks management there are two different approaches – tree view and list view.

8
Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA) Roman Hák

Eclipse
Eclipse has classic list view of tasks. It allows the user to sort tasks by any of available fields
('description', 'resource', 'path', 'location' and 'priority'). Eclipse is the only IDE which offers to
define priority to every type of task. It is more accurate to sort tasks by its priority then sort it, for
example by description.

IntelliJ IDEA
IntelliJ IDEA shows tasks as a tree view. Nodes are files (or you can switch to packages view) and
leaves of the tree are tasks. It is good idea to see tasks grouped by files/packages but tree view is not
good approach since when a project has many files with tasks, it is hard to move from one task to
another. Another bad thing about IDEA is that there is only TODO task predefined in default
settings.

NetBeans IDE
NetBeans has very similar approach to Eclipse, but unfortunately it does not support task priority.
Unlike other two IDEs NetBeans shows syntax errors as an error tasks in task window. This is very
good idea since you can see errors and other tasks altogether not in different window.

Recommendations for NetBeans


● add option for defining priority to a type of task
● add field with package information (could be more useful than information about path)

4. Refactoring

NetBeans IDE 6.1 IntelliJ IDEA 7.0 Eclipse 3.3.2


Find usages Yes Yes Yes
Rename Yes Yes Yes
Move Yes Yes Yes
Safe delete Yes Yes No

Eclipse
When the user selects to rename some method (or class, attribute etc.) the identifier will be
highlighted and the user can change its name. There is pop-up text “Enter new name, press Enter to
refactor” and small arrow next to it. Clicking on this arrow invokes the pop-up menu with list of
available actions like Refactor and Preview. Pressing enter key or choosing Refactor action will
instantly perform refactoring. Clicking on preview will open new window with list of changes

9
Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA) Roman Hák

which needs to be done to perform refactoring and two code listings (original code and refactored
code) with highlighted changes. The user can see all changes and then confirm or cancel
refactoring. The bad design here is that after renaming the user is prompted with text to press enter.
He don't know that clicking on the small arrow will give him the chance to see the preview first.

4.1 Refactoring in Eclipse 3.3.2

IntelliJ IDEA
After the user selects to rename the Rename dialog with input text field for new name and Refactor,
Preview and Cancel button will be displayed. Refactor button will immediately perform refactoring.
Preview button will open dialog with tree view of all changes need to be done. Clicking on any
change will shows it in editor. Unlike in Eclipse there is no code listings with highlighted
differences. I'd recommend the approach from Eclipse because the user has better view what will
the refactoring affect.

NetBeans IDE
NetBeans offers the same Rename dialog. Preview is designed in very similar way as in Eclipse. It
is good approach, but the Preview window is displayed as a part of the bottom panel in NetBeans
IDE. This is wrong because this panel is very small to display it (see figure 4.2). Because of this the
user needs to resize the panel every time before he can continue.

4.2 Refactoring in NetBeans

10
Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA) Roman Hák

Recommendation for NetBeans IDE


● move Preview window to separate dialog or as a tab in editor's window

5. Automatic code generation

NetBeans IDE 6.1 IntelliJ IDEA 7.0 Eclipse 3.3.2


Constructor Yes Yes Yes
Setters/Getters Yes Yes Yes

NetBeans IDE and IntelliJ IDEA has absolutely same design of automatic code generation. It is
well designed and there is probably nothing to change.

Eclipse has very similar design. It has a few more setting like insertion point where the code will be
generated to and access modifiers. But these options are not so important and there is no need to
implement them.

6. Conclusion
Eclipse, IntelliJ IDEA and NetBeans IDE are the most widely used IDEs for Java. Their editors, one
of the most important part, have very high quality, however, there is still a few issues in their design
with respect to usability. I tried to find the most of them in this work and I gave recommendations
how to solve them.

11

Você também pode gostar