sh.setScriptClassLoader( iscl );
	public RunTimeContext prepare( Chart model,			IExternalContext externalContext, Locale locale )			throws ChartException	{		RunTimeContext rtc = new RunTimeContext( );		// Update the context with a locale if it is undefined.		final Chart cmRunTime = (Chart) EcoreUtil.copy( model );		rtc.setLocale( Locale.getDefault( ) );		ChartScriptContext csc = new ChartScriptContext( );		csc.setChartInstance( cmRunTime );		csc.setExternalContext( externalContext );		csc.setLocale( rtc.getLocale( ) );		csc.setLogger( logger );		rtc.setScriptContext( csc );		ScriptHandler sh = new ScriptHandler( );		rtc.setScriptHandler( sh );		// initialize scripthandler.		try		{			if ( externalContext != null					&& externalContext.getScriptable( ) != null )			{				sh.init( externalContext.getScriptable( ) );			}			else			{				sh.init( null );			}			sh.setRunTimeModel( cmRunTime );			final String sScriptContent = cmRunTime.getScript( );			if ( sScriptContent != null )			{				sh.register( sScriptContent );			}		}		catch ( ChartException sx )		{			throw new ChartException( ChartEnginePlugin.ID,					ChartException.GENERATION,					sx );		}		// Call the onPrepare script event function.		// not supported yet		/*		 * ScriptHandler.callFunction( sh, ScriptHandler.ON_PREPARE, cmRunTime,		 * rtc.getScriptContext( ) );		 */		return rtc;	}