Twitter Logo Follow us on Twitter
Project Information About this project

RAP 1.1 M2 - New and Noteworthy

Here are some of the more noteworthy things available in the milestone build M2 (February 20, 2008) which is now available for download.

This list shows all bugs that were fixed during this milestone.

RWT

Display#readAndDispatch()

To more closely align with SWT and solve the problems with the existing mechanism for blocking UI operations, RWT new provides Display#readAndDispatch() and Display#sleep().

The new implementation now strictly follows the apartment threading model. This means that the life cycle is handled by a single thread, spanning the lifetime of a session. As a result, all phase listeners and application code are executed on this thread. Note, that the readAndDispatch() loop runs in the process action phase, however this is generally transparent to the application developer.

Please be aware that this comes at the cost of a small API break. The IEntryPoint#createUI method changed its signature from Display create() to int createUI. A typical entry point that creates a workbench would now look like this:


  public class MyApplication implements IEntryPoint {
    public int createUI() {
      Display display = PlatformUI.createDisplay();
      WorkbenchAdvisor advisor = new MyWorkbenchAdvisor();
      return PlatformUI.createAndRunWorkbench( display, advisor )
    }
  }
	      

If you are using RWT directly, you also need to code the typical event loop in your entry point:


  public class MyEntryPoint implements IEntryPoint {
    public int createUI() {
      Display display = new Display();
      Shell shell = new Shell( display );
      shell.setSize( 560, 420 );
      // ... populate shell here ...
      shell.layout();
      shell.open();
      while( !shell.isDisposed() ) {
        if( !display.readAndDispatch() ) {
          display.sleep();
        }
      }
      return 0;
    }
  }
          

Table keyboard navigation The table widget now supports keyboard navigation. Using the Up, Down, Home, End, PageUp and PageDown keys works as expected.

JFace and Workbench

Image Decorator Support

JFace now contains class org.eclipse.jface.viewers.DecorationOverlayIcon that supports the creation of image overlays for decoration (org.eclipse.jface.resource.CompositeImageDescriptor is now fully functional).

The workbench now provides the extension point org.eclipse.ui.decorators which allows to add decorations declaratively based on enablements.
Example:


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