implemented 1416503, automatic closing of braces
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / actions / DeleteAllRowsAction.java
index 09f67bd..439f8ad 100644 (file)
@@ -6,6 +6,7 @@ import com.quantum.Messages;
 import com.quantum.model.ConnectionException;
 import com.quantum.model.Table;
 import com.quantum.ui.dialog.ExceptionDisplayDialog;
+import com.quantum.ui.dialog.SQLExceptionDialog;
 import com.quantum.view.bookmark.EntityNode;
 
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -30,22 +31,21 @@ public class DeleteAllRowsAction extends SelectionListenerAction {
        }
 
        public void run() {
+        Table table = getTable();
         try {
-            Table table = getTable();
                        if (table != null) {
                                boolean flag = MessageDialog.openConfirm(
                     view.getSite().getShell(), 
                     Messages.getString(DeleteAllRowsAction.class.getName() + ".confirmTitle"),
                     Messages.getString(DeleteAllRowsAction.class.getName() + ".confirmText",  
-                    new Object[] { table.getCondQualifiedName() }));
+                    new Object[] { table.getQualifiedName() }));
                                if (flag) {
                                        table.deleteAllRows();
                                }
                        }
         } catch (SQLException e) {
-            ExceptionDisplayDialog.openError(getShell(), 
-                Messages.getString("ExecuteAgainstAction.title"), 
-                Messages.getString("ExecuteAgainstAction.ConnectionException"), e);
+            SQLExceptionDialog.openException(getShell(), 
+                       table == null ? null : table.getBookmark(), e);
         } catch (ConnectionException e) {
             ExceptionDisplayDialog.openError(getShell(), 
                 Messages.getString("ExecuteAgainstAction.title"),