ns = LiteralHelper.dateFormatDetailSet; cmbDateForm.setItems( ns.getDisplayNames( ) ); if ( formatspecifier instanceof DateFormatSpecifier ) { cmbDateForm.select( ns.getSafeNameIndex( ( (DateFormatSpecifier) formatspecifier ).getDetail( ) .getName( ) ) ); } if ( cmbDateForm.getSelectionIndex( ) == -1 ) { cmbDateForm.select( 0 ); }  String str = ""; if ( formatspecifier instanceof JavaDateFormatSpecifier ) { str = ( (JavaDateFormatSpecifier) formatspecifier ).getPattern( ); if ( str == null ) { str = ""; } txtDatePattern.setText( str ); } if ( formatspecifier instanceof NumberFormatSpecifier ) { str = ( (NumberFormatSpecifier) formatspecifier ).getPrefix( ); if ( str == null ) { str = ""; } txtPrefix.setText( str ); str = ( (NumberFormatSpecifier) formatspecifier ).getSuffix( ); if ( str == null ) { str = ""; } txtSuffix.setText( str ); str = String.valueOf( ( (NumberFormatSpecifier) formatspecifier ).getMultiplier( ) ); if ( str == null || !( (NumberFormatSpecifier) formatspecifier ).eIsSet( AttributePackage.eINSTANCE.getNumberFormatSpecifier_Multiplier( ) ) ) { str = ""; } txtMultiplier.setText( str ); iscFractionDigits.setValue( ( (NumberFormatSpecifier) formatspecifier ).getFractionDigits( ) ); } if ( formatspecifier instanceof JavaNumberFormatSpecifier ) { str = String.valueOf( ( (JavaNumberFormatSpecifier) formatspecifier ).getMultiplier( ) ); if ( str == null || !( (JavaNumberFormatSpecifier) formatspecifier ).eIsSet( AttributePackage.eINSTANCE.getJavaNumberFormatSpecifier_Multiplier( ) ) ) { str = ""; } txtAdvMultiplier.setText( str ); str = ( (JavaNumberFormatSpecifier) formatspecifier ).getPattern( ); if ( str == null ) { str = ""; } txtNumberPattern.setText( str ); }
	private void populateLists( )	{		this.bEnableEvents = false;		cmbDataType.add( "Number" ); //$NON-NLS-1$		cmbDataType.add( "Date/Time" ); //$NON-NLS-1$		if ( formatspecifier == null )		{			cmbDataType.select( 0 );			btnUndefined.setSelection( true );			slStandardDetails.topControl = this.cmpStandardNumberDetails;			slAdvancedDetails.topControl = this.cmpAdvancedNumberDetails;		}		else if ( formatspecifier instanceof DateFormatSpecifier				|| formatspecifier instanceof JavaDateFormatSpecifier )		{			cmbDataType.select( 1 );			if ( formatspecifier instanceof DateFormatSpecifier )			{				btnStandard.setSelection( true );			}			else if ( formatspecifier instanceof JavaDateFormatSpecifier )			{				btnAdvanced.setSelection( true );			}			else			{				btnUndefined.setSelection( true );			}			slStandardDetails.topControl = this.cmpStandardDateDetails;			slAdvancedDetails.topControl = this.cmpAdvancedDateDetails;		}		else		{			cmbDataType.select( 0 );			if ( formatspecifier instanceof NumberFormatSpecifier )			{				btnStandard.setSelection( true );			}			else if ( formatspecifier instanceof JavaNumberFormatSpecifier )			{				btnAdvanced.setSelection( true );			}			else			{				btnUndefined.setSelection( true );			}			slStandardDetails.topControl = this.cmpStandardNumberDetails;			slAdvancedDetails.topControl = this.cmpAdvancedNumberDetails;		}		updateUIState( );		// Populate Date Types		NameSet ns = LiteralHelper.dateFormatTypeSet;		cmbDateType.setItems( ns.getDisplayNames( ) );		if ( formatspecifier instanceof DateFormatSpecifier )		{			cmbDateType.select( ns.getSafeNameIndex( ( (DateFormatSpecifier) formatspecifier ).getType( )					.getName( ) ) );		}		if ( cmbDateType.getSelectionIndex( ) == -1 )		{			cmbDateType.select( 0 );		}		// Populate Date Details		ns = LiteralHelper.dateFormatDetailSet;		cmbDateForm.setItems( ns.getDisplayNames( ) );		if ( formatspecifier instanceof DateFormatSpecifier )		{			cmbDateForm.select( ns.getSafeNameIndex( ( (DateFormatSpecifier) formatspecifier ).getDetail( )					.getName( ) ) );		}		if ( cmbDateForm.getSelectionIndex( ) == -1 )		{			cmbDateForm.select( 0 );		}		String str = ""; //$NON-NLS-1$		if ( formatspecifier instanceof JavaDateFormatSpecifier )		{			str = ( (JavaDateFormatSpecifier) formatspecifier ).getPattern( );			if ( str == null )			{				str = ""; //$NON-NLS-1$			}			txtDatePattern.setText( str );		}		if ( formatspecifier instanceof NumberFormatSpecifier )		{			str = ( (NumberFormatSpecifier) formatspecifier ).getPrefix( );			if ( str == null )			{				str = ""; //$NON-NLS-1$			}			txtPrefix.setText( str );			str = ( (NumberFormatSpecifier) formatspecifier ).getSuffix( );			if ( str == null )			{				str = ""; //$NON-NLS-1$			}			txtSuffix.setText( str );			str = String.valueOf( ( (NumberFormatSpecifier) formatspecifier ).getMultiplier( ) );			if ( str == null					|| !( (NumberFormatSpecifier) formatspecifier ).eIsSet( AttributePackage.eINSTANCE.getNumberFormatSpecifier_Multiplier( ) ) )			{				str = ""; //$NON-NLS-1$			}			txtMultiplier.setText( str );			iscFractionDigits.setValue( ( (NumberFormatSpecifier) formatspecifier ).getFractionDigits( ) );		}		if ( formatspecifier instanceof JavaNumberFormatSpecifier )		{			str = String.valueOf( ( (JavaNumberFormatSpecifier) formatspecifier ).getMultiplier( ) );			if ( str == null					|| !( (JavaNumberFormatSpecifier) formatspecifier ).eIsSet( AttributePackage.eINSTANCE.getJavaNumberFormatSpecifier_Multiplier( ) ) )			{				str = ""; //$NON-NLS-1$			}			txtAdvMultiplier.setText( str );			str = ( (JavaNumberFormatSpecifier) formatspecifier ).getPattern( );			if ( str == null )			{				str = ""; //$NON-NLS-1$			}			txtNumberPattern.setText( str );		}		this.layout( );		this.bEnableEvents = true;	}