[339154] ODA DataSourceDesign attribute could be optional in a nested DataSetDesign
diff --git a/plugins/org.eclipse.datatools.connectivity.oda.design.ui/src/org/eclipse/datatools/connectivity/oda/design/internal/designsession/DesignSessionUtilBase.java b/plugins/org.eclipse.datatools.connectivity.oda.design.ui/src/org/eclipse/datatools/connectivity/oda/design/internal/designsession/DesignSessionUtilBase.java
index 78bc4e6..114161f 100644
--- a/plugins/org.eclipse.datatools.connectivity.oda.design.ui/src/org/eclipse/datatools/connectivity/oda/design/internal/designsession/DesignSessionUtilBase.java
+++ b/plugins/org.eclipse.datatools.connectivity.oda.design.ui/src/org/eclipse/datatools/connectivity/oda/design/internal/designsession/DesignSessionUtilBase.java
@@ -121,8 +121,9 @@
throws OdaException
{
java.util.Properties candidateProps = DesignUtil.convertDataSourceProperties( dataSourceDesign );
- IPropertyProvider propProvider =
- getPropertyProvider( dataSourceDesign.getOdaExtensionDataSourceId() );
+ IPropertyProvider propProvider = null;
+ if( dataSourceDesign != null )
+ propProvider = getPropertyProvider( dataSourceDesign.getOdaExtensionDataSourceId() );
if( propProvider == null ) // oda data source does not have own provider, use the system default
propProvider = getPropertyProvider( DEFAULT_PROPERTY_PROVIDER_ID );
diff --git a/plugins/org.eclipse.datatools.connectivity.oda.design/META-INF/MANIFEST.MF b/plugins/org.eclipse.datatools.connectivity.oda.design/META-INF/MANIFEST.MF
index de827be..de25196 100644
--- a/plugins/org.eclipse.datatools.connectivity.oda.design/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.datatools.connectivity.oda.design/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.datatools.connectivity.oda.design; singleton:=true
-Bundle-Version: 3.3.2.qualifier
+Bundle-Version: 3.3.3.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.datatools.connectivity.oda.design,
diff --git a/plugins/org.eclipse.datatools.connectivity.oda.design/model/DesignXML.xsd b/plugins/org.eclipse.datatools.connectivity.oda.design/model/DesignXML.xsd
index 161e97c..1008017 100644
--- a/plugins/org.eclipse.datatools.connectivity.oda.design/model/DesignXML.xsd
+++ b/plugins/org.eclipse.datatools.connectivity.oda.design/model/DesignXML.xsd
@@ -397,7 +397,7 @@
<xsd:documentation>A design-time data set definition.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
- <xsd:element maxOccurs="1" minOccurs="1" name="dataSourceDesign" type="design:DataSourceDesign">
+ <xsd:element maxOccurs="1" minOccurs="0" name="dataSourceDesign" type="design:DataSourceDesign">
<xsd:annotation>
<xsd:documentation>The instance of dataSourceDesign that supports this type of data set. Could be null, if nested within another dataSetDesign, to share the container's dataSourceDesign.</xsd:documentation>
</xsd:annotation>
diff --git a/plugins/org.eclipse.datatools.connectivity.oda.design/model/org.eclipse.datatools.connectivity.oda.design.ecore b/plugins/org.eclipse.datatools.connectivity.oda.design/model/org.eclipse.datatools.connectivity.oda.design.ecore
index 0efe75e..8186fa9 100644
--- a/plugins/org.eclipse.datatools.connectivity.oda.design/model/org.eclipse.datatools.connectivity.oda.design.ecore
+++ b/plugins/org.eclipse.datatools.connectivity.oda.design/model/org.eclipse.datatools.connectivity.oda.design.ecore
@@ -440,8 +440,8 @@
<details key="namespace" value="##targetNamespace"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="dataSourceDesign" lowerBound="1"
- eType="#//DataSourceDesign" containment="true" resolveProxies="false">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="dataSourceDesign" eType="#//DataSourceDesign"
+ containment="true" resolveProxies="false">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The instance of dataSourceDesign that supports this type of data set. Could be null, if nested within another dataSetDesign, to share the container's dataSourceDesign."/>
</eAnnotations>
diff --git a/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/DataSetDesign.java b/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/DataSetDesign.java
index 99444ec..ddfe876 100644
--- a/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/DataSetDesign.java
+++ b/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/DataSetDesign.java
@@ -1,6 +1,6 @@
/**
*************************************************************************
- * Copyright (c) 2005, 2010 Actuate Corporation.
+ * Copyright (c) 2005, 2011 Actuate Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,7 +11,7 @@
*
*************************************************************************
*
- * $Id: DataSetDesign.java,v 1.7 2009/03/13 05:19:46 lchan Exp $
+ * $Id: DataSetDesign.java,v 1.8 2010/02/17 02:20:40 lchan Exp $
*/
package org.eclipse.datatools.connectivity.oda.design;
@@ -52,7 +52,7 @@
* <!-- end-user-doc -->
* @generated
*/
- String copyright = "Copyright (c) 2005, 2010 Actuate Corporation"; //$NON-NLS-1$
+ String copyright = "Copyright (c) 2005, 2011 Actuate Corporation"; //$NON-NLS-1$
/**
* Returns the ODA data source element ID of the
@@ -126,7 +126,7 @@
* @return the value of the '<em>Data Source Design</em>' containment reference.
* @see #setDataSourceDesign(DataSourceDesign)
* @see org.eclipse.datatools.connectivity.oda.design.DesignPackage#getDataSetDesign_DataSourceDesign()
- * @model containment="true" required="true"
+ * @model containment="true"
* extendedMetaData="kind='element' name='dataSourceDesign' namespace='##targetNamespace'"
* @generated
*/
@@ -225,7 +225,7 @@
* @since 3.2.3
*/
String getDisplayNameKey();
-
+
/**
* Sets the resource key of the '{@link org.eclipse.datatools.connectivity.oda.design.DataSetDesign#getDisplayName <em>Display Name</em>}' attribute.
* @param value the new resource key of the '<em>Display Name</em>' attribute;
diff --git a/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/impl/DesignPackageImpl.java b/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/impl/DesignPackageImpl.java
index 4e2bebe..881f75d 100644
--- a/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/impl/DesignPackageImpl.java
+++ b/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/impl/DesignPackageImpl.java
@@ -1,6 +1,6 @@
/**
*************************************************************************
- * Copyright (c) 2005, 2010 Actuate Corporation.
+ * Copyright (c) 2005, 2011 Actuate Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,7 +11,7 @@
*
*************************************************************************
*
- * $Id: DesignPackageImpl.java,v 1.20 2010/08/17 03:57:02 lchan Exp $
+ * $Id: DesignPackageImpl.java,v 1.21 2010/10/15 05:41:37 lchan Exp $
*/
package org.eclipse.datatools.connectivity.oda.design.impl;
@@ -109,7 +109,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public static final String copyright = "Copyright (c) 2005, 2010 Actuate Corporation"; //$NON-NLS-1$
+ public static final String copyright = "Copyright (c) 2005, 2011 Actuate Corporation"; //$NON-NLS-1$
/**
* <!-- begin-user-doc -->
@@ -3937,7 +3937,7 @@
getDataSetDesign_DataSourceDesign(),
this.getDataSourceDesign(),
null,
- "dataSourceDesign", null, 1, 1, DataSetDesign.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED ); //$NON-NLS-1$
+ "dataSourceDesign", null, 0, 1, DataSetDesign.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED ); //$NON-NLS-1$
initEReference(
getDataSetDesign_Query(),
this.getDataSetQuery(),
diff --git a/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/util/DesignUtil.java b/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/util/DesignUtil.java
index f556069..a6fa931 100644
--- a/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/util/DesignUtil.java
+++ b/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/util/DesignUtil.java
@@ -1,6 +1,6 @@
/**
*************************************************************************
- * Copyright (c) 2006, 2010 Actuate Corporation.
+ * Copyright (c) 2006, 2011 Actuate Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,7 +11,7 @@
*
*************************************************************************
*
- * $Id: DesignUtil.java,v 1.19 2010/02/17 02:20:41 lchan Exp $
+ * $Id: DesignUtil.java,v 1.20 2010/03/04 01:27:57 lchan Exp $
*/
package org.eclipse.datatools.connectivity.oda.design.util;
@@ -223,6 +223,9 @@
*/
public static java.util.Properties convertDataSourceProperties( DataSourceDesign dataSourceDesign )
{
+ if( dataSourceDesign == null )
+ return new java.util.Properties();
+
java.util.Properties publicProps = convertDesignProperties(
dataSourceDesign.getPublicProperties() );
java.util.Properties propCollection = convertDesignProperties(
diff --git a/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/util/DesignValidator.java b/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/util/DesignValidator.java
index 572d347..bc1a97c 100644
--- a/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/util/DesignValidator.java
+++ b/plugins/org.eclipse.datatools.connectivity.oda.design/src/org/eclipse/datatools/connectivity/oda/design/util/DesignValidator.java
@@ -1,6 +1,6 @@
/*
*************************************************************************
- * Copyright (c) 2006, 2007 Actuate Corporation.
+ * Copyright (c) 2006, 2011 Actuate Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -40,7 +40,7 @@
protected boolean validate_MultiplicityConforms( EObject eObject,
EStructuralFeature eFeature,
DiagnosticChain diagnostics,
- Map context )
+ Map<Object, Object> context )
{
// use extended validator method for selected ODA Design classes
if( isDataSetQueryObject( eObject ) )
@@ -48,6 +48,11 @@
return validate_DataSetQuery_MultiplicityConforms( eObject, eFeature,
diagnostics, context );
}
+ else if( isDataSetDesignObject( eObject ) )
+ {
+ return validate_DataSetDesign_MultiplicityConforms( eObject, eFeature,
+ diagnostics, context );
+ }
// use default validator
return super.validate_MultiplicityConforms( eObject, eFeature,
@@ -63,12 +68,20 @@
}
/**
+ * Determines whether the specific EObject is a DataSetDesign type.
+ */
+ private boolean isDataSetDesignObject( EObject eObject )
+ {
+ return ( eObject.eClass() == DesignPackage.Literals.DATA_SET_DESIGN );
+ }
+
+ /**
* Specialized validator for the DataSetQuery EObject.
*/
protected boolean validate_DataSetQuery_MultiplicityConforms( EObject eObject,
EStructuralFeature eFeature,
DiagnosticChain diagnostics,
- Map context )
+ Map<Object, Object> context )
{
if( isDataSetQueryObject( eObject ) &&
eFeature.isRequired() )
@@ -80,14 +93,7 @@
if( diagnostics != null )
{
diagnostics.add(
- new BasicDiagnostic( Diagnostic.WARNING,
- DIAGNOSTIC_SOURCE,
- EOBJECT__EVERY_MULTIPCITY_CONFORMS,
- getEcoreResourceLocator().getString(
- "_UI_RequiredFeatureMustBeSet_diagnostic", //$NON-NLS-1$
- new Object[] { getFeatureLabel( eFeature, context),
- getObjectLabel( eObject, context ) } ),
- new Object[] { eObject, eFeature } ));
+ newRequiredFeatureDiagnostic( Diagnostic.WARNING, eObject, eFeature, context ));
}
return true; // ok to continue with validation
}
@@ -97,4 +103,51 @@
diagnostics, context );
}
+ /**
+ * Specialized validator for the DataSetDesign EObject.
+ */
+ protected boolean validate_DataSetDesign_MultiplicityConforms( EObject eObject,
+ EStructuralFeature eFeature,
+ DiagnosticChain diagnostics,
+ Map<Object, Object> context )
+ {
+ // validating the DataSourceDesign attribute in a DataSetDesign object
+ if( isDataSetDesignObject( eObject ) &&
+ eFeature.getFeatureID() == DesignPackage.DATA_SET_DESIGN__DATA_SOURCE_DESIGN )
+ {
+ if( eObject.eIsSet( eFeature ) )
+ return true; // is valid; optional attribute is set
+
+ // a DataSourceDesign is optional only when its containing DataSetDesign
+ // is contained by a DynamicValuesQuery
+ if( eObject.eContainer().eClass() == DesignPackage.Literals.DYNAMIC_VALUES_QUERY )
+ return true;
+
+ // required attribute is not set
+ if( diagnostics != null )
+ {
+ diagnostics.add(
+ newRequiredFeatureDiagnostic( Diagnostic.ERROR, eObject, eFeature, context ));
+ }
+ return false;
+ }
+
+ // use default validator implementation for other attributes/features
+ return super.validate_MultiplicityConforms( eObject, eFeature,
+ diagnostics, context );
+ }
+
+ private BasicDiagnostic newRequiredFeatureDiagnostic( int severity,
+ EObject eObject, EStructuralFeature eFeature, Map<Object, Object> context)
+ {
+ return new BasicDiagnostic( severity,
+ DIAGNOSTIC_SOURCE,
+ EOBJECT__EVERY_MULTIPCITY_CONFORMS,
+ getEcoreResourceLocator().getString(
+ "_UI_RequiredFeatureMustBeSet_diagnostic", //$NON-NLS-1$
+ new Object[]{ getFeatureLabel( eFeature, context),
+ getObjectLabel( eObject, context )} ),
+ new Object[] { eObject, eFeature } );
+ }
+
}
diff --git a/releng/org.eclipse.datatools.connectivity.releng/maps/connectivity-plugins.map b/releng/org.eclipse.datatools.connectivity.releng/maps/connectivity-plugins.map
index 81ffd18..51a40e6 100644
--- a/releng/org.eclipse.datatools.connectivity.releng/maps/connectivity-plugins.map
+++ b/releng/org.eclipse.datatools.connectivity.releng/maps/connectivity-plugins.map
@@ -10,8 +10,8 @@
plugin@org.eclipse.datatools.connectivity.oda.profile=v201007150318,:ext:xgu@dev.eclipse.org:/cvsroot/datatools,,org.eclipse.datatools.connectivity/plugins/org.eclipse.datatools.connectivity.oda.profile
plugin@org.eclipse.datatools.connectivity.oda.flatfile=v201101261152,:ext:xgu@dev.eclipse.org:/cvsroot/datatools,,org.eclipse.datatools.connectivity/plugins/org.eclipse.datatools.connectivity.oda.flatfile
plugin@org.eclipse.datatools.connectivity.oda.flatfile.ui=v201101261152,:ext:xgu@dev.eclipse.org:/cvsroot/datatools,,org.eclipse.datatools.connectivity/plugins/org.eclipse.datatools.connectivity.oda.flatfile.ui
-plugin@org.eclipse.datatools.connectivity.oda.design=v201012150952,:ext:xgu@dev.eclipse.org:/cvsroot/datatools,,org.eclipse.datatools.connectivity/plugins/org.eclipse.datatools.connectivity.oda.design
-plugin@org.eclipse.datatools.connectivity.oda.design.ui=v201102261335,:ext:xgu@dev.eclipse.org:/cvsroot/datatools,,org.eclipse.datatools.connectivity/plugins/org.eclipse.datatools.connectivity.oda.design.ui
+plugin@org.eclipse.datatools.connectivity.oda.design=v201103090701,:ext:xgu@dev.eclipse.org:/cvsroot/datatools,,org.eclipse.datatools.connectivity/plugins/org.eclipse.datatools.connectivity.oda.design
+plugin@org.eclipse.datatools.connectivity.oda.design.ui=v201103090701,:ext:xgu@dev.eclipse.org:/cvsroot/datatools,,org.eclipse.datatools.connectivity/plugins/org.eclipse.datatools.connectivity.oda.design.ui
plugin@org.eclipse.datatools.connectivity.oda.consumer=v201102051101,:ext:xgu@dev.eclipse.org:/cvsroot/datatools,,org.eclipse.datatools.connectivity/plugins/org.eclipse.datatools.connectivity.oda.consumer
plugin@org.eclipse.datatools.help=v200906020553,:ext:xgu@dev.eclipse.org:/cvsroot/datatools,,org.eclipse.datatools.build/org.eclipse.datatools.help
plugin@org.eclipse.datatools.oda.cshelp=v200907031118,:ext:xgu@dev.eclipse.org:/cvsroot/datatools,,org.eclipse.datatools.build/org.eclipse.datatools.oda.cshelp
diff --git a/tests/org.eclipse.datatools.connectivity.oda.design.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.datatools.connectivity.oda.design.tests/META-INF/MANIFEST.MF
index 5aa0f76..d3afaa5 100644
--- a/tests/org.eclipse.datatools.connectivity.oda.design.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.datatools.connectivity.oda.design.tests/META-INF/MANIFEST.MF
@@ -7,7 +7,7 @@
Bundle-Vendor: Eclipse.org
Export-Package: org.eclipse.datatools.connectivity.oda.design.tests
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.datatools.connectivity.oda.design;bundle-version="[3.2.3,4.0.0)";visibility:=reexport,
+ org.eclipse.datatools.connectivity.oda.design;bundle-version="[3.3.3,4.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.xmi;bundle-version="[2.4.0,3.0.0)";visibility:=reexport,
org.junit;bundle-version="[3.8.2,4.0.0)";visibility:=reexport
Eclipse-LazyStart: true
diff --git a/tests/org.eclipse.datatools.connectivity.oda.design.tests/src/org/eclipse/datatools/connectivity/oda/design/tests/DesignUtilLoadSaveTest.java b/tests/org.eclipse.datatools.connectivity.oda.design.tests/src/org/eclipse/datatools/connectivity/oda/design/tests/DesignUtilLoadSaveTest.java
index e91451d..a13b930 100644
--- a/tests/org.eclipse.datatools.connectivity.oda.design.tests/src/org/eclipse/datatools/connectivity/oda/design/tests/DesignUtilLoadSaveTest.java
+++ b/tests/org.eclipse.datatools.connectivity.oda.design.tests/src/org/eclipse/datatools/connectivity/oda/design/tests/DesignUtilLoadSaveTest.java
@@ -1,6 +1,6 @@
/*
*************************************************************************
- * Copyright (c) 2007, 2010 Actuate Corporation.
+ * Copyright (c) 2007, 2011 Actuate Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -37,7 +37,9 @@
import org.eclipse.datatools.connectivity.oda.design.DataSetParameters;
import org.eclipse.datatools.connectivity.oda.design.DataSourceDesign;
import org.eclipse.datatools.connectivity.oda.design.DesignFactory;
+import org.eclipse.datatools.connectivity.oda.design.DesignSessionResponse;
import org.eclipse.datatools.connectivity.oda.design.DynamicFilterExpression;
+import org.eclipse.datatools.connectivity.oda.design.DynamicValuesQuery;
import org.eclipse.datatools.connectivity.oda.design.ExpressionArguments;
import org.eclipse.datatools.connectivity.oda.design.ExpressionParameterDefinition;
import org.eclipse.datatools.connectivity.oda.design.ExpressionVariable;
@@ -243,7 +245,7 @@
ExpressionArguments exprArgs2 = DesignFactory.eINSTANCE.createExpressionArguments();
newStaticParamDefn = exprArgs2.addStaticParameter( "static value 1" ); //$NON-NLS-1$
- newStaticParamDefn.addStaticValue( "static value 2 " );
+ newStaticParamDefn.addStaticValue( "static value 2 " ); //$NON-NLS-1$
customExpr2.setContextArguments( exprArgs2 );
assertTrue( newStaticParamDefn.hasEffectiveStaticValues() );
@@ -259,7 +261,7 @@
dynamicFilterExpr.setIsOptional( false );
FilterExpressionType defaultType = DesignFactory.eINSTANCE.createFilterExpressionType();
defaultType.setDeclaringExtensionId( filterExprExtId );
- defaultType.setId( "10005" );
+ defaultType.setId( "10005" ); //$NON-NLS-1$
dynamicFilterExpr.setDefaultType( defaultType );
assertEquals( defaultType, dynamicFilterExpr.getDefaultType() );
@@ -472,8 +474,7 @@
}
assertTrue( hasException );
}
-
-
+
public void testAddResourceFileName()
{
File goldenFile = new File( getSampleDbTestFilePath() );
@@ -497,6 +498,55 @@
assertTrue( hasException );
}
+ public void testNullDataSourceDesignRef()
+ {
+ File goldenFile = new File( getSampleDbTestFilePath() );
+ OdaDesignSession design = loadOdaDesignSession( goldenFile );
+ DataSetDesign dataSetDesign = design.getResponseDataSetDesign();
+
+ dataSetDesign.setDataSourceDesign( null );
+
+ // test invalid null DataSourceDesign reference
+ DesignSessionResponse designResponse = design.getResponse();
+ boolean hasException = false;
+ try
+ {
+ DesignUtil.validateObject( designResponse );
+ }
+ catch( IllegalStateException ex )
+ {
+ hasException = true;
+ }
+ assertTrue( hasException );
+
+ // test valid null DataSourceDesign reference in DynamicValuesQuery
+ design = loadOdaDesignSession( goldenFile ); // reload original content
+ dataSetDesign = design.getResponseDataSetDesign();
+ DataSetParameters dataSetParams = dataSetDesign.getParameters();
+ for( ParameterDefinition aParamDefn : dataSetParams.getParameterDefinitions() )
+ {
+ DataSetDesign nestedDataSetDesign = (DataSetDesign) EcoreUtil.copy( dataSetDesign );
+ nestedDataSetDesign.setDataSourceDesign( null ); // set nested data set to reference a null data source
+
+ DynamicValuesQuery dynamicQuery = DesignFactory.eINSTANCE.createDynamicValuesQuery();
+ dynamicQuery.setDataSetDesign( nestedDataSetDesign );
+ dynamicQuery.setValueColumn( "1" ); //$NON-NLS-1$
+
+ InputElementAttributes inputElementAttrs = aParamDefn.getInputAttributes().getElementAttributes();
+ inputElementAttrs.setDynamicValueChoices( dynamicQuery );
+ }
+ // test the null reference in this case is valid
+ designResponse = design.getResponse();
+ try
+ {
+ DesignUtil.validateObject( designResponse );
+ }
+ catch( IllegalStateException ex )
+ {
+ fail(); // not expecting a validation error
+ }
+ }
+
private void saveDesignSession( OdaDesignSession design, File tempOut )
{
try