Bug 167688 Setting number format on multiple elements gives NPE
If I select multiple data elements (for example one in each table cell) using the shift key, then try to 'format number' on those in the properties tab, I get a null pointer exception. An unexpected internal exception occurred.Please see log for detail. Plug-in Provider:Eclipse.org Plug-in Name:BIRT Designer UI Plug-in ID:org.eclipse.birt.report.designer.ui Version:2.2.0.v20061211-0630 Error Code:Error.GUIException.invokedByUnexpectedException Error Message:Caused by java.lang.NullPointerException.
UI/org.eclipse.birt.report.designer.ui.views/src/org/eclipse/birt/report/designer/internal/ui/views/attributes/widget/FormatNumberDescriptor.java
new NumberFormatter( provider.getPatternForCategory( provider.NUMBER_FORMAT_TYPE_FIXED ) ).format( DEFAULT_PREVIEW_NUMBER )
		} );
		new TableItem( table, SWT.NONE ).setText( new String[]{
				provider.getDisplayName4Category( provider.NUMBER_FORMAT_TYPE_PERCENT ),
				new NumberFormatter( provider.getPatternForCategory( provider.NUMBER_FORMAT_TYPE_PERCENT ) ).format( DEFAULT_PREVIEW_NUMBER )
		} );
		new TableItem( table, SWT.NONE ).setText( new String[]{
				provider.getDisplayName4Category( provider.NUMBER_FORMAT_TYPE_SCIENTIFIC ),
				new NumberFormatter( provider.getPatternForCategory( provider.NUMBER_FORMAT_TYPE_SCIENTIFIC ) ).format( DEFAULT_PREVIEW_NUMBER )
		} );
		table.addSelectionListener( new SelectionAdapter( ) {
			public void widgetSelected( SelectionEvent e )
			{
				String displayName = ( (TableItem) e.item ).getText( FORMAT_TYPE_INDEX );
				String pattern = provider.getPattern( displayName );
				formatCodeBox.setText( pattern );
				updatePreview( );
				notifyFormatChange( );
			}
		} );
	}
	private GridLayout createGridLayout4Page( )
	{
		GridLayout layout;
		if ( pageAlignment == PAGE_ALIGN_HORIZONTAL )
		{
			layout = new GridLayout( 2, false );
			layout.marginHeight = 0;
		}
		else