Revision: 3658
Author: [email protected]
Date: Wed Jun 30 09:06:21 2010
Log: NEW - bug 2458: Create Critic Manager
http://trillian.sqlpower.ca/bugzilla/show_bug.cgi?id=2458
Replaced the ugly old quick fix dialog with a new critic dialog based on
the critic system. This is essentially the same table that appears at the
bottom of the play pen with some extra buttons.
http://code.google.com/p/power-architect/source/detail?r=3658
Added:
/trunk/src/main/java/ca/sqlpower/architect/swingui/critic/QuickFixListCellRenderer.java
/trunk/src/main/resources/icons/lightbulb.png
/trunk/src/main/resources/icons/lightbulb_off.png
Modified:
/trunk/src/main/java/ca/sqlpower/architect/swingui/action/ExportDDLAction.java
/trunk/src/main/java/ca/sqlpower/architect/swingui/critic/CriticPanel.java
/trunk/src/main/java/ca/sqlpower/architect/swingui/critic/CriticSwingUtil.java
/trunk/src/main/java/ca/sqlpower/architect/swingui/critic/CriticismTableModel.java
/trunk/src/main/resources/ca/sqlpower/architect/swingui/action/messages.properties
=======================================
--- /dev/null
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/critic/QuickFixListCellRenderer.java
Wed Jun 30 09:06:21 2010
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2010, SQL Power Group Inc.
+ *
+ * This file is part of SQL Power Architect.
+ *
+ * SQL Power Architect is free software; you can redistribute it and/or
modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * SQL Power Architect is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package ca.sqlpower.architect.swingui.critic;
+
+import java.awt.Component;
+import java.util.List;
+
+import javax.swing.ImageIcon;
+import javax.swing.JLabel;
+import javax.swing.JTable;
+import javax.swing.table.DefaultTableCellRenderer;
+
+import ca.sqlpower.swingui.SPSUtils;
+
+/**
+ * This table cell renderer will render lists of quick fix objects.
+ */
+public class QuickFixListCellRenderer extends DefaultTableCellRenderer {
+
+ /**
+ * An image that represents quick fixes are available to use for
fixing the
+ * current error.
+ */
+ public static final ImageIcon QUICK_FIX_IMAGE =
SPSUtils.createIcon("lightbulb", "quick fix");
+
+ /**
+ * An image that represents there are no quick fixes available to use
for fixing
+ * the current error even though the error exists.
+ */
+ public static final ImageIcon NO_QUICK_FIX_IMAGE =
SPSUtils.createIcon("lightbulb_off", "no quick fixes");
+
+ @Override
+ public Component getTableCellRendererComponent(JTable table, final
Object value, boolean isSelected, boolean hasFocus,
+ int row, int column) {
+ if (value instanceof List<?>) {
+ if (((List<?>) value).isEmpty()) {
+ return new JLabel(NO_QUICK_FIX_IMAGE);
+ } else {
+ return new JLabel(QUICK_FIX_IMAGE);
+ }
+ } else {
+ return super.getTableCellRendererComponent(table, value,
isSelected, hasFocus, row, column);
+ }
+ }
+
+}
=======================================
--- /dev/null
+++ /trunk/src/main/resources/icons/lightbulb.png Wed Jun 30 09:06:21 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/src/main/resources/icons/lightbulb_off.png Wed Jun 30 09:06:21
2010
Binary file, no diff available.
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/action/ExportDDLAction.java
Mon Jun 14 09:32:54 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/action/ExportDDLAction.java
Wed Jun 30 09:06:21 2010
@@ -18,26 +18,20 @@
*/
package ca.sqlpower.architect.swingui.action;
-import java.awt.BorderLayout;
-import java.awt.Dimension;
-import java.awt.GridLayout;
import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.SQLException;
-import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
-import java.util.concurrent.atomic.AtomicInteger;
-
+
+import javax.swing.AbstractAction;
import javax.swing.JButton;
-import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
+import javax.swing.JTable;
import javax.swing.JTextArea;
-import javax.swing.ScrollPaneConstants;
import javax.swing.SwingUtilities;
import org.apache.log4j.Logger;
@@ -45,21 +39,22 @@
import ca.sqlpower.architect.ddl.ConflictResolver;
import ca.sqlpower.architect.ddl.DDLGenerator;
import ca.sqlpower.architect.ddl.DDLStatement;
-import ca.sqlpower.architect.ddl.DDLWarning;
-import ca.sqlpower.architect.ddl.DDLWarningComponent;
-import ca.sqlpower.architect.ddl.ObjectPropertyModificationDDLComponent;
+import ca.sqlpower.architect.ddl.critic.Criticism;
+import ca.sqlpower.architect.ddl.critic.CriticismBucket;
import ca.sqlpower.architect.swingui.ASUtils;
import ca.sqlpower.architect.swingui.ArchitectSwingSession;
import ca.sqlpower.architect.swingui.DDLExportPanel;
import ca.sqlpower.architect.swingui.SQLScriptDialog;
+import ca.sqlpower.architect.swingui.critic.CriticSwingUtil;
import ca.sqlpower.sqlobject.SQLDatabase;
import ca.sqlpower.sqlobject.SQLObjectException;
-import ca.sqlpower.swingui.DataEntryPanel;
import ca.sqlpower.swingui.DataEntryPanelBuilder;
import ca.sqlpower.swingui.SPSwingWorker;
+import ca.sqlpower.swingui.table.TableUtils;
import com.jgoodies.forms.builder.ButtonBarBuilder;
-import com.jgoodies.forms.factories.Borders;
+import com.jgoodies.forms.builder.DefaultFormBuilder;
+import com.jgoodies.forms.layout.FormLayout;
public class ExportDDLAction extends AbstractArchitectAction {
@@ -80,150 +75,135 @@
Callable<Boolean> okCall, cancelCall;
okCall = new Callable<Boolean>() {
public Boolean call() {
- try {
- if (ddlPanel.applyChanges()) {
-
- DDLGenerator ddlg = ddlPanel.getGenerator();
-
ddlg.setTargetSchema(ddlPanel.getSchemaField().getText());
-
- boolean done = false;
- while (!done) {
- // generate DDL in order to come up with a
list of warnings
-
ddlg.generateDDLScript(session.getTargetDatabase().getTables());
- final List<DDLWarning> warnings =
ddlg.getWarnings();
- final JPanel outerPanel = new JPanel();
- if (warnings.size() == 0) {
- done = true;
- } else {
- final List<DDLWarningComponent>
warningComponents = new ArrayList<DDLWarningComponent>();
- DataEntryPanel dialogPanel = new
DataEntryPanel() {
-
- public boolean applyChanges() {
- return false;
- }
-
- public void discardChanges() {
- }
-
- public JComponent getPanel() {
- outerPanel.setLayout(new
BorderLayout());
- JTextArea explanation = new
JTextArea(GENDDL_WARNINGS_EXPLANATION, 5, 60);
- explanation.setLineWrap(true);
- explanation.setWrapStyleWord(true);
- explanation.setEditable(false);
-
explanation.setBackground(outerPanel.getBackground());
- outerPanel.add(explanation,
BorderLayout.NORTH);
- JPanel listBoxPanel = new JPanel();
- listBoxPanel.setLayout(new
GridLayout(0, 1, 5, 5));
-
- for (Object o : warnings) {
- DDLWarning ddlwarning =
(DDLWarning) o;
- DDLWarningComponent
ddlWarningComponent = new
ObjectPropertyModificationDDLComponent(ddlwarning);
-
listBoxPanel.add(ddlWarningComponent.getComponent());
-
warningComponents.add(ddlWarningComponent);
- }
-
- JScrollPane sp = new
JScrollPane(listBoxPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
- if (warnings.size() > 9) {
- Dimension d = new
Dimension(400,400);
- sp.setPreferredSize(d);
- }
- outerPanel.add(sp,
BorderLayout.CENTER);
- return outerPanel;
- }
-
- public boolean hasUnsavedChanges() {
- // TODO return whether this panel
has been changed
- return false;
- }
- };
- String[] options = {
-
Messages.getString("ExportDDLAction.quickFixAllOption"), //$NON-NLS-1$
-
Messages.getString("ExportDDLAction.ignoreWarningsOption"), //$NON-NLS-1$
-
Messages.getString("ExportDDLAction.cancelOption"), //$NON-NLS-1$
-
Messages.getString("ExportDDLAction.recheckOption") //$NON-NLS-1$
- };
-
- // This used to be a JOptionPane, but a
resize bug made me change
- // it to this. The whole thing is a
disaster and will go away when
- // critics are ready.
- final JDialog warningDialog = new
JDialog(frame, true);
-
warningDialog.setTitle(Messages.getString("ExportDDLAction.errorsInDDLDialogTitle"));
-
- ButtonBarBuilder bbb = new
ButtonBarBuilder();
- bbb.setDefaultButtonBarGapBorder();
- final AtomicInteger dialogChoice = new
AtomicInteger(-1);
- for (int i = 0; i < options.length; i++) {
- final int ii = i;
- JButton button = new
JButton(options[i]);
- button.addActionListener(new
ActionListener() {
- public void
actionPerformed(ActionEvent e) {
- dialogChoice.set(ii);
- warningDialog.dispose();
- }
- });
- bbb.addGridded(button);
- }
-
- JPanel p = new JPanel(new BorderLayout());
- p.add(dialogPanel.getPanel(),
BorderLayout.CENTER);
- p.add(bbb.getPanel(), BorderLayout.SOUTH);
- p.setBorder(Borders.DIALOG_BORDER);
-
- warningDialog.setContentPane(p);
- warningDialog.pack();
- warningDialog.setLocationRelativeTo(d);
- warningDialog.setVisible(true); // modal
dialog blocks
-
- logger.debug(dialogChoice.get());
- switch (dialogChoice.get()) {
- case 0:
- for (DDLWarning warning : warnings) {
- if (warning.isQuickFixable()) {
- warning.quickFix();
- }
- }
- break;
- case 1:
- done = true;
- break;
- case 2: // "Cancel"
- case -1: // no button was pressed--kill
dialog
- return true;
- case 3: // apply all changes made
- for (DDLWarningComponent
warningComponent : warningComponents) {
- warningComponent.applyChanges();
- }
- break;
- }
- } // end of main while loop
- }
-
- SQLDatabase ppdb = new
SQLDatabase(ddlPanel.getTargetDB());
- SQLScriptDialog ssd =
- new SQLScriptDialog(d,
Messages.getString("ExportDDLAction.previewSQLScriptDialogTitle"), "",
false, //$NON-NLS-1$ //$NON-NLS-2$
- ddlg,
- ppdb.getDataSource(),
- true,
- session);
- SPSwingWorker scriptWorker = ssd.getExecuteTask();
- ConflictFinderProcess cfp = new
ConflictFinderProcess(ssd, ppdb, ddlg, ddlg.getDdlStatements(), session);
- ConflictResolverProcess crp = new
ConflictResolverProcess(ssd, cfp, session);
- cfp.setNextProcess(crp);
- crp.setNextProcess(scriptWorker);
- ssd.setExecuteTask(cfp);
- ssd.setVisible(true);
- }
- } catch (SQLException ex) {
- ASUtils.showExceptionDialog
- (session,
-
Messages.getString("ExportDDLAction.errorGeneratingDDL"), ex); //$NON-NLS-1$
- } catch (Exception ex) {
- ASUtils.showExceptionDialog
+ if (ddlPanel.applyChanges()) {
+
+ DDLGenerator ddlg = ddlPanel.getGenerator();
+
ddlg.setTargetSchema(ddlPanel.getSchemaField().getText());
+
+ checkErrorsAndGenerateDDL(ddlg);
+
+ }
+ return Boolean.TRUE;
+ }
+
+ /**
+ * This method will run the known critics over the target
database
+ * that we want to generate a DDL script for and display a
dialog
+ * containing errors if any are found. The user will then have
the
+ * choice to fix their data model or continue on ignoring the
+ * current set of errors.
+ * <p>
+ * This method will also generate the DDL script using the
+ * generateAndDisplayDDL method.
+ */
+ private void checkErrorsAndGenerateDDL(final DDLGenerator
ddlg) {
+ List<Criticism> criticisms =
session.getWorkspace().getCriticManager().criticize(session.getTargetDatabase());
+ if (criticisms.isEmpty()) {
+ try {
+ generateAndDisplayDDL(ddlPanel, ddlg);
+ } catch (Exception ex) {
+ ASUtils.showExceptionDialog
(session,
Messages.getString("ExportDDLAction.errorGeneratingDDLScript"), ex);
//$NON-NLS-1$
- }
- return Boolean.FALSE;
+ }
+ } else {
+ //build warning dialog
+ final JDialog warningDialog = new JDialog(frame);
+ JPanel mainPanel = new JPanel();
+ DefaultFormBuilder builder = new
DefaultFormBuilder(new FormLayout("pref"), mainPanel);
+ builder.setDefaultDialogBorder();
+ JTextArea explanation = new
JTextArea(GENDDL_WARNINGS_EXPLANATION, 5, 60);
+ explanation.setLineWrap(true);
+ explanation.setWrapStyleWord(true);
+ explanation.setEditable(false);
+ explanation.setBackground(mainPanel.getBackground());
+ builder.append(explanation);
+ builder.nextLine();
+
+ final CriticismBucket bucket = new CriticismBucket();
+ bucket.updateCriticismsToMatch(criticisms);
+ JTable errorTable =
CriticSwingUtil.createCriticTable(session, bucket);
+ builder.append(new JScrollPane(errorTable));
+ builder.nextLine();
+
+ JButton quickFixButton = new JButton(
+ new
AbstractAction(Messages.getString("ExportDDLAction.quickFixAllOption")) {
//$NON-NLS-1$
+ public void actionPerformed(ActionEvent e) {
+ warningDialog.dispose();
+ for (Criticism criticism :
bucket.getCriticisms()) {
+ if (!criticism.getFixes().isEmpty()) {
+ //applying the first one each time as
there is no
+ //decision what to apply by the user
for this case
+ criticism.getFixes().get(0).apply();
+ }
+ }
+ checkErrorsAndGenerateDDL(ddlg);
+ }
+ });
+ JButton ignoreButton = new JButton(new AbstractAction(
+
Messages.getString("ExportDDLAction.ignoreWarningsOption")) { //$NON-NLS-1$
+ public void actionPerformed(ActionEvent e) {
+ warningDialog.dispose();
+ try {
+ generateAndDisplayDDL(ddlPanel, ddlg);
+ } catch (Exception ex) {
+ ASUtils.showExceptionDialog
+ (session,
+
Messages.getString("ExportDDLAction.errorGeneratingDDLScript"), ex);
//$NON-NLS-1$
+ } }
+ });
+ JButton cancelButton = new JButton(new AbstractAction(
+
Messages.getString("ExportDDLAction.cancelOption")) { //$NON-NLS-1$
+ public void actionPerformed(ActionEvent e) {
+ //just dispose of the dialog and end this.
+ warningDialog.dispose();
+ }
+ });
+ JButton recheckButton = new JButton(new AbstractAction(
+
Messages.getString("ExportDDLAction.recheckOption")) { //$NON-NLS-1$
+ public void actionPerformed(ActionEvent e) {
+ warningDialog.dispose();
+ checkErrorsAndGenerateDDL(ddlg);
+ }
+ });
+
+ ButtonBarBuilder buttonBar = new ButtonBarBuilder();
+ buttonBar.addGlue();
+ buttonBar.addGriddedButtons(new JButton[]
{quickFixButton,
+ ignoreButton, cancelButton, recheckButton});
+
+ builder.append(buttonBar.getPanel());
+ warningDialog.add(mainPanel);
+
+ warningDialog.pack();
+ TableUtils.fitColumnWidths(errorTable, 10);
+ warningDialog.setLocationRelativeTo(frame);
+ warningDialog.setVisible(true);
+ }
+ }
+
+ /**
+ * This method is used for generating and displaying the DDL
script
+ * for the current target database using the given DDL
generator.
+ */
+ private void generateAndDisplayDDL(final DDLExportPanel
ddlPanel, DDLGenerator ddlg) throws SQLException,
+ SQLObjectException {
+
ddlg.generateDDLScript(session.getTargetDatabase().getTables());
+
+ SQLDatabase ppdb = new SQLDatabase(ddlPanel.getTargetDB());
+ SQLScriptDialog ssd =
+ new SQLScriptDialog(d,
Messages.getString("ExportDDLAction.previewSQLScriptDialogTitle"), "",
false, //$NON-NLS-1$ //$NON-NLS-2$
+ ddlg,
+ ppdb.getDataSource(),
+ true,
+ session);
+ SPSwingWorker scriptWorker = ssd.getExecuteTask();
+ ConflictFinderProcess cfp = new ConflictFinderProcess(ssd,
ppdb, ddlg, ddlg.getDdlStatements(), session);
+ ConflictResolverProcess crp = new
ConflictResolverProcess(ssd, cfp, session);
+ cfp.setNextProcess(crp);
+ crp.setNextProcess(scriptWorker);
+ ssd.setExecuteTask(cfp);
+ ssd.setVisible(true);
}
};
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/critic/CriticPanel.java
Tue Jun 29 13:26:19 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/critic/CriticPanel.java
Wed Jun 30 09:06:21 2010
@@ -29,14 +29,11 @@
import javax.swing.JTable;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
-import javax.swing.table.TableCellRenderer;
import ca.sqlpower.architect.ddl.critic.Criticism;
-import ca.sqlpower.architect.ddl.critic.CriticAndSettings.Severity;
import ca.sqlpower.architect.swingui.ArchitectSwingSession;
import ca.sqlpower.sqlobject.SQLObject;
import ca.sqlpower.sqlobject.SQLObjectException;
-import ca.sqlpower.swingui.table.FancyExportableJTable;
import com.jgoodies.forms.builder.ButtonBarBuilder;
@@ -46,11 +43,6 @@
*/
public class CriticPanel {
- /**
- * A cell renderer that can display badges with the criticisms.
- */
- private TableCellRenderer tableRenderer = new
SeverityTableCellRenderer();
-
/**
* The main panel of the critics window.
*/
@@ -58,7 +50,7 @@
private final ArchitectSwingSession session;
- private final FancyExportableJTable table;
+ private final JTable table;
private final ListSelectionListener selectedObjectsChangedListener =
new ListSelectionListener() {
@@ -70,9 +62,7 @@
public CriticPanel(ArchitectSwingSession session) {
this.session = session;
- CriticismTableModel tableModel = new CriticismTableModel(session,
session.getPlayPen().getCriticismBucket());
- table = new FancyExportableJTable(tableModel);
- table.setDefaultRenderer(Severity.class, tableRenderer);
+ table = CriticSwingUtil.createCriticTable(session,
session.getPlayPen().getCriticismBucket());
panel = new JPanel(new BorderLayout());
panel.add(new JScrollPane(table), BorderLayout.CENTER);
table.getSelectionModel().addListSelectionListener(selectedObjectsChangedListener);
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/critic/CriticSwingUtil.java
Fri Jun 11 09:19:49 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/critic/CriticSwingUtil.java
Wed Jun 30 09:06:21 2010
@@ -19,8 +19,21 @@
package ca.sqlpower.architect.swingui.critic;
+import java.awt.Point;
+import java.awt.event.ActionEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.List;
+
+import javax.swing.AbstractAction;
import javax.swing.ImageIcon;
-
+import javax.swing.JPopupMenu;
+import javax.swing.JTable;
+
+import ca.sqlpower.architect.ddl.critic.CriticismBucket;
+import ca.sqlpower.architect.ddl.critic.QuickFix;
+import ca.sqlpower.architect.ddl.critic.CriticAndSettings.Severity;
+import ca.sqlpower.architect.swingui.ArchitectSwingSession;
import ca.sqlpower.swingui.SPSUtils;
public class CriticSwingUtil {
@@ -38,4 +51,50 @@
private CriticSwingUtil() {
//utility class
}
-}
+
+ /**
+ * Returns a table that displays all of the critics in the system
including
+ * letting users be able to apply quick fixes to criticisms.
+ *
+ * @param session
+ * The session that contains the critic manager and its
settings.
+ * @param bucket
+ * The bucket that stores the critics in the system. As this
+ * bucket is updated the table model will update with it.
+ */
+ public static JTable createCriticTable(ArchitectSwingSession session,
CriticismBucket bucket) {
+ final CriticismTableModel tableModel = new
CriticismTableModel(session, bucket);
+ final JTable errorTable = new JTable(tableModel);
+ errorTable.setDefaultRenderer(Severity.class, new
SeverityTableCellRenderer());
+ final QuickFixListCellRenderer renderer = new
QuickFixListCellRenderer();
+ errorTable.setDefaultRenderer(List.class, renderer);
+ errorTable.addMouseListener(new MouseListener() {
+
+ public void mouseReleased(MouseEvent e) {
+ final Point point = e.getPoint();
+ int row = errorTable.rowAtPoint(point);
+ int col = errorTable.columnAtPoint(point);
+ Object clickedVal = tableModel.getValueAt(row, col);
+ if (clickedVal instanceof List<?>) {
+ List<?> list = (List<?>) clickedVal;
+ final JPopupMenu menu = new JPopupMenu();
+ for (Object o : list) {
+ final QuickFix fix = (QuickFix) o;
+ menu.add(new AbstractAction(fix.getDescription()) {
+ public void actionPerformed(ActionEvent e) {
+ fix.apply();
+ }
+ });
+ }
+ menu.show(errorTable, point.x, point.y);
+ }
+ }
+
+ public void mousePressed(MouseEvent e) {}
+ public void mouseExited(MouseEvent e) {}
+ public void mouseEntered(MouseEvent e) {}
+ public void mouseClicked(MouseEvent e) {}
+ });
+ return errorTable;
+ }
+}
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/critic/CriticismTableModel.java
Fri Jun 11 13:08:26 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/critic/CriticismTableModel.java
Wed Jun 30 09:06:21 2010
@@ -19,6 +19,8 @@
package ca.sqlpower.architect.swingui.critic;
+import java.util.List;
+
import javax.swing.table.AbstractTableModel;
import ca.sqlpower.architect.ddl.critic.CriticAndSettings;
@@ -53,7 +55,7 @@
}
public int getColumnCount() {
- return 4;
+ return 5;
}
@Override
@@ -79,6 +81,8 @@
return String.class;
} else if (columnIndex == 3) {
return String.class;
+ } else if (columnIndex == 4) {
+ return List.class;
} else {
return null;
}
@@ -89,7 +93,7 @@
}
public Object getValueAt(int rowIndex, int columnIndex) {
- Criticism rowVal = criticizer.getCriticisms().get(rowIndex);
+ final Criticism rowVal = criticizer.getCriticisms().get(rowIndex);
if (columnIndex == 0) {
return rowVal.getCritic().getSeverity();
} else if (columnIndex == 1) {
@@ -101,6 +105,8 @@
return ((CriticAndSettings)
rowVal.getCritic()).getPlatformType();
} else if (columnIndex == 3) {
return rowVal.getDescription();
+ } else if (columnIndex == 4) {
+ return rowVal.getFixes();
} else {
throw new IllegalArgumentException(
"This table has " + getColumnCount() + " columns, and
I " +
=======================================
---
/trunk/src/main/resources/ca/sqlpower/architect/swingui/action/messages.properties
Thu Jun 24 12:17:51 2010
+++
/trunk/src/main/resources/ca/sqlpower/architect/swingui/action/messages.properties
Wed Jun 30 09:06:21 2010
@@ -100,7 +100,7 @@
ExportDDLAction.errorGeneratingDDLScript=An error ocurred while trying to
generate the DDL script.
ExportDDLAction.errorMessageDialogTitle=Error
ExportDDLAction.errorsInDDLDialogTitle=Errors in generated DDL
-ExportDDLAction.errorsInstructions=Errors:\nThe DDL could not be generated
because the following error(s) were detected. You need to correct all the
errors before we can generate DDL for you. Some errors may have
their 'QuickFix' button enabled; holding the mouse over these buttons will
tell you what the suggested quick-fix is. If you are OK with the
suggestion, press the QuickFix button, otherwise, make the change yourself
using the GUI controls following the message.
+ExportDDLAction.errorsInstructions=Errors:\nThe DDL could not be generated
because the following error(s) were detected. You need to correct all the
errors before we can generate DDL for you. Some errors may have
their 'QuickFix' bulb on; clicking on a lit bulb will tell you what the
suggested quick-fix is. If you are OK with the suggestion, select the
QuickFix in the pop-up list, otherwise, you can cancel and correct the
model directly.
ExportDDLAction.failedToConnectToDb=Failed to connect to target database.
Please check your connection settings.
ExportDDLAction.forwardEngineerSQLDialogTitle=Forward Engineer SQL Script
ExportDDLAction.ignoreWarningsOption=Ignore Warnings