init( );  Chart chart = null; Serializer serializer = null; File chartFile = new File( "testChart.chart" );   try { serializer = SerializerImpl.instance( ); if ( chartFile.exists( ) ) {  chart = serializer.read( new FileInputStream( chartFile ) ); } } catch ( Exception e ) { WizardBase.displayException( e ); }   ChartWizard chartWizard = new ChartWizard( ); ChartWizardContext context = new ChartWizardContext( chart );   context.setDataServiceProvider( new DefaultDataServiceProviderImpl( ) );  context.setUIServiceProvider( new DefaultUIServiceProviderImpl( ) );   context = (ChartWizardContext) chartWizard.open( context );   if ( context != null ) { chart = context.getModel( ); try { serializer.write( chart, new FileOutputStream( chartFile ) ); } catch ( Exception e ) { WizardBase.displayException( e ); } } else { System.out.println( "Wizard was cancelled!" ); }
new ChartWizardLauncher( ).launch( );
	public static void main( String[] args )	{		init( );		Chart chart = null;		Serializer serializer = null;		File chartFile = new File( "testChart.chart" ); //$NON-NLS-1$		// Reads the chart model		try		{			serializer = SerializerImpl.instance( );			if ( chartFile.exists( ) )			{				chart = serializer.read( new FileInputStream( chartFile ) );			}		}		catch ( Exception e )		{			WizardBase.displayException( e );		}		// Configures the chart wizard.		ChartWizard chartWizard = new ChartWizard( );		ChartWizardContext context = new ChartWizardContext( chart );		/*		 * Used to fetch data. Default implementation of <code>IDataServiceProvider</code>.		 * 		 * @see the implementation for BIRT, <code>org.eclipse.birt.chart.reportitem.ReportDataServiceProvider</code>		 * 		 */		context.setDataServiceProvider( new DefaultDataServiceProviderImpl( ) );		/*		 * Used to invoke some builders outside. Default implementation of		 * <code>IUIServiceProvider</code>.		 * 		 * @see the implementation for BIRT, <code>org.eclipse.birt.chart.reportitem.ChartReportItemBuilderImpl</code>		 * 		 */		context.setUIServiceProvider( new DefaultUIServiceProviderImpl( ) );		// Opens the wizard		context = (ChartWizardContext) chartWizard.open( context );		// Writes the chart model		if ( context != null )		{			chart = context.getModel( );			try			{				serializer.write( chart, new FileOutputStream( chartFile ) );			}			catch ( Exception e )			{				WizardBase.displayException( e );			}		}		else		{			System.out.println( "Wizard was cancelled!" ); //$NON-NLS-1$		}	}