Difference between revisions of "Rap10M5 News"

From Eclipsepedia

Jump to: navigation, search
m
(25 intermediate revisions by 6 users not shown)
Line 1: Line 1:
__NOTOC__
 
 
| [[RAP|RAP wiki home]] | [http://eclipse.org/rap RAP project home] |
 
| [[RAP|RAP wiki home]] | [http://eclipse.org/rap RAP project home] |
 
===RAP 1.0 M5 - New and Noteworthy===
 
===RAP 1.0 M5 - New and Noteworthy===
  
This document will become the New and Noteworthy page for the next milestone release and meanwhile serves to document the development progress.
+
Here are some of the more noteworthy things available in milestone build M5 (July 13, 2007) which is now available for [http://www.eclipse.org/rap/downloads.php download].
  
All features documented here can be obtained from [http://www.eclipse.org/rap/cvs.php CVS] HEAD.
+
== RAP Common ==
 +
During the development cycle towards M5 we introduced major enhancements in the RWT infrastructure.
 +
The two most notable are text size determination and client-side widget pooling.
 +
Please note that due to the complexity of the new code, we would welcome very much your feedback about performance and potential problems, especially if you should experience any inexplicable behavior.
 +
 
 +
In the upcoming milestone (M6) we will focus on robustness and stability. To enable shorter feedback cycles in this important area we will provide weekly integration builds beginning next week.
  
 
==RWT==
 
==RWT==
Line 14: Line 18:
  
 
The <code>Table</code> widget now notifies about double-click events by sending a <code>SelectionListener#widgetDefaultSelected</code>.
 
The <code>Table</code> widget now notifies about double-click events by sending a <code>SelectionListener#widgetDefaultSelected</code>.
The column order can already be queried and changed programmatically using <code>getColumnOrder()</code> and <code>setColumnOrder()</code>. Rearranging columns by drag and drop is yet to come.
+
 
 +
The column order can be queried and changed programmatically using <code>getColumnOrder()</code> and <code>setColumnOrder()</code>. Marking a column with <code>setMoveable</code> permits the user to change its order by drag and drop.
 +
 
 +
If a table is created with the <code>SWT.VIRTUAL</code> flag, <code>TableItem</code>s are only realized client-side when they become visible. Even though, in most situations, using the <code>[[#RAP _JFace|TableViewer]]</code> will be more convenient, the code below shows how the <code>SetData</code> event can be used to "manually" populate a <code>VIRTUAL</code> table.
 +
<pre>
 +
Table table = new Table( shell, SWT.VIRTUAL );
 +
table.addListener( SWT.SetData, new Listener() {
 +
  public void handleEvent( final Event event ) {
 +
    TableItem item = ( TableItem )event.item;
 +
    int index = table.indexOf( item );
 +
    item.setText( "Item " + index  );
 +
  }
 +
} );
 +
table.setItemCount( 300 );
 +
</pre>
 +
 
 +
|-valign="top" align="left"
 +
|width="20%"|'''New widget: CLabel'''
 +
|width="80%"|
 +
 
 +
With the new CLabel widget you can now have images and text on your label without any workaround. Additionally you can set different border styles like <code>SWT.SHADOW_IN</code> or <code>SWT.SHADOW_OUT</code>. Here is an example how it could look like:
 +
 
 +
[[Image:RAPCLabel.png]]
 +
 
 +
 
 +
|-valign="top" align="left"
 +
|width="20%"|'''Cool stuff'''
 +
|width="80%"|
 +
 
 +
By reimplementing the CoolItem and CoolBar widget we got many improvements in this area. First is that support of multiple rows in the CoolBar which is used if there is not enough space to show all the items in one row.
 +
 
 +
[[Image:RAPCoolBarRows.png]]
 +
 
 +
Additionally if there is not enough space to wrap the CoolItems a chevron will be visible to have access to the invisible items.
 +
 
 +
[[Image:RAPCoolBarChevron.png]]
 +
 
 +
 
 +
|-valign="top" align="left"
 +
|width="20%"|'''Theming enhancements'''
 +
|width="80%"|
 +
 
 +
The RAP theming infrastructure allows for further customizations of the UI.
 +
It is now possible to specify borders, paddings, fonts, and images in a custom theme file.
 +
Even custom widgets can now hook their theming into RAP using the extension point mechanism.
 +
 
 +
Some examples:
 +
 
 +
[[Image:RAPTheming_Group.png]]
 +
 
 +
<pre>
 +
group.frame.border: 3 double #56a0ea
 +
group.label.font: 12 bold Arial, Helvetica, sans-serif
 +
...
 +
button.background: #9dd0ea
 +
button.border: 2 #1695d4
 +
...
 +
</pre>
 +
 
 +
[[Image:RAPTheming_LoginDialog.png]]
 +
 
 +
 
 +
<pre>
 +
shell.BORDER.border: 3 #1695d4
 +
shell.title.background: #9dd0ea
 +
shell.title.padding: 2 5 2 2
 +
shell.padding: 5
 +
shell.button.margin: 0 2 8 0
 +
...
 +
text.BORDER.border: 1 solid #1695d4
 +
...
 +
</pre>
 +
 
 +
For more information, see [[RAP_Theming|RAP Theming]].
 +
 
 +
|-valign="top" align="left"
 +
|width="20%"|'''Client-side widget pooling'''
 +
|width="80%"|
 +
 
 +
RWT introduces a mechanism that helps to soften the massive memory consumption on the client.
 +
Many of the client-side widget are not thrown away anymore, but kept in an object pool for later reuse.
 +
Especially with long-running applications in the Internet Explorer browser, this can make a huge difference.
 +
The pooling does not include all RWT widgets now, so there is still potential for further optimization.
 +
 
 +
Please note that this topic is work in progress and, despite extensive testing, might lead to errors under rare circumstances.
 +
If you experience any inexplicable behavior, please let us know.
 +
 
 +
|-valign="top" align="left"
 +
|width="20%"|'''Text Size Determination'''
 +
|width="80%"|
 +
 
 +
With M5 a new text size determination has been developed. For more information of the technichal background you may look at http://wiki.eclipse.org/WidgetToolkit - Challenges/Text Size Calculation. Note that there are still some work items left to do.
 +
 
 +
With FireFox you can see the mechanism in action: Use <code>Ctrl +/-</code> to change font sizes. After refreshing the session (<code>F5</code>) RWT adapts to the new sizes.
 +
 
 +
[[Image:Textsizedetermination.png]]
 +
 
 +
|}
 +
 
 +
==RAP JFace==
 +
{|
 +
|-valign="top" align="left"
 +
|width="20%"|'''TableViewer'''
 +
|width="80%"|
 +
As the underlying RWT <code>Table</code> now understands the <code>VIRTUAL</code> flag, the relevant <code>TableViewer</code> code was activated as well. Below you can see how it looks in action.
 +
 
 +
[[Image:Rap_VirtualTable_Loading.jpeg]] <b>>>></b> [[Image:Rap_VirtualTable_Done.jpeg]]
 +
 
 +
|-valign="top" align="left"
 +
|width="20%"|'''Databinding'''
 +
|width="80%"|
 +
Main functionalty of org.eclipse.jface.databinding has been ported to RAP.
 +
You can see databinding in action in the newly added perspective 'Databinding' in the RAP Demo application. Note that the databinding demo comes as a seperate plugin called <code>org.eclipse.rap.demo.databinding</code> which has to be started together with the regular workbench demo application. We would like to thank Samy Abou-Shama for his support in porting the databinding to RAP.
 +
 
 +
Here is a screenshot:
 +
 
 +
[[Image:databinding_snippet_view.jpg]]
 +
 
 +
 
 
|}
 
|}
  
Line 36: Line 158:
  
 
[[Image:RAPDrillDownAdapter.png]]
 
[[Image:RAPDrillDownAdapter.png]]
 +
|}
 +
 +
{|
 +
|-valign="top" align="left"
 +
|width="20%"|'''Editor framework'''
 +
|width="80%"|
 +
 +
The workbench implementation of RAP now really has support for the full editor infrastructure. Maybe there is one or the other little feature missing but it should work for the most situations where you need editor support. Note that we also support multi-page editors as you can see on the following screenshot:
 +
 +
[[Image:RAPEditors.png]]
 +
 +
Thanks to the donation of a Fortune 500 corporation we were able to acquire additional resources to have editor support implemented for M5.
 +
 
|}
 
|}
  

Revision as of 15:56, 20 July 2007

| RAP wiki home | RAP project home |

Contents

RAP 1.0 M5 - New and Noteworthy

Here are some of the more noteworthy things available in milestone build M5 (July 13, 2007) which is now available for download.

RAP Common

During the development cycle towards M5 we introduced major enhancements in the RWT infrastructure. The two most notable are text size determination and client-side widget pooling. Please note that due to the complexity of the new code, we would welcome very much your feedback about performance and potential problems, especially if you should experience any inexplicable behavior.

In the upcoming milestone (M6) we will focus on robustness and stability. To enable shorter feedback cycles in this important area we will provide weekly integration builds beginning next week.

RWT

New Table features

The Table widget now notifies about double-click events by sending a SelectionListener#widgetDefaultSelected.

The column order can be queried and changed programmatically using getColumnOrder() and setColumnOrder(). Marking a column with setMoveable permits the user to change its order by drag and drop.

If a table is created with the SWT.VIRTUAL flag, TableItems are only realized client-side when they become visible. Even though, in most situations, using the TableViewer will be more convenient, the code below shows how the SetData event can be used to "manually" populate a VIRTUAL table.

Table table = new Table( shell, SWT.VIRTUAL );
table.addListener( SWT.SetData, new Listener() {
  public void handleEvent( final Event event ) {
    TableItem item = ( TableItem )event.item;
    int index = table.indexOf( item );
    item.setText( "Item " + index  );
  }
} );
table.setItemCount( 300 );
New widget: CLabel

With the new CLabel widget you can now have images and text on your label without any workaround. Additionally you can set different border styles like SWT.SHADOW_IN or SWT.SHADOW_OUT. Here is an example how it could look like:

RAPCLabel.png


Cool stuff

By reimplementing the CoolItem and CoolBar widget we got many improvements in this area. First is that support of multiple rows in the CoolBar which is used if there is not enough space to show all the items in one row.

RAPCoolBarRows.png

Additionally if there is not enough space to wrap the CoolItems a chevron will be visible to have access to the invisible items.

RAPCoolBarChevron.png


Theming enhancements

The RAP theming infrastructure allows for further customizations of the UI. It is now possible to specify borders, paddings, fonts, and images in a custom theme file. Even custom widgets can now hook their theming into RAP using the extension point mechanism.

Some examples:

RAPTheming Group.png

group.frame.border: 3 double #56a0ea
group.label.font: 12 bold Arial, Helvetica, sans-serif
...
button.background: #9dd0ea
button.border: 2 #1695d4
...

RAPTheming LoginDialog.png


shell.BORDER.border: 3 #1695d4
shell.title.background: #9dd0ea
shell.title.padding: 2 5 2 2
shell.padding: 5
shell.button.margin: 0 2 8 0
...
text.BORDER.border: 1 solid #1695d4
...

For more information, see RAP Theming.

Client-side widget pooling

RWT introduces a mechanism that helps to soften the massive memory consumption on the client. Many of the client-side widget are not thrown away anymore, but kept in an object pool for later reuse. Especially with long-running applications in the Internet Explorer browser, this can make a huge difference. The pooling does not include all RWT widgets now, so there is still potential for further optimization.

Please note that this topic is work in progress and, despite extensive testing, might lead to errors under rare circumstances. If you experience any inexplicable behavior, please let us know.

Text Size Determination

With M5 a new text size determination has been developed. For more information of the technichal background you may look at http://wiki.eclipse.org/WidgetToolkit - Challenges/Text Size Calculation. Note that there are still some work items left to do.

With FireFox you can see the mechanism in action: Use Ctrl +/- to change font sizes. After refreshing the session (F5) RWT adapts to the new sizes.

Textsizedetermination.png

RAP JFace

TableViewer

As the underlying RWT Table now understands the VIRTUAL flag, the relevant TableViewer code was activated as well. Below you can see how it looks in action.

Rap VirtualTable Loading.jpeg >>> Rap VirtualTable Done.jpeg

Databinding

Main functionalty of org.eclipse.jface.databinding has been ported to RAP. You can see databinding in action in the newly added perspective 'Databinding' in the RAP Demo application. Note that the databinding demo comes as a seperate plugin called org.eclipse.rap.demo.databinding which has to be started together with the regular workbench demo application. We would like to thank Samy Abou-Shama for his support in porting the databinding to RAP.

Here is a screenshot:

Databinding snippet view.jpg


RAP Workbench

DrillDownAdapter

Drilldown Adapters are a feature available for TreeViewers to help navigate through the data, instead of having to deal with ever expanding trees. In this way you can essentially zoom in to view just one part of the tree, i.e., drill down. Only two lines of code were added throughout the initialization of the viewer to invoke this feature in the context menu. Only one line was needed to add them to the view's toolbar. They are shown below:

// Create the Drill Down Adapter
drillDownAdapter = new DrillDownAdapter(viewer);

// Add the options to the view's toolbar (IToolBarManager)
drillDownAdapter.addNavigationActions(manager);

After adding them to the IToolbarManager of your view, they are looking like this:

RAPDrillDownAdapter.png

Editor framework

The workbench implementation of RAP now really has support for the full editor infrastructure. Maybe there is one or the other little feature missing but it should work for the most situations where you need editor support. Note that we also support multi-page editors as you can see on the following screenshot:

RAPEditors.png

Thanks to the donation of a Fortune 500 corporation we were able to acquire additional resources to have editor support implemented for M5.


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

New for RAP 1.0 milestone build M4 (June 08, 2007)
New for RAP 1.0 milestone build M3 (April 27, 2007)
New for RAP 1.0 milestone build M2 (March 2, 2007)