getView( DATA_EXPLORER_ID ).setFocus( ); dataTreeViewer.refresh( );
	public void testContainElement( ) throws Throwable	{		showPerspective( );		openEditor( );		getView( DATA_EXPLORER_ID ).setFocus( );		DataViewPage dataViewPage = (DataViewPage) ( (DataView) getView( DATA_EXPLORER_ID ) ).getCurrentPage( );		TreeViewer dataTreeViewer = (TreeViewer) PrivateAccessor.getField( dataViewPage,				"treeViewer" );		ContentOutlinePage outlinePage = (ContentOutlinePage) PrivateAccessor.getField( UIUtil.getActiveReportEditor( ),				"outlinePage" );		TreeViewer outlineTreeViewer = (TreeViewer) PrivateAccessor.getField( outlinePage,				"treeViewer" );		ReportDesignHandle reportHandle = (ReportDesignHandle) SessionHandleAdapter.getInstance( )				.getReportDesignHandle( );		DataSourceHandle dataSource = reportHandle.getElementFactory( )				.newOdaDataSource( null, null );		DataSetHandle dataSet = reportHandle.getElementFactory( )				.newScriptDataSet( null );		dataSet.setDataSource( dataSource.getName( ) );		ScalarParameterHandle param1 = reportHandle.getElementFactory( )				.newScalarParameter( "P1" );		ScalarParameterHandle param2 = reportHandle.getElementFactory( )				.newScalarParameter( "P2" );		ParameterGroupHandle paramGroup = reportHandle.getElementFactory( )				.newParameterGroup( null );		paramGroup.addElement( param2, ParameterGroupHandle.PARAMETERS_SLOT );		reportHandle.getDataSources( ).add( dataSource );		reportHandle.getDataSets( ).add( dataSet );		reportHandle.getParameters( ).add( param1 );		reportHandle.getParameters( ).add( paramGroup );		LabelHandle label1 = reportHandle.getElementFactory( ).newLabel( null );		LabelHandle label2 = reportHandle.getElementFactory( ).newLabel( null );		TextItemHandle text = reportHandle.getElementFactory( )				.newTextItem( null );		ListHandle list = reportHandle.getElementFactory( ).newList( null );		ListGroupHandle listGroup = reportHandle.getElementFactory( )				.newListGroup( );		listGroup.getHeader( ).add( label2 );		list.getDetail( ).add( text );		list.getGroups( ).add( listGroup );		reportHandle.getBody( ).add( label1 );		reportHandle.getBody( ).add( list );		getView( DATA_EXPLORER_ID ).setFocus( );		dataTreeViewer.refresh( );		getView( OUTLINE_ID ).setFocus( );		outlineTreeViewer.refresh( );		try		{			assertTrue( UIUtil.containElement( outlineTreeViewer, label1 ) );			assertTrue( UIUtil.containElement( outlineTreeViewer, label2 ) );			assertTrue( UIUtil.containElement( outlineTreeViewer, text ) );			assertTrue( UIUtil.containElement( outlineTreeViewer, list ) );			assertTrue( UIUtil.containElement( outlineTreeViewer, listGroup ) );			assertTrue( UIUtil.containElement( dataTreeViewer, dataSource ) );			assertTrue( UIUtil.containElement( dataTreeViewer, dataSet ) );			assertTrue( UIUtil.containElement( dataTreeViewer, param1 ) );			assertTrue( UIUtil.containElement( dataTreeViewer, paramGroup ) );			assertTrue( UIUtil.containElement( dataTreeViewer, param2 ) );			assertTrue( UIUtil.containElement( outlineTreeViewer, dataSource ) );			assertTrue( UIUtil.containElement( outlineTreeViewer, dataSet ) );			assertTrue( UIUtil.containElement( outlineTreeViewer, param1 ) );			assertTrue( UIUtil.containElement( outlineTreeViewer, paramGroup ) );			assertTrue( UIUtil.containElement( outlineTreeViewer, param2 ) );			assertFalse( UIUtil.containElement( dataTreeViewer, label1 ) );			assertFalse( UIUtil.containElement( dataTreeViewer, label2 ) );			assertFalse( UIUtil.containElement( dataTreeViewer, text ) );			assertFalse( UIUtil.containElement( dataTreeViewer, list ) );			assertFalse( UIUtil.containElement( dataTreeViewer, listGroup ) );		}		catch ( Throwable e )		{			throw e;		}		finally		{			closeEditor( );		}	}