if ( !isSourceChanged && sourceHandle != null && !sourceHandle.getModuleHandle( ).isReadOnly( ) )
if ( !isSourceChanged && sourceHandle != null && !sourceHandle.getModuleHandle( ).isReadOnly( ) && !( new EcoreUtil.EqualityHelper( ).equals( createDataSourceDesign( sourceHandle ), sourceDesign ) ) )
	public void updateDataSetHandle( DataSetDesign setDesign,			OdaDataSetHandle setHandle, boolean isSourceChanged )			throws SemanticException	{		if ( setDesign == null || setHandle == null )			return;		DesignUtil.validateObject( setDesign );		CommandStack stack = setHandle.getModuleHandle( ).getCommandStack( );		stack.startTrans( null );		try		{			// extension id is set without undo/redo support.			setHandle.getElement( ).setProperty(					OdaDataSourceHandle.EXTENSION_ID_PROP,					setDesign.getOdaExtensionDataSetId( ) );			setHandle.setName( setDesign.getName( ) );			setHandle.setDisplayName( setDesign.getDisplayName( ) );			// set public properties.			Properties props = setDesign.getPublicProperties( );			if ( props != null )			{				EList propList = props.getProperties( );				for ( int i = 0; i < propList.size( ); i++ )				{					Property prop = (Property) propList.get( i );					setHandle.setProperty( prop.getName( ), prop.getValue( ) );				}			}			// updateROMPropertyBindings( props, setHandle );			// set private properties.			props = setDesign.getPrivateProperties( );			if ( props != null )			{				EList propList = props.getProperties( );				for ( int i = 0; i < propList.size( ); i++ )				{					Property prop = (Property) propList.get( i );					setHandle.setPrivateDriverProperty( prop.getName( ), prop							.getValue( ) );				}			}			updateROMDataSetParamList( setHandle, new DataSetParameterAdapter( )					.newROMSetParams( setDesign.getParameters( ), setDesign							.getOdaExtensionDataSourceId( ), setDesign							.getOdaExtensionDataSetId( ), setHandle ) );			ResultSetDefinition resultDefn = setDesign.getPrimaryResultSet( );			if ( resultDefn == null )			{				ResultSets resultSets = setDesign.getResultSets( );				if ( resultSets != null						&& !resultSets.getResultSetDefinitions( ).isEmpty( ) )					resultDefn = (ResultSetDefinition) resultSets							.getResultSetDefinitions( ).get( 0 );			}			updateROMStructureList( setHandle					.getPropertyHandle( OdaDataSetHandle.RESULT_SET_PROP ),					ResultSetsAdapter.newROMResultSets( resultDefn, setDesign							.getOdaExtensionDataSourceId( ), setDesign							.getOdaExtensionDataSetId( ) ) );			setHandle.setResultSetName( setDesign.getPrimaryResultSetName( ) );			setHandle.setQueryText( setDesign.getQueryText( ) );			DataSourceDesign sourceDesign = setDesign.getDataSourceDesign( );			if ( sourceDesign != null )			{				OdaDataSourceHandle sourceHandle = (OdaDataSourceHandle) setHandle						.getDataSource( );				// only the local data source can be used.				if ( isSourceChanged && sourceHandle != null						&& !sourceHandle.getModuleHandle( ).isReadOnly( ) )				{					setHandle.setDataSource( sourceDesign.getName( ) );					updateDataSourceHandle( sourceDesign, sourceHandle );				}				// if the source is not changed, and it is not in the included				// library, then we can update it.				if ( !isSourceChanged && sourceHandle != null						&& !sourceHandle.getModuleHandle( ).isReadOnly( ) )				{					updateDataSourceHandle( sourceDesign, sourceHandle );				}			}			else				setHandle.setDataSource( null );		}		catch ( SemanticException e )		{			stack.rollback( );			throw e;		}		stack.commit( );	}