else if ( e.getSource( ).equals( btnStartFormatSpecifier ) || e.getSource( ).equals( btnEndFormatSpecifier ) ) { String sAxisTitle = ""; try { String sTitleString = getDialForProcessing( ).getLabel( ) .getCaption( ) .getValue( ); int iSeparatorIndex = sTitleString.indexOf( ExternalizedTextEditorComposite.SEPARATOR ); if ( iSeparatorIndex > 0 ) { sTitleString = sTitleString.substring( iSeparatorIndex ); } else if ( iSeparatorIndex == 0 ) { sTitleString = sTitleString.substring( ExternalizedTextEditorComposite.SEPARATOR.length( ) ); } sAxisTitle = new MessageFormat( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.ForAxis" ) ).format( new Object[]{sTitleString} ); } catch ( NullPointerException e1 ) { }  FormatSpecifier formatspecifier = null; if ( ( (DialRegion) getDialForProcessing( ).getDialRegions( ) .get( getMarkerIndex( ) ) ).getFormatSpecifier( ) != null ) { formatspecifier = ( (DialRegion) getDialForProcessing( ).getDialRegions( ) .get( getMarkerIndex( ) ) ).getFormatSpecifier( ); } FormatSpecifierDialog editor = new FormatSpecifierDialog( cmpContent.getShell( ), formatspecifier, new MessageFormat( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.MarkerRange" ) ).format( new Object[]{new Integer( getMarkerIndex( ) + 1 ), sAxisTitle} ) ); if ( !editor.wasCancelled( ) ) { if ( editor.getFormatSpecifier( ) == null ) { ( (DialRegion) getDialForProcessing( ).getDialRegions( ) .get( getMarkerIndex( ) ) ).eUnset( ComponentPackage.eINSTANCE.getMarkerRange_FormatSpecifier( ) ); return; } ( (DialRegion) getDialForProcessing( ).getDialRegions( ) .get( getMarkerIndex( ) ) ).setFormatSpecifier( editor.getFormatSpecifier( ) ); } }
	public void widgetSelected( SelectionEvent e )	{		if ( e.getSource( ).equals( btnAddRange ) )		{			DialRegion range = DialRegionImpl.create( );			range.setStartValue( getTypedDataElement( "" ) ); //$NON-NLS-1$			range.setEndValue( getTypedDataElement( "" ) ); //$NON-NLS-1$			getDialForProcessing( ).getDialRegions( ).add( range );			range.eAdapters( ).addAll( getDialForProcessing( ).eAdapters( ) );			iRangeCount++;			buildList( );			lstMarkers.select( lstMarkers.getItemCount( ) - 1 );			updateUIForSelection( );			if ( lstMarkers.getItemCount( ) == 1 )			{				// Enable UI elements				setState( true );			}			refreshButtons( );		}		else if ( e.getSource( ).equals( btnRemove ) )		{			if ( lstMarkers.getSelection( ).length == 0 )			{				return;			}			int iMarkerIndex = getMarkerIndex( );			getDialForProcessing( ).getDialRegions( ).remove( iMarkerIndex );			iRangeCount--;			buildList( );			if ( lstMarkers.getItemCount( ) > 0 )			{				lstMarkers.select( 0 );				updateUIForSelection( );			}			else			{				setState( false );				resetUI( );			}			refreshButtons( );		}		else if ( e.getSource( ).equals( lstMarkers ) )		{			updateUIForSelection( );			refreshButtons( );		}		else if ( e.getSource( ).equals( btnStartFormatSpecifier )				|| e.getSource( ).equals( btnEndFormatSpecifier ) )		{			String sAxisTitle = ""; //$NON-NLS-1$			try			{				String sTitleString = getDialForProcessing( ).getLabel( )						.getCaption( )						.getValue( );				int iSeparatorIndex = sTitleString.indexOf( ExternalizedTextEditorComposite.SEPARATOR );				if ( iSeparatorIndex > 0 )				{					sTitleString = sTitleString.substring( iSeparatorIndex );				}				else if ( iSeparatorIndex == 0 )				{					sTitleString = sTitleString.substring( ExternalizedTextEditorComposite.SEPARATOR.length( ) );				}				sAxisTitle = new MessageFormat( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.ForAxis" ) ).format( new Object[]{sTitleString} ); //$NON-NLS-1$ 			}			catch ( NullPointerException e1 )			{			}			FormatSpecifier formatspecifier = null;			if ( ( (DialRegion) getDialForProcessing( ).getDialRegions( )					.get( getMarkerIndex( ) ) ).getFormatSpecifier( ) != null )			{				formatspecifier = ( (DialRegion) getDialForProcessing( ).getDialRegions( )						.get( getMarkerIndex( ) ) ).getFormatSpecifier( );			}			FormatSpecifierDialog editor = new FormatSpecifierDialog( cmpContent.getShell( ),					formatspecifier,					new MessageFormat( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.MarkerRange" ) ).format( new Object[]{new Integer( getMarkerIndex( ) + 1 ), sAxisTitle} ) ); //$NON-NLS-1$			if ( !editor.wasCancelled( ) )			{				if ( editor.getFormatSpecifier( ) == null )				{					( (DialRegion) getDialForProcessing( ).getDialRegions( )							.get( getMarkerIndex( ) ) ).eUnset( ComponentPackage.eINSTANCE.getMarkerRange_FormatSpecifier( ) );					return;				}				( (DialRegion) getDialForProcessing( ).getDialRegions( )						.get( getMarkerIndex( ) ) ).setFormatSpecifier( editor.getFormatSpecifier( ) );			}		}	}