The following are some of the more interesting or significant additions in the Eclipse 2.1 release.
Eclipse Platform
Java Development Tools
Java Editor
Java Debugger
Refactoring
General
JUnit Integration
Plug-in Development Environment
|
|
Tips and tricks | For
some helpful ideas for increasing your productivity, use Help > Tips
and Tricks then chose which page you are interested in.
|
|
|
User
customizable key bindings |
You
can now customize key bindings using Workbench > Keys preference
page. Emacs users will find a predefined set of key bindings awaiting
them.
|
|
|
Editor navigation history | Workbench
editors now keep a navigation history. If you open a second editor while
you're editing away, you can use Navigate > Back to get back, or
press the back button on the workbench toolbar. The back button on your
mouse also does the trick as along as it sends the standard Alt + Left
Arrow key sequence.
|
|
|
Improved default text editor | The
default text editor now supports line numbers, cursor-line highlighting,
print margin, annotation highlighting, and an overview ruler. All of these
can be configured from the Workbench > Editors > Text Editor
preference page.
|
|
|
Improved editor linking behavior | The
resource Navigator view is no longer tightly linked to the currently open
editor by default. This means that closing or switching editors does not
change the selection in the Navigator view, which many found disorienting.
Toggle the Link with Editor button in the view toolbar to tie the
Navigator view (or similar views) to always show the current file being
edited.
|
|
|
Better UI for editor / view synchronization | The
new Navigate > Show In command provides a uniform way to
navigate from an open editor to a view showing the corresponding file
(e.g., in the resource Navigator view), or from a file selected in one
view to the same file in a different view (e.g., from the resource
Navigator view to the Package Explorer view).
|
|
|
Ant view | There
is a new Ant view (Window > Show View > Ant) that makes it
easier to run Ant buildfiles. The Ant view allows you to view your Ant
buildfiles in one place and simplifies running a single Ant target. The
view includes a search button for finding Ant buildfiles in the workspace
to add to the view.
|
|
|
Ant editor |
There is a new Ant editor that makes it easier to edit Ant buildfiles. The Ant editor provides content assist, syntax highlighting, an outline, and error reporting. |
|
|
External tools & launch configurations |
External tools now use debugger-style launch configurations. The Run > External Tools drop-down menu now appears and works in the same fashion as the run and debug drop-down menus. The output from external tools now appears in the standard Console view. External tools can now be run in the background, by a separate thread. This means that you can let an Ant build run or launch an external program and still continue to work in the Eclipse IDE. |
|
|
More flexible project layouts | There
is now improved support for dealing with externally imposed restrictions
on how the files in a workspace project are laid out in the local file
system. When creating a folder or file, you can link it to an existing
location in the file system outside of the workspace. This is done using
the Advanced section on the New Folder and New File wizards. These linked
resources are useful for integrating with external libraries or source
code directories that cannot readily be copied into an Eclipse workspace.
|
|
|
|
Java editor is more customizable |
Java > Editor preference page offers more configuration options:
|
|
|
Sticky hovers |
You can open a hover in a scrollable and resizable window by pressing F2. You can select and copy content from this window. |
|
|
Prominent status indication |
Both
the Default Text editor and the Java editor now display a prominent marker
in the upper right corner to indicate that the file contains errors or
warnings.
|
|
|
Find in file |
The
Search menu group contains a new command (Occurrences in File) to
search for all occurrences of types, fields, methods and local variables
inside the compilation unit or class file in which the element is
declared. Consistent with other search commands, markers are generated and
presented as annotations in the editor. Entries in the Search Results view
have different icons for read and write access. In this example you see
the search results for "fName" in "TestCase.java".
|
|
|
More Quick Fixes |
There are now Quick Fixes for additional Java problems. Click the light bulb in the left margin of the Java editor, press Ctrl+1 or select Edit > Quick Fix from the menu to:
Other compiler-detected problems that can be fixed using Quick Fix include:
|
|
|
Quick Assist |
The Quick Fix actions are now available even when there are no errors. Position the caret in an identifier and press Ctrl+1 (Edit > Quick Fix) to invoke Quick Assist.
|
|
|
Code assist improvements |
|
|
|
Improved Java outline view |
You can adjust the Java outline to show
just the members of the compilation unit's main type by pressing the |
|
|
Hyper-linked Java code |
While hovering over Java code, pressing the Ctrl key and moving the mouse turns class, method, and field identifiers into clickable links to the corresponding declaration. This option can be configured via the Java > Editor > Navigation tab. |
|
|
Scroll to the next member | Use Ctrl + Shift + Arrow Down (Navigate > Go To > Next Member) and Ctrl + Shift + Arrow Up (Navigate > Go To > Previous Member) in the Java editor to quickly navigate between member methods, fields, initializers, and types. |
|
|
More errors detected on the fly |
The Java editor now annotates more error types, including uncaught exceptions and unused variables, which require detailed flow analysis. |
|
|
In-place outlines |
Press
Ctrl+F3 (Navigate > Open Structure) in the Java editor to
pop up an in-place outline of the element at the current cursor position.
Or press Ctrl+O (Edit > Open Structure) to pop up an in-place
outline of the current source file.
|
|
|
Hover information in editor overview |
The
Java editor overview ruler (on the right side of the frame) now shows
hover information for problem annotations.
|
|
|
Class file editor |
The class file editor has caught up with the compilation unit editor. It now supports cursor-line highlighting, line numbers, annotation highlighting, overview ruler, print margin, semantic selection expansion, and keyboard navigation between the members of the class file. |
|
|
|
Threads and Monitors view |
The debugger's new Threads and Monitors view shows which threads are holding locks and which are waiting to acquire locks.
|
|
|
Instance breakpoints and watchpoints | You
can now set breakpoints & watch points specific to a particular object
instance. In the Variables view, choose Instance Breakpoints...
from the variables context menu.
|
|
|
Improved conditional breakpoints | A
traditional conditional breakpoint is triggered by a boolean expression
evaluating to "true". It is now possible to declare conditional
breakpoints that are triggered whenever the value of an expression
changes. In addition, code assist is now available when typing the in the
conditional expression.
|
|
|
Stepping into selections |
The Java debugger now allows you to step into a single method within a series of chained or nested method calls. Simply highlight the method you wish to step into and select Step into Selection from the Java editor context menu. |
|
|
Watch items | You can create watch item by selecting an expression in the Java editor and using the Watch action (available in the context menu, and in the Run menu). As well, a watch item can be created by selecting a variable and using the Watch action. |
|
|
Step filters | Step filters are more convenient to use now that a Step With Filters action has been added to the debug toolbar and menu. As well, actions have been added to the debug context menu to streamline the creation of step filters for the type or package associated with the selected stack frame. |
|
|
Word wrap in Variables view | The
details area of the debugger's Variables and Expressions
views now supports word wrap, available from the view drop-down menu.
|
|
|
Stack trace hyperlinks |
Java stack traces in the console now appear with hyperlinks. When you place the mouse over a line in a stack trace, the pointer changes to the hand and the stack trace is underlined. Pressing the mouse button opens the associated Java source file and positions the cursor at the corresponding line. |
|
|
Console buffer size | The Console view retains only the most recent N characters of output (default is 80K). The console buffer size can be configured via the Debug > Console preference page. |
|
|
Filtering constants & statics |
Two new actions are available in the pull-down menu of the Variables view - Show Constants & Show Static Variables. These actions toggle the visibility of static final and static variables. |
|
|
Faster stepping |
The performance of the debugger's Run > Step over (F6) action has been improved. You should notice the difference when holding down the F6 key or rapidly clicking the Step Over button. |
|
|
Instruction pointer |
When debugging, the Java editor now indicates the currently executing line with an arrow in the left margin. This arrow is solid for the top stack frame and hollow for non-top stack frames. |
|
|
|
New Refactorings |
Many new refactoring actions are available:
|
|
|
Improved Refactorings |
Several refactoring actions have been improved:
|
New lightweight refactoring UI |
Activating any Java refactoring operation now shows a small starting dialog to gather information needed to perform the refactoring. Click OK to execute the refactoring without further ado, or click Preview to see its effects before deciding whether to go ahead. |
|
|
|
More flexible Java source and output paths |
The
Java build path setup offers improved flexibility:
|
|
|
Project-specific Java compiler settings | In addition to workspace-wide Java compiler preference settings (Java > Compiler), you can now configure these for a specific Java project through the new Java Compiler property page on each Java project. |
|
|
More Java compiler options |
![]() |
|
|
Improved prefix and suffix configuration for variables |
In
addition to configuring the prefix or suffix for fields, you can now
specify the prefix or suffix for static fields, parameters, and local
variables. These settings on the Java > Code Generation
preference page are used in code assist, quick fix, and refactoring
whenever a variable name needs to be computed.
|
|
|
Customizable code generation |
The Java
> Code Generation preference page allows you to customize generated
code and comments in a similar way to normal templates. These code
templates are used whenever code is generated. (The comments replace the
existing 'filecomment' and 'typecomment' templates used for code
generation.)
|
|
|
Configurable task tags |
The Java
> Task Tags preference page is used to configure the workspace-wide
presentation of task tags appearing in Java comments. You can also
configure these tags on a per-project basis via the Java Task Tags
property page on each Java project.
In the editor you'll see: |
|
|
Sort members |
There is now a Sort Members action on the context menu of Java compilation units and top level types that rearranges the members of a compilation unit according to the category order defined in the Java > Appearance > Member Sort Order preference page. |
|
|
Add Delegate Methods dialog |
You can now easily generate delegate methods (methods that delegate to a method provided by an instance variable) by using the Source > Generate Delegate Methods action. The action is available on all types with fields. |
|
|
Package Explorer improvements |
Non-Java
projects are now presented in the Package Explorer view. A filter is
provided to filter out non-Java projects, and the open/close interaction
is now consistent with the resource Navigator view.
Libraries (such as the JRE system library) are now presented as a single node with one or more JARs as children. |
|
|
Hierarchical vs. flat layout of packages |
An option on the Java Packages view (and the Package Explorer view) allows you to change the way packages are displayed. Hierarchical displays packages in a tree, with sub-packages below packages; Flat displays them in the standard arrangement, as a flat list where all packages and sub-packages are siblings. Below is an example of the hierarchical layout: |
|
|
Logical packages |
The Java Packages view (Java Browsing perspective) coalesces packages of the same name across source folders within a project. This shows a view of a logical package. |
|
|
Type hierarchy view supports grouping by defining type |
The
type hierarchy method view lets you sort the selected type's methods by
its defining types. For example, for AbstractList you can see
that it contains methods that were defined in Object , Collection ,
and List :
|
|
|
More filters for the Package Explorer and Project views |
There are more filters for Package Explorer and Projects views: |
|
|
Multiple method restore |
You
can now restore multiple Java elements from the local history in one
operation by selecting Restore From Local History from the context
menu. In the left pane of the dialog, check the elements you want to
restore and for each checked element select a history entry from the right
hand side.
|
|
|
|
Running all unit tests |
The JUnit test runner now gives you an easy way to run all tests in a specified Java project, source folder, or package. |
|
|
Finding unit tests | The new JUnit action Navigate > Go To > Referring Tests finds and navigates to tests that reference a particular type or method. |
|
|
Run as JUnit test |
Select a JUnit test method in a view and choose Run > Run As > JUnit test. This creates a launch configuration to run the selected test. |
|
|
|
Improved way to reference dependent plug-ins | The
new Plug-in Development / Java Build Path Control preference
controls whether new plug-in development projects will use a dynamically
computed build classpath entry rather than an explicit list of required
plug-in JAR libraries (the default). Turning this preference on makes the
Java project build classpath much less fragile, and visually groups
together libraries for required plug-ins. It also makes the classpath
highly dynamic in that it instantly reacts to the changes in the
self-hosting style (external plug-ins versus imported binary projects).
|
|
|
Exporting deployable plug-ins and features | There are new File > Export wizards for exporting plug-in and features. Choose File->Export->Deployable plug-ins and fragments to export selected plug-ins to a ZIP file that can be easily unzipped into any Eclipse-based product. Similarly, choose File > Export > Deployable features to export selected features and their plug-ins. |
|
|
Importing with linking | Importing external plug-ins and fragments can be much faster and would not greatly increase the size of your workspace if you import with linking. This new option can be used by unchecking the 'copy plug-in content into your workspace area' checkbox in the 'Import External Plug-ins and Fragments' wizard. 'Importing with linking' means that the import operation will not copy the resources being imported into your workspace. It will simply create links to the files being imported. You will be able to browse these linked resources, as if they had been copied into your workspace. However, they are physically not there on your file system, so you will not be able to modify them. Beware of operations that depend on files being physically in your workspace, as they will not work on linked resources. |
|
|
Support for creating update sites | PDE
now supports building and maintaining Update Manager update sites. Use the
new project wizard Plug-in Development > Update Site Project to
create a dedicated project with all the relevant files including the site
map (site.xml) file. The site map editor creates the required entries in
the map and also builds the needed feature and plug-in JARs. Once built,
the site is operational directly from the workspace and can be tested
using Update Manager (Help > Software Updates > Update Manager).
And with Eclipse FTP/WebDAV Support installed, you can upload everything
to a remote update server.
|
|
|
Manifest file validation | Manifest (plugin.xml/fragment.xml) files in plug-in projects that have a PDE nature can now be validated to flag semantic errors such as unknown extension points, illegal attributes for extensions, missing required attributes for extensions, etc. The list of possible problems that PDE can detect are found on the Plug-ins tab of the Plug-in Development > Compilers preference page, where the level for each problem can be set to one of 'Ignore', 'Error', or 'Warning'. |
|
|
Plug-in search | PDE contributes a tab to the Search dialog, where you can search for plug-ins, fragments, extension points and extensions. Scope of search can extend beyond the workspace to external plug-ins and fragments. |
|
|
Compute dependency extent | PDE can now easily determine the reason why your plug-in depends on plug-in X. Through the function Compute Dependency Extent found in the context menu of the Dependencies page of the manifest editor, PDE will find and display all the Java types and extension points provided by plug-in X to your plug-in. This is a good tool to determine the extent to which you need this plug-in, and it might help you refactor your plug-ins. Also, it would help you check if you are using any internal (non-API) types of plug-in X, which might be undesirable. |
|
|
Find unused dependencies | This function is available through the context menu of the Dependencies page of the manifest editor. It will find all the plug-ins listed as dependencies for your plug-in, but need to be removed because they are unused by your plug-in. The removal of such stale dependencies will help minimize your plug-in's list of dependencies and hence improve performance. |
|
|
Dependencies view | PDE now provides a Dependencies view, which can be invoked by selecting a plugin.xml/fragment.xml file and choosing Open dependencies from the context menu. It will display a tree showing all the plug-ins needed to be activated before you plug-in is activated. |
|
|
Extending Java search scope | Java search scope is limited to workspace projects and the external libraries they reference. In order to add arbitrary plug-in libraries to the search scope, go to the Plug-ins view. Select the external projects of choice and choose Add to Java Search from the context menu. |
|