Bug 193259 Enhance about the process of java script and event handler.[08]
Description: Enhance about the conflict of java script and event handler. I have a case, I design a report with script data source and script dataset. Previously I wrote java script for dataset in script view and it works. Then I decided to use event handler to process script dataset, I wrote a java class to extends ScriptedDataSetEventAdapter and overwrite open and fetch methods. As I want to keep the script in script view, I just comment them by /**/. Run the report will throw Exception. I found it's caused by comments in script view. If I deleted them, the report works. I attached the report and java class.
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/DtEScriptExecutor.java
{
	protected static final String DATA_SET = "DataSet";
	protected static final String DATA_SOURCE = "DataSource";
	protected static final String BEFORE_OPEN = "beforeOpen";
	protected static final String BEFORE_CLOSE = "beforeClose";
	protected static final String AFTER_OPEN = "afterOpen";
	protected static final String AFTER_CLOSE = "afterClose";
	protected ExecutionContext context;
	protected IReportContext reportContext;
	private JSMethodRunner runner;
	public DtEScriptExecutor( ExecutionContext context )
	{
		this.context = context;
		if ( context != null )
			this.reportContext = context.getReportContext( );
		else
			this.reportContext = null;
	}
	protected JSMethodRunner getRunner( Scriptable scope, String type,
			String name )
	{
		String scopeName = type + "[" + name + "]";
		runner = new JSMethodRunner( scope, scopeName );
		return runner;
	}
	protected JSScriptStatus handleJS( Scriptable scope, String type,
			String name, String method, String script )
	{
		if ( script == null || type == null || name == null || method == null || isComments( script ) )
			return JSScriptStatus.NO_RUN;