summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxwu2013-01-22 01:16:12 (EST)
committer lzhu2013-01-22 01:16:12 (EST)
commit082dde8ee34f3755946abf8cbf93dc7dafde2dfd (patch)
tree184b6afd068ed28ce5570d6809c738f09f8766c6
parent618158080fd9904d90892cddf01d62f084321bcc (diff)
downloadorg.eclipse.datatools.enablement.oda-082dde8ee34f3755946abf8cbf93dc7dafde2dfd.zip
org.eclipse.datatools.enablement.oda-082dde8ee34f3755946abf8cbf93dc7dafde2dfd.tar.gz
org.eclipse.datatools.enablement.oda-082dde8ee34f3755946abf8cbf93dc7dafde2dfd.tar.bz2
CheckIn: Fix an issue Error message disappeared when issue isn'tv201301221416
resolved when change file for flat file dataset[55569].
-rw-r--r--plugins/org.eclipse.datatools.connectivity.oda.flatfile.ui/src/org/eclipse/datatools/connectivity/oda/flatfile/ui/i18n/messages.properties1
-rw-r--r--plugins/org.eclipse.datatools.connectivity.oda.flatfile.ui/src/org/eclipse/datatools/connectivity/oda/flatfile/ui/wizards/FileSelectionWizardPage.java34
2 files changed, 30 insertions, 5 deletions
diff --git a/plugins/org.eclipse.datatools.connectivity.oda.flatfile.ui/src/org/eclipse/datatools/connectivity/oda/flatfile/ui/i18n/messages.properties b/plugins/org.eclipse.datatools.connectivity.oda.flatfile.ui/src/org/eclipse/datatools/connectivity/oda/flatfile/ui/i18n/messages.properties
index 6d8c460..08c021d 100644
--- a/plugins/org.eclipse.datatools.connectivity.oda.flatfile.ui/src/org/eclipse/datatools/connectivity/oda/flatfile/ui/i18n/messages.properties
+++ b/plugins/org.eclipse.datatools.connectivity.oda.flatfile.ui/src/org/eclipse/datatools/connectivity/oda/flatfile/ui/i18n/messages.properties
@@ -110,5 +110,6 @@ FileSelectionWizardPage.MenuItem.removeAll=Remove All
FileSelectionWizardPage.error.selectColumn.EmptyName=The column name cannot be empty!
FileSelectionWizardPage.error.selectColumn.duplicatedFileName=The specified column name is duplicated!
+FileSelectionWizardPage.error.selectColumn.NoColumnSelected=At least one column should be selected.
RelativeFileSelectionDialog.Title.SelectFile=Select File
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 87524fb..8011a47 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
@@ -67,6 +67,8 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.MenuAdapter;
import org.eclipse.swt.events.MenuEvent;
import org.eclipse.swt.events.ModifyEvent;
@@ -123,9 +125,6 @@ public class FileSelectionWizardPage extends DataSetWizardPage
private static final String columnsInfoStartSymbol = "{"; //$NON-NLS-1$
private static final String columnsInfoEndSymbol = "}"; //$NON-NLS-1$
- private static String name = Messages.getString( "editor.title.name" ); //$NON-NLS-1$
- private static String dataType = Messages.getString( "editor.title.type" ); //$NON-NLS-1$
-
private static String[] dataTypeDisplayNames = new String[]{
Messages.getString( "datatypes.dateTime" ), //$NON-NLS-1$
Messages.getString( "datatypes.decimal" ), //$NON-NLS-1$
@@ -458,6 +457,7 @@ public class FileSelectionWizardPage extends DataSetWizardPage
public void mouseDoubleClick( MouseEvent e )
{
addColumns( );
+ validateSelectedColumns( );
}
} );
}
@@ -505,6 +505,7 @@ public class FileSelectionWizardPage extends DataSetWizardPage
public void widgetSelected( SelectionEvent e )
{
addColumns( );
+ validateSelectedColumns( );
}
} );
@@ -569,6 +570,7 @@ public class FileSelectionWizardPage extends DataSetWizardPage
{
removeColumns( );
updateButtons( );
+ validateSelectedColumns( );
}
} );
@@ -580,7 +582,9 @@ public class FileSelectionWizardPage extends DataSetWizardPage
{
removeAllColumns( );
updateButtons( );
+ validateSelectedColumns( );
}
+
} );
selectedColumnsViewer.getTable( ).setMenu( menu );
@@ -608,6 +612,24 @@ public class FileSelectionWizardPage extends DataSetWizardPage
} );
+ selectedColumnsViewer.getTable( ).addKeyListener( new KeyListener( ) {
+
+ public void keyPressed( KeyEvent e )
+ {
+ if ( e.keyCode == SWT.DEL )
+ {
+ removeColumns( );
+ updateButtons( );
+ validateSelectedColumns( );
+ }
+ }
+
+ public void keyReleased( KeyEvent e )
+ {
+
+ }
+ } );
+
setColumnsViewerContent( );
setColumnsViewerLabels( );
@@ -979,7 +1001,11 @@ public class FileSelectionWizardPage extends DataSetWizardPage
}
}
if ( savedSelectedColumnsInfoList.size( ) <= 0 )
+ {
+ setMessage( Messages.getString( "FileSelectionWizardPage.error.selectColumn.NoColumnSelected" ), //$NON-NLS-1$
+ ERROR );
pageComplete = false;
+ }
if ( pageComplete )
{
@@ -1752,8 +1778,6 @@ public class FileSelectionWizardPage extends DataSetWizardPage
updateSelectionFocus( );
updateButtons( );
- setMessage( DEFAULT_MESSAGE );
- setPageComplete( true );
}
/**