Eclipse 3.2 - New and Noteworthy

And can immense mortality but throw
So small a shade, and Heaven's high human scheme
Be hemmed within the coasts yon arc implies?
- Thomas Hardy, At a Lunar Eclipse

With the consistency of planets and moons, each year heralds a new release of the Eclipse platform. This year nine other Eclipse projects and countless community plug-ins join in the party as part of the Callisto release train. Here are some of the more noteworthy things available in the Eclipse 3.2 release now available for download from the eclipse.org downloads page.

Platform

Project Explorer view

A new Project Explorer view has been added. This view presents a domain-oriented view of the projects in the workspace. General projects are shown in the same way as the Navigator view, but other projects are presented in a hierarchy that makes sense for their particular domain. For example, Java projects appear as a hierarchy of source folders and packages rather than folders.

Picture showing the project explorer view

History view

There is now a generic History view in Eclipse. This view combines history from repositories such as CVS with content in the Eclipse local history.
  1. The view can show the history for any selected element and not just files.
  2. When in Link mode, the view links to editor and view selection and updates the contents in the background to avoid blocking the UI.
  3. Pinning the view will cause it to lock on to the current history being displayed. Another History view will be opened if the history is requested for another file or object.
  4. The CVS History page includes the local history of files. Toolbar buttons can be used to control whether local, remote, or both histories should be visible.
  5. CVS Compare with and Replace with Revision operations all populate the History view. Actions have been added to the CVS History page to launch comparisons and replace contents.

Picture showing the History view

Improved help in dialogs

Most dialogs in Eclipse now have a standard help button on the bottom left corner. This button summons context help, same as pressing F1 (on Windows). In addition, the help content will now appear in the same dialog in the dialog's tray instead of in a separate window. Cheat sheets can also follow you into dialogs (in the tray) for those steps that involve opening dialogs.

Picture showing improved help

Window-level working set selection

The notion of window-level working set selection has been introduced. By default, there is a "Working Sets" action in the window tool bar that allows you to select an arbitrary selection of working sets.

Picture showing window-level working sets

Any view that is set to use the "Window Working Set" (via the traditional selection dialog) will show the contents of all selected working sets.

Linked resources anywhere

You can now create linked resources at any depth within your projects. This allows you to put resources from different places in the file system anywhere you like in the project structure, including below other linked resources.

Picture showing linked resources

Mac OS X on X86/Intel

The Eclipse launcher and native libraries have been compiled as universal binaries so that you can run Eclipse on Mac OS X X86/Intel platforms using the Mac OS X (Mac/Carbon) downloads.

Problems, Tasks and Bookmarks view supports multiple filters

It is now possible to define more than one filter on the Problems, Tasks, and Bookmarks views. These filters are additive so the view will show the union of the markers that satisfy these filters.

You can add, remove, enable, or disable filters as desired.

Picture showing multiple filters

Draggable window trim

The window 'trim' (that is, Status Line, Heap Status, Fast View Bar...) can now be repositioned around the workbench window. Each trim element has its own grab handle that you can either click and drag to move the trim or right-click to get a context menu.

Picture showing draggable window trim

Integrated progress on startup

Startup progress is now integrated directly into the splash screen.

Picture of the startup progress in the splash screen

Pervasive filtering support

Support for filtering content based on provided filter text is now supported in several places. This now appears in the Import, Export, and New wizards, and in the Show View dialog. This is the same feature that already exists in the Preferences and Show View dialogs.

Picture showing unfiltered Show view dialog  Picture showing filtered Show view dialog

Import Existing Projects with copy

The Import Existing Projects into Workspace wizard now provides the option to copy a project's files into the current workspace location when importing from a directory. The original behavior is still maintained simply by ensuring the Copy projects into workspace option is not checked.

Picture showing copying a project's files

Alternative file systems

Projects and linked resources can now be created with file systems other than the local file system.

Picture showing a non-local file system

Problems can be grouped

Problems in the Problems view can now be grouped by severity, type, or other criteria provided by plug-ins.

Picture showing problem grouping

Multiple problems can be fixed at once

The Problems view now allows you to add other problems that have the same potential resolution so that you may fix many at once.

Picture showing multiple problems being fixed at once

Close unrelated projects

A new command, Close Unrelated Projects, is available in the context menu when a project is selected. This command is a great way to focus your workspace on what you are working on right now, eliminating the clutter and overhead of any unrelated projects in the workspace.

Picture showing the closing of unrelated projects

Direct text search action

Select text in an editor and invoke Search > Text > Workspace (Ctrl+Alt+G) to search in all (non-binary) files.

Live news in the Eclipse SDK Welcome

The What's New section of Welcome now has Live News. The content is provided by the Eclipse.org RSS news feed (requires internet connection). You can click on the links to see the full story.

Picture showing RSS in the Welcome

Animated message area for displaying errors and warnings

A new animated message area has been added to better draw your attention to potential problems. The animated tray will slide up from the bottom of a page's title area to cover the page description and will be used to convey error and warning messages. This is used in both wizards and the preference dialog.

Picture showing animated messages

System Default theme

The System Default theme is a theme that uses fonts and colors available from the operating system rather than those defined by Eclipse.

This theme is the default theme for High Contrast mode. You will be prompted to restart when switching to High Contrast mode and the theme change will be applied then.

Picture showing a theme from the operating system

Tooltips for annotations in text editors

Annotation hovering that was previously only available in Java editors is now available in all text editors.

Picture of annotation tooltip

Annotation navigation in text editors

Annotation navigation is now available in all text editors.

Picture of navigation icons

Commit comment templates

You can specify templates for commit comments via the Team > CVS > Comment Templates preference page. The templates will appear in the commit dialog off the history drop down menu.

Improved patching support

Improvements have been made to the CVS Create Patch wizard.

Picture showing patch-creation improvements

Improvements to create patch include:

  • The ability to create a patch that contains changes from multiple projects (this uses an Eclipse specific patch format)
  • The ability to save the patch to the clipboard, workspace or file-system.
  • The ability to exclude files from the patch

Changes have been made to the Apply Patch wizard to accommodate multi-project patches.

Improved conflict handling for CVS Team>Update operation

When performing an update, CVS has a file based markup for indicating conflicts. This markup can be cumbersome to work with. When performing a Team>Update, Eclipse will now update any non-conflicting files and then show any conflicts in the synchronize view. You can then resolve the conflicts manually from there.

CVS shows model content in synchronizations

CVS can now be configured to include model content in synchronizations by enabling the associated option on the Team > CVS > Synchronize/Compare preference page.

Picture showing the Synchronize/Compare preference page

CVS Quick Diff annotations

CVS now supports Quick Diff annotations for local files. Perform a Team > Show Annotations on a local file and you will see color-based annotations of who did what in the file. The bar on the left hand side shows a different color for each user. Hovering over a section shows the details of that revision and highlights the sections of code contributed by that revision in the right hand bar.

Picture of CVS Annotate in editor

Java problem markers from a "javac" build

Running an Ant build that contains a "javac" declaration can produce JDT problem markers for the code that is compiled. The marker generation is controlled by an Ant UI preference: Window > Preferences > Ant > Create problem markers from "javac" results. As well, the "javac" declaration needs to set the "listfiles" attribute to "true" and an Eclipse console must be allocated for the build output.

Breakpoint import and export

Breakpoints can now be exported to a file. The export wizard lets you select the breakpoints to export together; the import wizard lets you optionally create a breakpoint working set.

Picture showing Breakpoint import/export

Launch dialog improvements

A toolbar and name filter have been added to the launch dialog. The toolbar provides actions to create, duplicate, delete, and collapse all configurations, as well as manage the filters for the dialog. The name filter dynamically filters entries in the dialog as you type to show only those configurations matching the entered text, similar to the preferences dialog. You can also filter configurations from closed, deleted, or unavailable projects, or filter out specific kinds of configurations.

Picture of the launch dialog

Variable columns

Variables can be displayed using columns or a standard tree. To toggle columns on/off use the view menu's Layout > Show Columns action. You can select the columns to be displayed using the Layout > Select Columns action. Recently changed variables are displayed with a yellow background (controlled by the "Changed value background color" user preference via the Run/Debug preference page). The Java debugger supports editing of Strings and primitive values inline.

Picture showing variables in columns

Java development tools

Introduce Indirection refactoring

Introduce Indirection is a new refactoring that lets you redirect all callers of a method to a new method. The new method calls the original one. You can replace the default implementation of the new method by any other if you like.

Such an indirection is useful when new behavior needs to be introduced to a method but:

  • The method cannot be changed because it is from a library.
  • The method must not be changed because it is an API method.

Use the indirection for bug fixes to the original method or as a quick way to add code before or after all calls to a method.

To execute the Introduce Indirection refactoring select a method, invoke Refactor > Introduce Indirection..., provide a name and the declaring class for the new method.

Introduce Indirection dialog

The method is added to the selected declaring class.

Introduce Indirection preview with updated reference

And all references are updated to call the new method.

Result after Introduce Indirection

Extract Superclass refactoring

A new refactoring called Extract Superclass extracts a common superclass from a set of sibling types. The selected sibling types become direct subclasses of the extracted superclass after applying the refactoring. Moreover, Extract Superclass allows to use the extracted superclass wherever possible in the code.

JavaEditorTests and PropertiesEditorTests are the sibling types in the following example. The first picture shows the type hierarchy before the refactoring.

Hierarchy before extracting EditorTests

The next picture shows the type hierarchy after extracting EditorTests with the Extract Superclass refactoring.

Hierarchy after extracting EditorTests

To invoke this refactoring, use Refactor > Extract Superclass....

Clean Up wizard

Clean Up can be invoked on any number of Java source files, packages or on a whole Java project. It helps to:

  • fixing multiple problems at once
  • bring code to use a preferred code style

Here are some examples what can be done:

  • force curly brackets (blocks) to be used for every 'if', 'while' or 'for' body
  • qualify all field accesses with 'this'
  • use 'final' where possible

To bring Java 1.4 compatible code to 5.0 use Clean Up to:

  • convert all for loops to enhanced for loops where possible
  • mark all overriding methods with @Override annotations

Cleanup wizard

Select a project, package, or file and use Source > Clean Up... to start this wizard.

Refactoring history

Most of the refactorings offered by JDT are now tracked in a Refactoring History. The refactoring infrastructure stores detailed information about refactorings which have been performed on your workspace.

The refactoring history can be browsed and edited using Refactor > History...

Refactoring history dialog

Create and apply refactoring scripts

Refactorings performed on your local workspace can now be exported into a Refactoring Script and replayed on an arbitrary workspace.

Such refactoring scripts can be used in different scenarios such as automatic fixing of breaking API changes between software layers or providing patches with rich semantics.

Create a refactoring script from the refactoring history using Refactor > Create Script...

Create Script action

To apply the generated refactoring script on an arbitrary workspace use Refactor > Apply Script...

A new extension point allows plug-in writers to contribute refactoring scripting support for new or already existing refactorings. See the org.eclipse.ltk.core.refactoring.refactoringContributions extension point for details.

JAR file export with refactorings

When exporting a JAR file from the workspace, the JAR Export Wizard offers the option to include refactoring information into the JAR file.

Use File > Export... and select JAR file. On the first page of the JAR Export Wizard, select Export refactorings for checked projects. Click on the link to select the refactorings to include.

JAR export refactoring selection

Clients are then able to migrate an old version of the JAR file to a new one using the Refactor > Migrate JAR File... refactoring. Alternatively, you can also use Build Path > Migrate JAR File... if a JAR file is currently selected.

Migrate JAR File Action

This refactoring automatically updates all code which is dependent on the old version of the JAR file to use the new version of the JAR file.

API aware refactorings

There are a number of existing refactorings which have been extended to support API compatibility by keeping the original member as a delegate to the refactored member:

  • Rename Method
  • Rename Field (for constants only)
  • Move Method
  • Introduce Parameter
  • Change Signature

Checkbox for 'Keep original member as delegate to refactored member'

The generation of a delegate member to preserve API compatibility can be enabled by checking Keep original method as delegate to renamed method in the refactoring dialog.

Rename Type updates similarly named elements

The Rename Type refactoring can now rename variables and methods with names similar to the renamed type. This feature helps to keep method and variable names synchronized with type names.

Update Similar Declarations UI

To invoke this refactoring, select a type and use Refactor > Rename...

Rename Package refactoring renames subpackages

The Rename Package refactoring does now also rename subpackages on request.

Rename Package dialog with new checkbox

In this example, junit.samples.money is renamed to junit.examples.money.

To invoke this refactoring, select a package and use Refactor > Rename...

Filter the refactoring preview

The refactoring preview page now supports filtering of changes. This is especially helpful when updating textual matches in comments and strings is requested while renaming Java elements.

Filtered refactoring preview page

The screen shot shows the rename dialog filtered for textual matches while renaming the class TestCase to TestCasee.

Changes related to the visibility of Java elements can now be filtered as well.

Customizable content assist

Repeatedly invoking content assist (Ctrl+Space on most platforms) now cycles through different proposal categories.

You can assign separate key shortcuts to your favorite proposal categories and use the Java > Editor > Content Assist > Advanced preference page to configure which categories are shown in the default content assist popup.

Content assist popup with Java proposals; repeated invocation brings up template proposals

The new org.eclipse.jdt.ui.javaCompletionProposalComputer extension point allows plug-in writers to contribute completion proposals and categories to the content assist process of the Java editor.

Camel case support in code completion

Code completion now supports camel case patterns. For example, completing on NPE will propose NullPointerException. This support can be disabled using the Show camel case matches preference on the Java > Editor > Content Assist preference page.

Java editor completing on NPE

Quick menu to surround code

The new Surround With quick menu allows to surround a selection of lines with code. The menu is extendable with custom templates. The templates are now aware of variables that need to be pulled out or made final.

Surround with runnable code transformation

Use Source > Surround With or press Alt+Shift+Z to directly see the menu.

You can add your custom templates on the Java > Editor > Templates preference page. All the template needs is a ${line_selection} variable.

New quick fixes

Several new quick fixes have been added, for example:

  • fix raw type accesses

    Raw access correction proposal

    The quick fix gleans information from usages within the same file. For a more sophisticated analysis, use the Infer Generic Type Arguments refactoring.

  • add missing annotation attribute

    Quick fix for missing annotation attribute

  • add a new annotation member

    Quick fix for new annotation member

Category support

Categories can be defined in Javadoc comments for types, methods, and fields using the @category tag.

Code using categories

Categories are shown in the Outline and Members views and in the Quick Outline. The view menu allows to select the visible categories.

Outline showing categories and category filters

Java SE 6.0 compliance

The Java SE 6.0 compliance is now fully supported. In particular, StackMapTable attributes (see JSR 202) are now generated in .class files with a 1.6 target.

Setting 6.0 compliance

Null reference analysis

The Java compiler is now capable to perform basic null reference analysis for local variables.

This optional diagnosis can be enabled on the Java > Compiler > Errors/Warnings preference page using the Potential programming problems > Null reference preference.

Java editor with null ref warning

Note that the analysis is fairly conservative, aligned on definite assignment rules. It only considers cases where there is something suspicious (e.g., if later on a null check is performed), rather than complaining on all possible cases.

In 5.0 compliance mode, null reference warnings can be silenced using @SuppressWarnings("null").

Improved syntax recovery

The internal Java parser is now much more resilient to syntax errors. In Eclipse 3.1, a syntax error would prevent subsequent errors from being displayed. The parser can now recover from statements with errors and go on to perform further analyzes.

In the following example, the invalid reference to method bar() is detected despite the missing semicolon in the previous statement.

Java editor with syntax recovery

This for example allows refactorings that only affect a single file to tolerate syntax errors. For instance, it is now possible to rename or extract a local variable at the top of a method that has not yet been written completely.

Extract local variable in incomplete method

Treat configurable errors as non fatal

The option Treat configurable errors as fatal errors on the Java > Compiler > Building preference page controls if a configurable error is intended to be fatal or not. This option is enabled by default.

If this option is disabled, then the compiled code can be executed despite the fact that errors exist in the code.

Detection of unnecessary $NON-NLS$ tags

Unnecessary $NON-NLS$ tags are now detected. A problem is reported if a line comment starts with //$NON-NLS-x$ and no corresponding string exists on the same line.

The reporting can be turned on and off using the same preference as for the detection of non-externalized Strings. It can be set on the Java > Compiler > Errors/Warnings preference page using the Code Style > Non-externalized strings (missing/unused $NON-NLS tags) preference.

Java editor with unnecessary NLS tag

To remove the unnecessary tags use Quick Fix (Ctrl+1), or Ctrl+1, Ctrl+Enter to remove all unnecessary tags within a compilation unit.

Detection of raw type usage

Usages of raw types are now detected. A raw type is a reference to some generic type without any type argument (e.g. List in place of List<Element>).

This optional diagnosis can be enabled independently from unchecked type operations on the Java > Compiler > Errors/Warnings preference page using the Generic types > Usage of a raw type preference.

Java editor with usage of a raw type

This warning can be silenced by adding @SuppressWarnings("unchecked").

Also a Quick Fix has been implemented to help resolving the raw type usage problem.

Detection of method parameter assignments

Assigning to method parameters is considered poor practice.

To detect and report such assignments, open the Java > Compiler > Errors/Warnings preference page and enable the Code style > Parameter assignment preference.

Java editor with parameter assigment warning

Detection of switch case fall through

The Java compiler can now detect if a case may be entered by falling through a previous case. Empty cases are allowed.

This optional diagnosis can be enabled on the Java > Compiler > Errors/Warnings preference page using the Potential programming problems > Switch case fall through preference.

Java editor with fall through warning

A quick fix to add a break statement to the previous case has been implemented.

Improved performance for large .jar files

The size limit of the internal Java model cache is now a function of the max heap size (-Xmx VM argument on most JVMs) given to the Java Virtual Machine running the Eclipse IDE.

Raising the heap size has a noticeable performance improvement when there are large .jar files on the build classpath.

Recreating modified .class files

The Java builder can now recreate modified or removed .class files in the output folder using the original source.

This can be controlled on the Java > Compiler > Building preference page using the Output folder > Rebuild class files modified by others preference.

Javadoc view and tool tips from attached Javadoc

The Javadoc view and the Javadoc hovers now extract the information from the attached Javadoc for libraries that do not have source attached.

JUnit 4 support

The JUnit support has been updated to run and write JUnit 4 tests. Check out www.junit.org for more about JUnit 4.

  • use the New JUnit Test Case wizard to generate a JUnit 4 test class:
    JUnit 4 support in the New Test Case wizard
  • use the provided JUnit library to add to the build path
    Add JUnit 4 library with quick fix
  • launch JUnit 4 tests as usual with Run As JUnit
  • ignore tests by tagging them with @Ignore

JUnit view history

The JUnit view can now handle multiple concurrent test runs. You can switch between active and recent test runs using the new history. Tests can be rerun from the history without stopping already running tests.

JUnit History

This works with JUnit 3 as well as with JUnit 4.

Execution environments

An execution environment describes the capabilities of a runtime - for example, J2SE-1.4. You can specify JREs used for running, debugging and building based by referencing an execution environment. The new Java > Installed JREs > Execution Environments preference page displays the JREs installed in your workspace compatible with each execution environment. JREs that meet the exact requirements of an execution environment are displayed in bold, and JREs that surpass the requirements of an environment are displayed in the default font. When more than one JRE is compatible with an execution environment, you can select a default JRE to use for that environment by checking it.

Execution Environment preference page

A build path or launch configuration referencing an execution environment is more portable than one referencing an explicit JRE as a JRE's execution environment can be resolved independent of its name. Use the JRE tab or Edit Library wizard to specify an execution environment for running and building.

JRE tab in launch configuration dialog

System property launch variable

A new launch variable allows to dynamically specify system properties as Java program and VM arguments from the Eclipse runtime. The variable accepts a single argument which is the name of the system property to be resolved at launch time.

For example, the java.home system property would be referenced with ${system_property:java.home}.

Arguments tab in launch configuration dialog

Evaluation support for arrays

Evaluation and content assist are now supported for Java arrays. Use this to refer to the selected array.

Code assist in variables view

Java thread groups

You can now display thread groups in the Debug View by toggling Show Thread Groups in the view menu.

Enabling thread groups in the debug view

Runtime classpath exported entries

A runtime classpath can be configured to include only exported entries from the build path. By default, a runtime classpath includes all entries (exported and non-exported).

From the Classpath tab select the default entry and use the Edit... button to configure the option.

Claspath tab in launch configuration dialog

Edit Runtime Classpath dialog

Suspend Thread versus Suspend VM

An option has been added to the Java > Debug preference page to control whether newly-created breakpoints suspend a single thread or the entire VM.

Debug preference page

Java type indicator

Enable the Java Type Indicator on the General > Appearance > Label Decoration preference page to find out what the first type in a compilation unit or class file is. An adornment is shown for interfaces, annotations, and enums, while an ordinary class stays undecorated.

Type Indicator label decorator

Find broken externalized strings

A new action can search for broken externalized strings. The search reports missing, unused and duplicate keys.

Find Broken Externalized Strings action

To start the search select a properties file, a package, or a whole project and use Source > Find Broken Externalized Strings

Improved support for Eclipse's string externalization mechanism

The Eclipse string externalization mechanism has now the same kind of support as traditional string externalization. The associated externalized value is shown in a hover, when you linger over a key for an externalized string in the Java editor.

NLS hover

Ctrl+Click on the key to navigate directly to the entry in the corresponding properties file. In the properties file editor you can use Ctrl+Click to find out where the key is used in the code.

Create a type from an example snippet

You can paste a snippet of code containing a Java type directly into a package or source folder to create a new compilation unit. For example select and copy this source code
package pack;
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}
then select a source folder in the Package Explorer use Ctrl+V (Edit > Paste). This automatically creates a new package 'pack' and file 'HelloWorld.java' with the copied content.

Generate hashCode() and equals()

A new action can be used to generate the methods hashCode() and equals(). You can select the fields on which the implementation should be based.

Generate hash and equals wizard

To invoke this action select a type and use Source > Generate hashCode() and equals()...

Command line code formatter

It is now possible to format source code without starting the Eclipse UI using the new headless formatter application. The command line formatter works as a standard Eclipse application.

The following command will format the source files in the folder src with the options specified in the config.prefs file:

eclipse -application org.eclipse.jdt.core.JavaCodeFormatter -config d:/config.prefs c:/src

See Using the Formatter Application for details.

Support for Java-like extensions

Files with a file extension other than .java and containing pure Java code are now supported. A Java-like extension can be added using the General > Content Types preference page (type Text > Java Source File).

Package explorer with 'Y.abc' as compilation unit

Platform API

Runtime refactoring

In order to make the Eclipse runtime more flexible and allow independent use of runtime components, the org.eclipse.core.runtime plug-in has been split into several plug-ins:

  • org.eclipse.equinox.common - common code used by more than one piece of the former runtime plug-in (i.e. IPath, IStatus, IProgressMonitor).
  • org.eclipse.equinox.registry - Extension registry
  • org.eclipse.equinox.preferences - Preferences mechanism
  • org.eclipse.core.jobs - Jobs mechanism
  • org.eclipse.core.contenttype - Content mechanism
  • org.eclipse.equinox.supplement - A supplemental "plug-in" that is used to support running without OSGi.

New APIs were added to facilitate control of the split runtime pieces.

The runtime refactoring should be transparent to other plug-ins. For more details, see the Eclipse 3.2 migration guide.

Common navigator

A new plug-in, org.eclipse.ui.navigator, introduces a framework for building viewers that combine content from multiple domain models. The framework allows declarative contribution of content, labels, actions, filters, and other capabilities. The org.eclipse.ui.navigator.resources plug-in provides a concrete use of this framework in the form of a Project Explorer view, and declarative viewer extensions for the IResource model.

Picture showing the project explorer view

Tabbed properties framework

A tabbed properties framework has been added. The tabbed properties framework provides a replacement property sheet page, allowing properties to be shown in the Properties view using arbitrary controls, organized by tabs and sections that are contributed via the extension registry.

Picture showing a tabbed properties framework

See the article The Eclipse Tabbed Properties View for details.

File system API

A new plug-in, org.eclipse.core.filesystem, introduces a new generic API for interacting with file systems. The platform has been migrated to use this file system API rather than java.io APIs. This means resources can be created in arbitrary backing file systems, and plug-ins can provide support new kinds of file systems.

Support has been added to the project and linked resource wizards for creating resources that are linked to other file systems. Plug-ins that define alternate file systems can hook into this wizard support by using the org.eclipse.ui.ide.filesystemSupport extension point.

Picture showing a non-local file system

Categorization added to Import and Export

The org.eclipse.ui.importWizards and org.eclipse.ui.exportWizards extension points now support categorization.

Picture showing extension points

Tooltips for annotations in Text editors

Annotation hovering has been pushed down from JDT Text to Platform Text. Text, vertical and overview ruler hover support is installed by TextSourceViewerConfiguration which is used by text editors:

Picture of annotation tooltip

Annotation navigation in Text editors

Annotation navigation has been pushed down from JDT Text to Platform Text and is now available in all text editors:

Picture of navigation icons

JFace field assistance

JFace introduces new support for assisting the user in completing fields inside dialogs and forms. The org.eclipse.jface.fieldassist package provides classes that let you decorate arbitrary controls with images and corresponding hover text. These can be used for purposes such as marking required fields in a dialog, showing field-based error conditions, or showing content-assist prompts. The package also allows you to install content proposals on a control, including a pop-up dialog with content proposals, secondary pop-ups for further information, and options for invoking proposals explicitly or in an automatic (type-ahead) style.

Picture showing field assistance

JFace TreeViewer enhancements

AbstractTreeViewer now supports multiple equal elements in the tree, each with a different parent chain. This support requires that clients enable the element map by calling setUseHashLookup(true).

TreeViewer now supports SWT.VIRTUAL trees. There is a corresponding lazy content provider ILazyTreeContentProvider that only returns contents as they are needed.

Support for dynamic Help content

Help system now supports dynamic composition of help content. Topics authored in XHMTL can contain additional Eclipse-specific markup for on-the-fly filtering of content based on os/ws/arch values, presence of plug-ins, enabled capabilities, etc. Shared content can be included into multiple documents. Finally, plug-ins can contribute XHTML fragments that plug into anchors in other documents. All this now enables information developers to provide dynamic documents that tailor themselves to the context at the time of viewing.

Help search enhancements

User assistance indexing and searching has been enhanced in various ways. Additional search participants can be registered via extension point that can add content to the Lucene index. Help now contributes an XHTML search participant that can index dynamic help documents authored in XHMTL (see above). In addition, documents that were previously not in the index will now appear (for example, cheat sheets and Welcome pages). Search hits can now have different icons and the 'open' action can be delegated to the search engine.

Picture showing Search enhancements

Problems can be grouped

Problems in the Problems view can now be grouped. There are default groupings by severity and problem type, and additional groups can be defined via the org.eclipse.ui.ide.markerSupport extension point.

Improved help in dialogs

Most dialogs in Eclipse now have a standard help button on the bottom left corner. This button summons context help, same as pressing F1 (on Windows). In addition, the help content will now appear in the dialog's tray instead of in a separate window. Custom dialogs can inherit this functionality by subclassing the new TrayDialog class rather than Dialog. Cheat sheets can also follow you into dialogs (in the tray) for those steps that involve opening dialogs.

Embed command links in User Assistance content

Links in Help, cheat sheets, and Introduction content can now execute commands when activated by the user. Command links can be used to open preference pages, launch wizards, show views, open perspectives and for many other purposes. The command framework is extensible so many more uses of command links are possible. The Workbench User Guide has been enhanced with command links in many places. The picture below shows two command links in a help topic:

Command links in help topic

Support for launching commands from cheat sheets

Commands can now be launched from cheat sheets. The content file below contains commands to open the Search view and Package Explorer.
<?xml version="1.0" encoding="UTF-8"?>
<cheatsheet title="Example of Commands in a Cheat Sheet">
  <intro>

    <description>A cheat sheet shows the 
			package explorer</description>
  </intro>
  <item title="Show Search View">
     <description>This is a step with a command 
		which shows the search view.</description>

     <command serialization=
		"org.eclipse.search.ui.views.SearchView"/>  
  </item>
  <item title="Step 2">
    <description>This is a step with a command and 
		parameters, shows package explorer.</description>

     <command serialization="org.eclipse.ui.views.showView(
		org.eclipse.ui.views.showView.viewId=
		org.eclipse.jdt.ui.PackageExplorer)"/> 
     <onCompletion>
         Command example completed.
     </onCompletion>
  </item>
</cheatsheet>

Composite cheat sheets

Composite cheat sheets are new for Eclipse 3.2. A composite cheat sheet provides guidance for a large problem by dividing it into smaller tasks each of which has its own cheat sheet. Tasks can be organized into groups. Composite cheat sheets open in the cheat sheet view and are launched using the cheat sheet selection dialog. Each task has a description, hyperlinks direct the user through a sequence of tasks.

Picture showing a composite cheatsheet

Composite cheat sheets have a tree which shows the tasks and their status. The right hand/lower panel contains the individual tasks.

Picture showing a composite cheatsheet

The content of a composite cheat sheets is defined in an XML file. The content file can specify what dependencies exist between tasks so that a task can only be started after any prerequisite tasks have been completed.

Help keyword index

Help now has a keyword index, where you can register keywords from your documentation and supply a link to an appropriate help document. The index is available in both the Help view and Help window (view shown below).

Picture showing the Help view

XHTML help docs conversion tool

PDE has a new utility to quickly convert a plug-in's HTML help documents to XHTML. In addition to converting the HTML to valid XHTML, the tool will update the filename extension, the table of contents, and add the necessary bindings to enable dynamic content and searching of the XHTML content. After this conversion, users can take advantage of the new 3.2 Help features such as dynamic content filtering, content reuse, and dynamic content contribution that all require XHTML as the content format.

This function can be invoked via PDE Tools > Convert Help files to XHTML from the context menu of plug-in projects.

Picture showing the XHTML conversion tool

Universal welcome

Based on our experience with concrete Welcome implementations, we now offer a configurable Universal Welcome to be used by any product. Products can choose between 7 predefined main sections: Overview, First Steps, Tutorials, Samples, What's New, Web Resources, and Migrate (Eclipse SDK uses 4 of them). Universal Welcome has configurable page layouts and importance levels for each contribution, and is fully theme-aware. It also offers both HTML and SWT presentations for 100% platform coverage.

A Welcome preference page provided by Universal Welcome opens up Welcome customization to the end users, and can be included in any product that wants to offer it. You can read more about this in the Universal Welcome specification.

Picture showing the Universal Welcome

Support for configuration and themes in Welcome

The Intro framework has more configurability support. An intro configurer can be contributed that offers one-time computation of the group children, variable substitution support, and late anchor path resolution. This support is heavily used by Universal Welcome but can also be used by other Welcome implementations.

Themes represent named collections of CSS files, properties, and images that collectively define the look of the Welcome content. Universal Welcome takes advantage of this support by providing theme selection capability and two concrete themes in 3.2: 'Circles' and 'Purple Mesh'.

Picture showing themes in Welcome

Namespace support for the Ant extension points

The org.eclipse.ant.core antTasks and antTypes extension points now allow for the designation of a URI that the definition should live in. See bug 133190 for full details of all the changes.

Team support for logical model integration

API has been added that allows logical models to participate in Team operation. With this API, Team providers can:
  • Consult models to ensure all required resources are included in a Team operation.
  • Use model semantics to aid in resolving merge conflicts.
  • Allow models to participate in the display of resources during Team Operations

Synchronization with Java and Resource models

Sort indicator in tables and trees

Table and Tree now support a sort direction indicator in the header of the column.

Picture showing a sort direction indicator

SWT snippets showing sorting by column (simple) and sorting by column (virtual table).

Reorderable columns in trees

In Eclipse 3.1, we added the ability to reorder columns in a Table. That support has now been added to Tree.

The display order of columns in a tree can be changed by dragging the column header, or it can be set programmatically.

Picture showing reorderable columns

Example snippet.

Improved XP theme support

On Windows XP, SWT now shows the textured background in tab folders. The groups, labels, check boxes, etc. are all transparent to this background. Also, custom widgets, such as StyledText, now show the correct border for the prevailing Windows XP theme.

Picture showing XP theme support

See the SWT FAQ for instructions on how to run with a Windows XP skin.

Animated GIFs

Animated GIF images can be saved to file.

Picture showing animated GIF support

For an example see the SWT snippet.

Desktop appearance notification

When appearance settings such as theme, font, or default colors are changed for the desktop, an SWT.Settings event is issued for the Display.

Picture showing a desktop appearance notification

Dispose notification

Previously, when an SWT.Dispose event was received for a parent composite, all the children were disposed and therefore could not be referenced. For 3.2, the Dispose event is received before the children have been released in the OS.

Tool tips for columns

Tooltip text can be set on a table or tree column header using TableColumn/TreeColumn.setTooltipText(String).

Vertical CoolBar

A vertical coolbar can be created by using the SWT.VERTICAL style.

Picture showing a vertical CoolBar

OpenGL support

You can now use OpenGL in SWT applications. The OpenGL interface works with third-party OpenGL libraries such as LWJGL.

Picture showing an OpenGL example

For examples, see the SWT snippets

Virtual tree

Tree now supports the SWT.VIRTUAL style. This allows you to create trees with large amounts of data quickly. When TreeItems are needed, they are created on-demand.

For an example see the SWT snippet.

Buttons with image and text

Buttons can now show an image as well as text. This feature is supported on Windows XP, Mac OS X, and GTK.

Picture showing a button with an image

HIView on Mac OS X

SWT now makes use of HIView on Mac OS X. This resolves many clipping and sizing issues.

Embedding objects in text

Using TextLayout and StyledText, it is now possible to embed objects such as images or widgets inside text. Glyph metrics such as ascent, descent and width can be specified. Objects wrap with the text.

Picture showing an image embedded in text

For examples, see the following snippets:

Indent, align and justify text

TextLayout and StyledText now support indenting, justifying, and aligning text.

Picture showing StyledText being aligned

For examples, see the following snippets:

Text baseline rise

Using TextLayout and TextStyle, it is now possible to specify the baseline rise for a range of text.

Picture showing text being given a baseline rise

For an example see the SWT snippet.

HSB color support

A color can be created by specifying the hue, saturation, and brightness. In addition, for a given color, the hue, saturation, and brightness values can be queried.

Picture showing HSB support

For an example, see the SWT snippet

Background image

A background image can be set into a control. In addition, the background can be inherited by child widgets such as labels.

Picture showing a background image in a control

For an example, see the SWT snippet

Native image loading

The constructor Image(Device device, String filename) will now load images using native operating system calls. This has improved performance of image loading and increased the maximum size of image that can be loaded.

Dragging text

If the SWT.DragDetect event is hooked on Text or StyledText, the selection will not be cleared when the user drags from within a selected range of text. This makes it possible to support dragging from the Text and StyledText widgets.

For an example, see this SWT snippet

New ExpandBar widget

The ExpandBar widget allows the user to show and hide collections of widgets by clicking on a header. The ExpandBar contains multiple items which each may have an image and title in the header.

Picture showing widgets being hidden

For an example, see this SWT snippet.

Bullets in StyledText

StyledText can now show lists formatted in a variety of styles, including bullets, numbered, upper case or lower case letters, and custom-defined styles.

Picture showing bullets in StyledText

For an example, see this SWT snippet.

Custom draw Tree

The Tree widget now supports custom draw for individual cells. Applications can enhance the native look and feel of the tree by custom rendering of the data. The application has control over row height so multiple lines of text can be drawn. In addition, it can present multiple images in the same cell, change font or color multiple times, and change the way selections are drawn.

Picture showing custom draw for individual tree cells

For examples, see the following snippets:

Custom draw Table

The Table widget now supports custom draw for individual cells. While still maintaining the native look and feel of the table, users can customize how cells are drawn to display data in a form other than text with an image, to show multiple lines of text in one cell, to change font and color multiple times within the same cell, to override the native selection drawing, etc.

Picture showing custom draw for individual table cells

For examples, see the following snippets:

Drag over effects for Table and Tree

The Table and Tree widgets now provide visual feedback of what is being dragged.

Picture showing drag feedback

New Tooltip class

The new ToolTip class can be used to display tooltips that are not directly tied to a Control. These tooltips can be placed anywhere, and can have either the platform default appearance or a BALLOON appearance as shown below.

Picture showing tooltip with style BALLOON

Plug-in Development Environment

Target definitions

You can now define a target in a .target file (File > New > Other... > Plug-in Development > Target Definition).

The .target file defines all aspects of a target including name, location, content (in terms of plug-ins, features, or both) and JRE.

More notably, you can specify and manage multiple plug-in sites in the target without the need for .link files.

The Plug-in Development > Target Platform preference page lets you browse, preview and apply existing target definitions.

target editor

Contributing targets

Targets can be contributed to an Eclipse product via the org.eclipse.pde.core.targets extension point.

The Eclipse SDK comes with two RCP-centric org.eclipse.pde.core.targets extensions, allowing you to easily switch the target platform back and forth between the SDK and the RCP subset.

predefined targets

Hierarchical view of plug-ins

The plug-ins on the Plug-in Development > Target Platform preference page can now be grouped by sites. This hierarchical view makes the management of large and distributed targets much easier.

target hierarchy

Plug-ins for any OSGi framework

The New Plug-in Project creation wizard (File > New > Project...> Plug-in Project) now provides the option to create plug-ins that can run with any OSGi framework.  A Hello OSGi template is also provided.

equinox

Equinox OSGi framework launcher

A new launcher is now available to run and debug bundles with the Equinox OSGi framework. You will be able to set the start level of your bundles and customize program and VM arguments to test your bundles under different conditions.

An Equinox OSGi framework launch configuration can be created in the Launch Configuration dialog (Run > Run... from the top level menu).

equinox launcher

Plug-in manifest files participate in refactoring

When you move or rename a Java type or package in your plug-in, PDE now automatically updates all references to these types and packages in the manifest files of the affected plug-ins.

NLS wizard for plug-in manifest files

PDE now provides a wizard to extract translatable strings from plug-in manifest files and store them in a properties files for multi-language support.

The wizard is available via PDE Tools > Externalize Strings... in the context menu of plug-in projects and their manifest files.

nls wizard

Organize plug-in manifest files

The Organize Manifests wizard is an appointment stop prior to shipping a plug-in.  It removes unused dependencies and property keys, and manages the exported packages ensuring they are marked with the right visibility.

This function can be invoked via PDE Tools > Organize Manifests... from the context menu of plug-in projects and MANIFEST.MF files.

organize manifests wizard

New processing instruction in plugin.xml files

Plug-in manifest files generated by PDE now contain a new processing instruction indicating version 3.2, instead of 3.0. This new processing instruction is required if a plug-in is to take advantage of the new runtime support where a plug-in can contribute extension points and extensions to a namespace other than its own.

In the example below, the org.eclipse.pde.core plug-in contributes an extension to the org.eclipse.pde namespace

processing instruction

Note that there is no need to migrate an existing plug-in to use the new processing instruction unless you want to use the new namespace support in that plug-in.

Bundle execution environment

A bundle execution environment specifies the minimum level of JRE required for the plug-in to run. If the JRE used to run Eclipse does not meet the requirement, the plug-in will not run.

If you declare J2SE-1.4 as your plug-in's bundle execution environment, for example, your plug-in will run with a JRE version >= 1.4.

If the plug-in can run in execution environments that are not proper subsets of each other (e.g J2SE-1.4 and CDC-1.1/Foundation-1.1), then all such bundle execution environments should be listed.

The Execution Environments section is on the Overview page of the plug-in manifest editor.

During a plug-in export, the plug-in code is compiled against the JRE associated with the first execution environment listed in the MANIFEST.MF.  Refer to the Java > Installed JREs > Execution Environments preference page for a list of OSGi execution environments and the list of installed JREs that are compatible with each.

execution environment

Automated management of dependencies

PDE now provides a new flexible workflow that allows you to code your plug-in first, and then have your code analyzed, and the list of plug-in dependencies automatically generated for you by PDE after.

The Automated Management of Dependencies section on the Dependencies page of the plug-in manifest editor lets you specify a list of plug-ins that you wish to augment your development build path (and hence your content assist scope) with.

These dependencies do not get added to the MANIFEST.MF immediately, but you can start coding right away as if they were.

At any time, you can tell PDE to analyze your code and generate the correct dependencies in your MANIFEST.MF via either the Require-Bundle or Import-Package headers.

dependency management

Structural compare and syntax highlighting for manifest.mf files

When comparing two versions of a bundle MANIFEST.MF file, the new structure compare viewer will let you easily see what headers have been added, removed or modified.

manifest structure compare

Syntax highlighting has also been added to the MANIFEST.MF source page. Colors and fonts preferences can be set on the Plug-in Development > Editors preference page.

Validate build.properties files

PDE now validates build.properties files to flag potential problems that would prevent your plug-in from being exported properly.

build.properties validation

The severity level for problems in build.properties files can be set on the Plug-in Development > Compilers > Plug-ins preference page.

notification severity

Quick fixes for plug-in manifest files

Quick fixes are now available for many types of problems in MANIFEST.MF, plugin.xml and build.properties files, including:
  • unresolved type references
  • externalizing attributes and elements
  • replacement of deprecated attributes and directives

quickfix

Automatic Javadoc attachment

PDE now automates the task of attaching Javadoc to libraries found on your plug-in's build path.

javadoc attachment

Refer to the org.eclipse.pde.core.javadoc extension point documentation for full details.

New extension point schema editor

The extension point schema editor has been redesigned. New features include:
  • better visualization of the schema
  • simpler editing of attributes
  • drag and drop
  • inclusion of other schemas

schema editor

Headless RCP application template

The Eclipse runtime is a rich Java component model ideal for running headless (non-UI) applications.

The New Plug-in Project creation wizard (File > New > Project...> Plug-in Project) now supports a workflow to create headless RCP applications, complete with a Hello World template.

headles rcp

Form validation in product editor

The product editor now reports warnings and errors in the title area of each page. Problems reported include invalid paths and the wrong size and depth of an image.

form validation

Integrated progress monitor in product splash screen

If you like the integrated progress bar in the Eclipse splash screen, you can easily do the same for your product splash screen.

The Branding page of PDE product editor provides support to add and customize an integrated progress bar.

progress bar and message branding

Platform-specific launcher arguments for cross-platform product export

In the product editor, it is now possible to specify platform-specific program and VM arguments to launch a product with. This allows the creation of platform-specific <launcher>.ini files in a single cross-platform export operation.

platform specific launcher arguments

Add a Welcome page to your product

A welcome page is your opportunity to provide a pleasant initial user experience to your product.

The Branding page of the product configuration editor (File > New > Other...> Product Configuration) now has a Welcome Page section, which will help you create a template welcome page for your product.

welcome branding

Sharable and portable PDE launch configurations

The PDE launch configurations (Eclipse Application and Plug-in JUnit) now support variable substitutions. Careful use of variables allows the saved form of the launch configuration to be portable across operating systems and sharable across teams.

Templates for launching arguments

You can now specify a template for program and VM arguments, which will be used to initialize default arguments on new PDE launch configurations.

launching templates

Enhanced and automatic plug-in validation prior to launching

The Validate Plug-in Set functionality, available on the Plug-ins tab of all PDE launchers, analyzes the list of selected plug-ins to find lurking launching startup problems. 

This function has now been enhanced to forecast more types of unsatisfied constraints that would prevent your plug-in from running.

You can also opt to have this validation done automatically prior to every launch.

automatic plug-in validation

New source lookup for debugging Eclipse applications

When debugging Eclipse applications, PDE now uses a custom source lookup mechanism that is tied to the OSGi class loader. This is both faster and more accurate than the standard linear Java source lookup.

The Source tab has been removed from the Eclipse/Equinox/Plug-in JUnit launch configurations as it is no longer needed.

Plug-in level custom Ant targets

The generated build.xml for a plug-in now supports custom targets at the plug-in level. Set the property "customBuildCallbacks" in a plug-in's build.properties file to point at an Ant script and pre and/or post ant calls will be generated for the following targets: build.jars, build.sources, the compilation target (eq: @dot), gather.bin.parts, gather.sources, gather.logs, and clean. In many cases these custom callbacks can be used instead of having an entirely custom build.xml. A template customBuildCallbacks.xml is provided in org.eclipse.pde.build/templates.

Building products

PDE Build now supports building products from a .product file in a headless automated build. A feature will be automatically generated based on the contents of the product file.

Multiple repository support

The PDE Build generation of fetch scripts for headless builds is now extensible. Extenders may contribute support for fetching elements from additional repositories through the org.eclipse.pde.build.fetchFactories extension point. PDE Build provides the standard extension for fetching files from CVS.