Eclipse 3.4 M6 - New and Noteworthy

Spring has sprung. And with it comes a host of new features, taking their proverbial seats in time for the upcoming API freeze. Here are some of the more noteworthy things available in milestone build M6 (March 28, 2008) which is now available for download. See the build notes for details about bugs fixed and other changes.


Equinox


Equinox Provisioning Platform (p2) The Eclipse Platform now includes the Equinox Provisioning Platform, dubbed p2, that provides a complete replacement for the install/update functionality in previous releases of Eclipse. Some of the notable underlying features of p2 include:
  • Ability to install complete Eclipse-based applications from scratch, above just augmenting and updating already installed applications.
  • Ability to install and manage an application from either inside the application or from another process.
  • Ability to install and manage artifacts other than plug-ins and features, such as launchers, root files such as licenses, configuration files, Java VMs, etc.
  • Pooling of bundles from multiple Eclipse-based applications in one directory, saving disk space and making installing and upgrading much faster.
  • Staged provisioning so that downloading of software can be separated from installation.
  • Dynamic discovery and resolution of software dependencies - no more broken "Select Required".
  • A more robust transport layer for downloading built on the Eclipse Communication Framework (ECF).
  • Dynamic mirror selection and rebalancing based on mirror performance, and multi-threaded downloads.

New Dropins folder There is a new "dropins" folder at the root of the Eclipse platform install that can be used to "drop in" additional plug-ins separate from the base application. This folder supports various layouts of plug-ins, features, and link files. See the p2 Getting Started page on the wiki for more details. On each startup, this directory is scanned, and any newly added content is automatically installed, and removed contents are uninstalled from the running application.

Eclipse installer The Eclipse SDK now has a simple installer that can be used to install the SDK from eclipse.org or its mirrors. This leverages the transport capabilities of p2 to provide a faster, authenticated download. The installer also supports shared install so that multiple Eclipse applications on your system share the same data. The installer is available from the Equinox Download Page.

The Eclipse SDK Installer


New update UI (p2-based) Along with the new p2 provisioning infrastructure comes a new UI. The new UI is accessed using Help > Software Updates.

Software Updates and Add-ons Dialog

The new update UI allows you to add update sites or install software into Eclipse using drag and drop gestures in addition to using the dialogs.

To make an update site available in Eclipse, you can drag and drop a site URL link from supported browsers (such as Firefox) into the Help > Software Updates > Available Features page.

Dragging a browser link to the Available Features Tab

You can also add sites using the Help > Software Updates > Available Features > Manage Sites > Add dialog.

If you have already downloaded software that you want to install into Eclipse, you can add a directory or an archive (zip or jar) file containing plug-ins using the same dialog. You can also drag and drop these files from supported platform file browsers to the Help > Software Updates > Available Features page.

Dragging a bundle jar file into Available Features can optionally install the bundle into the dropins folder. You will be prompted the first time this happens.

Once you have made the software available by dragging a URL, folder, or file into the Available Features page, you can push the Install button to install it into Eclipse.

Install Wizard containing list of items to install

For more detailed information about the new Update UI, see the p2 Getting Started page on the wiki.


Connecting with Java authentication If you wanted to use the Java authentication service (JAAS) but were put off by the complexity of fitting it into the Eclipse world, now is the time to revisit that decision.

The Equinox security API offers a way to describe your login configuration, login modules, and callback handlers via extension points. The class loading magic is done behind the scenes to ensure that your classes fit properly into JAAS.

The SecurePlatform class (org.eclipse.equinox.security.auth package) along with the loginConfigurationProvider extension point are good starting points to explore this functionality.


Secure storage Equinox now provides a Preferences-like storage for sensitive data such as passwords and login credentials. The information is encrypted using Java encryption mechanisms.

The storage uses an extensible list of password providers to obtain the key ring password. In this version two password providers are supplied: the UI prompt and Windows login integration modules.

While secure storage is mostly intended to be consumed by other bundles and hidden from the end user, a view of default secure storage and a preference page are provided for convenience.

The Secure Storage view

The secure preferences can be obtained using the SecurePreferencesFactory class (org.eclipse.equinox.security.storage package).


PDE


API tooling

New API tools are now a standard part of the Eclipse SDK. The following features assist developers with API maintenance.

  • New Javadoc tags to annotate API with explicit restrictions (available with code assist):
    • @noimplement - indicates an interface is not to be implemented by clients
    • @noinstantiate - indicates class is not to be instantiated by clients
    • @noextend - indicates a class is not to be subclassed by clients or a method is not to be overridden
    • @noreference - indicates a method or field is not to be referenced by clients
  • Report problems during full and incremental builds:
    • Binary incompatibilities between releases
    • Illegal use of APIs based on restriction tags
    • Leaking non-API types from an API package
    • Incorrect plug-in version numbers
    • Missing or incorrect @since tags (quick fix provided)

File with example API problems

For more information on API tools and how to configure your plug-in projects for API analysis please see the API tooling WIKI.


Schema identifier attribute

Extension point authors will now be able to define attributes that reference attributes defined elsewhere. This is accomplished by setting your extension point attributes as type identifier and choosing the attribute it references. An example of this would be the org.eclipse.ui.handlers extension point. The commandId attribute references commands defined in the org.eclipse.ui.commands extension point.

Authoring extension points with schema identifiers

Extension developers will now be able to browse for valid identifiers given the commandId attribute. Warnings will also be issued for identifiers that don't exist, to prevent the common mistake of a misspelled identifier.

Authoring extensions with schema identifiers

Launch configuration filtering

To aid developers working with large sets of plug-ins, it's now possible to filter plug-ins in PDE-based launch configurations.

Filtering plug-in lists inside of launch configurations

Quickly browse to exported packages

The Open Plug-in Artifact (Ctrl+Shift+A) dialog has been enhanced to include exported packages.

Quickly jump to an exported package

Enhanced support for other OSGi frameworks

PDE, in conjunction with Equinox, now supports development against different types of system bundles (i.e., other OSGi framework implementations).


Platform


Shear transform SWT has new API that allows for shearing of images. For more info, check out SWT Snippet 298.

Shear Transform


File overwrite prompt The SWT FileDialog now optionally prompts the user to confirm when a file will be overwritten. This allows the user to stay within the dialog when choosing a file to save.

File Overwrite


RowLayout center alignment New API was added to SWT RowLayout to allow for the centering of controls. For more info, check out SWT Snippet 299.

Row Layout center


Cocoa improvements Work on the Mac Cocoa port of SWT is still in the early stages, but some important improvements have been made:
  • Menu bar support
  • Command Q support
  • Advanced graphics improvements
  • Checkbox in Tables and Trees
  • Key events
  • Tab traversal

Thanks to the community for contributing patches, bug reports and testing.

SWT on Cocoa


Progress bar (Vista) The SWT ProgressBar control now supports the native Windows Vista styles.

Progress Bar Vista


Content type-specific file icons In the past, icons for files were chosen based on the file's name and extension only. Workbench views now show more specific file icons based on the file's content type. The IDE will initially show a generic icon like it always has:

package explorer with generic icons

After determining content types in the background, icons will be replaced with more specific ones if available:

package explorer with more specific icons

This behavior can be turned off from the General > Appearance > Label Decorations preference page.


Remote Help content enhancements Eclipse 3.4 now allows multiple remote infocenters to contribute content to the Help system. This can be specified using the Preferences > Help > Content preference page.

Help Preferences



API for styled labels in trees and tables The API for styled text labels in table and trees is now available in JFace. Each label in a tree and table viewer can have text styles like foreground and background colors, underlines, boxes, etc.
  • Extend StyledCellLabelProvider and provide style ranges for your element labels in update
  • Reuse existing label providers by having them implement IStyledLabelProvider and use them with a DelegatingStyledCellLabelProvider or a DecoratingStyledCellLabelProvider
Have a look at the JFace Snippet 49 and JFace Snippet 50.

Colored labels in the search result view

To enable or disable colored labels go to General > Appearance > Enable colored labels. The colors are defined on the colors and fonts preference page.


Improved Apply Patch wizard The CVS Apply Patch wizard now lets you see and inspect the hunks that matched. Previously, only conflicting hunks were visible.

The Apply Patch wizard showing matched hunks


Improved Share Project dialog There's a new option in the CVS Share Project dialog that lets you choose to use the project name as the module name and place it under the selected module.

Sharing wizard


JDT


Support for external class folders Class folders that are outside the current workspace (i.e. "external" ones) can now be added to the build path.

Using the Java Build Path page of the project properties, select the Libraries tab and push the Add External Class Folder button:

How set up an External Class Folder


Improved resilience with missing types JDT can now better handle invalid code containing references to missing types; in particular it will minimize secondary errors, which improves the resilience of the entire Java tools stack. For example:
  • unknown types no longer block the renaming of fields:

    First example of missing types

  • code completion can now propose methods with unknown types:

    Second example of missing types


JUnit view shows execution time The JUnit view now shows the elapsed time for test cases and test suites.

Pasted snippet in snippet.Snippet.main(String[])

This timing information is useful as a quick indicator for severe performance regressions. The measurements are based on wall clock time, which means they are highly dependent on the machine type and other processes running on it.


New quick assists The following new Quick Assists have been added:
  • Use MessageFormat for string concatenation:

    Use MessageFormat for string concatenation

  • Extract local variable (without replacing all occurrences):

    Extract local variable


Specify location for templates It's now possible to specify the location where Java editor templates are applicable.
  • Statement location: The template shows up only when completing a statement
  • Type member location: The template shows up only when completing a type member

Configure template location

As a result, content assist will only show templates applicable at the current location.


Improved Javadoc view The Javadoc view has been improved with:
  • icon corresponding to the current input
  • buttons to go back and forth in the history
  • button to enable/disable link with selection
  • button to open the current input in an external browser

Javadoc View

The action to open the current input in an external browser is also available from the Javadoc hover tool bar.


Rich Java problem hover The problem hover now offers all available quick fixes and shows a tool bar on F2 or when you move the mouse into it (depending on the chosen setting on the General > Editors > Text Editors preference page):

Enriched Problem Hover

Quick fixes can be executed by clicking on the link. The actions in the tool bar let you configure the annotation preferences and the problem severity.


Create Ant script for runnable JAR The Runnable JAR File Export wizard can now generate an Ant script:

Runnable JAR exporter

The generated Ant script does the same as the export wizard: Creates a JAR file containing all the required libraries in order to execute the JAR file. The Ant script could be used in an automated build process.

The Runnable JAR File Export wizard can be found in File > Export > Java > Runnable JAR file.



Refactoring flags references in binaries The Rename Type refactoring now flags references to the refactored type inside compiled class files. Such references cannot be updated and would lead to problems at run time.

Refactoring error dialog showing references in binaries

Also, to make it easier for you to check out the affected projects from your source repository, the Show as Search Result button can transfer the references into the Search view.



Paste creates snippet for members and statements Paste (Ctrl+V) in the Package Explorer view now also supports member declarations (e.g., a method) or a sequence of statements. Depending on the element you selected before invoking Paste, Eclipse creates the enclosing elements needed to make the code compilable.

E.g. pasting these lines

		List<Number> numbers;
		numbers= Arrays.asList(1, 2, 42);

into the "_pasted_code_" Java project automatically generates a Java class and main method to hold the statements:

Pasted snippet in snippet.Snippet.main(String[])

New API for invoking batch compiler The Java batch compiler now has two API methods to allow standalone applications (e.g. running on a Foundation 1.0 JRE) to call it without involving the Eclipse platform:
  • BatchCompiler#compiler(String, PrintWriter, PrintWriter, CompilationProgress)
  • BatchCompiler#compiler(String[], PrintWriter, PrintWriter, CompilationProgress).

Improved -classpath batch compiler option The Java batch compiler now uses the Class-Path clause of JAR file manifests to complete the classpath. For JAR files that are specified on a -classpath option, the compiler follows Class-Path clauses recursively and appends each new referenced JAR file to the end of the classpath.

The above features are just the ones that are new since the previous milestone build. Summaries for earlier 3.4 milestone builds: