summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxwu2013-04-09 03:29:07 (EDT)
committerlzhu2013-04-09 03:29:07 (EDT)
commit6ba7f3797a1723541bf8a15f619c2ab76c454e48 (patch)
treee939ef7286b2d46789a5941380d9ae32d05deb6d
parent02544d1bb706c500f700cb6dff66a6acee918769 (diff)
downloadorg.eclipse.datatools.enablement.oda-6ba7f3797a1723541bf8a15f619c2ab76c454e48.zip
org.eclipse.datatools.enablement.oda-6ba7f3797a1723541bf8a15f619c2ab76c454e48.tar.gz
org.eclipse.datatools.enablement.oda-6ba7f3797a1723541bf8a15f619c2ab76c454e48.tar.bz2
Fix an issue - file filter don't work in flat file data set if use file
URI in data source[56993].
-rw-r--r--plugins/org.eclipse.datatools.connectivity.oda.flatfile.ui/src/org/eclipse/datatools/connectivity/oda/flatfile/ui/wizards/FileSelectionWizardPage.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/org.eclipse.datatools.connectivity.oda.flatfile.ui/src/org/eclipse/datatools/connectivity/oda/flatfile/ui/wizards/FileSelectionWizardPage.java b/plugins/org.eclipse.datatools.connectivity.oda.flatfile.ui/src/org/eclipse/datatools/connectivity/oda/flatfile/ui/wizards/FileSelectionWizardPage.java
index 53e0496..5bd4de0 100644
--- a/plugins/org.eclipse.datatools.connectivity.oda.flatfile.ui/src/org/eclipse/datatools/connectivity/oda/flatfile/ui/wizards/FileSelectionWizardPage.java
+++ b/plugins/org.eclipse.datatools.connectivity.oda.flatfile.ui/src/org/eclipse/datatools/connectivity/oda/flatfile/ui/wizards/FileSelectionWizardPage.java
@@ -31,6 +31,7 @@ import org.eclipse.datatools.connectivity.oda.OdaException;
import org.eclipse.datatools.connectivity.oda.design.DataSetDesign;
import org.eclipse.datatools.connectivity.oda.design.DataSourceDesign;
import org.eclipse.datatools.connectivity.oda.design.DesignFactory;
+import org.eclipse.datatools.connectivity.oda.design.Properties;
import org.eclipse.datatools.connectivity.oda.design.ResultSetColumns;
import org.eclipse.datatools.connectivity.oda.design.ResultSetDefinition;
import org.eclipse.datatools.connectivity.oda.design.ui.designsession.DesignSessionUtil;
@@ -268,6 +269,8 @@ public class FileSelectionWizardPage extends DataSetWizardPage
if ( dataSetDesign == null )
return; // nothing to initialize
+ updateFileFilterComboStatus( dataSetDesign );
+
String queryText = dataSetDesign.getQueryText( );
if ( queryText == null )
return; // nothing to initialize
@@ -1668,6 +1671,25 @@ public class FileSelectionWizardPage extends DataSetWizardPage
setPageComplete( false );
}
}
+
+ private void updateFileFilterComboStatus( DataSetDesign dataSetDesign )
+ {
+ Properties properties = dataSetDesign.getDataSourceDesign( )
+ .getPublicProperties( );
+ Object value = properties.getProperty( CommonConstants.CONN_HOME_DIR_PROP );
+ if ( value instanceof String )
+ {
+ String folder = (String) value;
+ if ( folder == null || folder.trim( ).length( ) == 0 )
+ {
+ fileFilter.getCombo( ).setEnabled( false );
+ }
+ }
+ else
+ {
+ fileFilter.getCombo( ).setEnabled( false );
+ }
+ }
/**
*