Bug 130495 Get rid of SessionHandleAdapter
Now, we use SessionHandleAdapter to keep current active report deisng. That's a bad practive for editor swith and rebuild will cuase lots of problmes. Need find way to replace it.
UI/org.eclipse.birt.report.designer.ui.editors.schematic/src/org/eclipse/birt/report/designer/ui/editors/pages/ReportXMLSourceEditorFormPage.java
}
			else
			{
				try
				{
					SessionHandleAdapter.getInstance( )
							.getSessionHandle( )
							.openDesign( path.toOSString( ),
									new FileInputStream( path.toFile( ) ) );
				}
				catch ( DesignFileException e )
				{
					return getExpetionErrorLine( e );
				}
			}
		}
		catch ( FileNotFoundException e )
		{
			return 0;
		}
		return -1;
	}
	private int getExpetionErrorLine( DesignFileException e )
	{
		List errorList = e.getErrorList( );
		for ( Iterator iter = errorList.iterator( ); iter.hasNext( ); )
		{
			Object element = iter.next( );
			if ( element instanceof ErrorDetail )
			{