Bug 322512 Refactor data set editor pages' codes[30357]
Build Identifier: Refactor data set editor pages' codes. Reproducible: Always
UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/ResultSetPreviewPage.java
throws InvocationTargetException, InterruptedException
			{
				monitor.beginTask( "", IProgressMonitor.UNKNOWN ); 
				if ( resultSetTable != null && !resultSetTable.isDisposed( ) )
				{
					ModuleHandle handle = null;
					DataSetHandle dsHandle = ( (DataSetEditor) getContainer( ) ).getHandle( );
					handle = dsHandle.getModuleHandle( );
					DataSetPreviewer previewer = new DataSetPreviewer(
							dsHandle, getMaxRowPreference( ));
					Map dataSetBindingMap = new HashMap( );
					Map dataSourceBindingMap = new HashMap( );
					try
					{
						clearProperyBindingMap( 
								dataSetBindingMap,
								dataSourceBindingMap );
						Map appContext = new HashMap( );
						
						ResourceIdentifiers identifiers = new ResourceIdentifiers( );
						String resouceIDs = ResourceIdentifiers.ODA_APP_CONTEXT_KEY_CONSUMER_RESOURCE_IDS;					
						identifiers.setApplResourceBaseURI( DTPUtil.getInstance( ).getBIRTResourcePath( ) );
						identifiers.setDesignResourceBaseURI( DTPUtil.getInstance( ).getReportDesignPath( ) );
						appContext.put( resouceIDs,identifiers);
					
						AppContextPopulator.populateApplicationContext( dsHandle, appContext );
						previewer.open( appContext, getEngineConfig( handle ) );
						IResultIterator itr = previewer.preview( ) ;
						metaData = itr.getResultMetaData( );
						populateRecords( itr );