# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /home/matthias/NetBeansProjects/main-golden
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: db.core/src/org/netbeans/modules/db/sql/execute/ui/Bundle.properties
--- db.core/src/org/netbeans/modules/db/sql/execute/ui/Bundle.properties Base (BASE)
+++ db.core/src/org/netbeans/modules/db/sql/execute/ui/Bundle.properties Locally Modified (Based On LOCAL)
@@ -105,3 +105,4 @@
LBL_DeleteAll=Delete All
DESC_DeleteAll=Really delete all entries from the SQL history?
ACSD_DeleteAll=Delete all SQL statements from history
+SQLHistoryPanel.matchingRowsLabel.text=0
Index: db.core/src/org/netbeans/modules/db/sql/execute/ui/SQLHistoryPanel.form
--- db.core/src/org/netbeans/modules/db/sql/execute/ui/SQLHistoryPanel.form Base (BASE)
+++ db.core/src/org/netbeans/modules/db/sql/execute/ui/SQLHistoryPanel.form Locally Modified (Based On LOCAL)
@@ -17,43 +17,45 @@
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
@@ -72,7 +74,7 @@
-
+
@@ -81,6 +83,7 @@
+
@@ -253,7 +256,7 @@
-
+
@@ -264,7 +267,7 @@
-
+
@@ -283,5 +286,12 @@
+
+
+
+
+
+
+
Index: db.core/src/org/netbeans/modules/db/sql/execute/ui/SQLHistoryPanel.java
--- db.core/src/org/netbeans/modules/db/sql/execute/ui/SQLHistoryPanel.java Base (BASE)
+++ db.core/src/org/netbeans/modules/db/sql/execute/ui/SQLHistoryPanel.java Locally Modified (Based On LOCAL)
@@ -106,6 +106,14 @@
rowSorter.setSortsOnUpdates(true);
rowSorter.sort();
+ rowSorter.addRowSorterListener(new RowSorterListener() {
+
+ @Override
+ public void sorterChanged(RowSorterEvent e) {
+ updateRowCount();
+ }
+ });
+
sqlTableSelektion = sqlHistoryTable.getSelectionModel();
updateURLList();
@@ -115,6 +123,7 @@
@Override
public void tableChanged(TableModelEvent e) {
updateURLList();
+ updateRowCount();
}
});
@@ -154,10 +163,10 @@
public void valueChanged(ListSelectionEvent e) {
if (sqlTableSelektion.isSelectionEmpty()) {
insertSQLButton.setEnabled(false);
- deleteSQLButtton.setEnabled(false);
+ deleteSQLButton.setEnabled(false);
} else {
insertSQLButton.setEnabled(true);
- deleteSQLButtton.setEnabled(true);
+ deleteSQLButton.setEnabled(true);
}
}
});
@@ -171,6 +180,10 @@
});
}
+ private void updateRowCount() {
+ matchingRowsLabel.setText(Integer.toString(sqlHistoryTable.getRowCount()));
+ }
+
private void updateFilter() {
List> rowFilter = new ArrayList>();
@@ -259,8 +272,9 @@
sqlLimitTextField = new javax.swing.JTextField();
sqlLimitButton = new javax.swing.JButton();
inputWarningLabel = new javax.swing.JLabel();
- deleteSQLButtton = new javax.swing.JButton();
+ deleteSQLButton = new javax.swing.JButton();
deleteAllSQLButton = new javax.swing.JButton();
+ matchingRowsLabel = new javax.swing.JLabel();
jLabel1.setText(org.openide.util.NbBundle.getMessage(SQLHistoryPanel.class, "LBL_Connection")); // NOI18N
@@ -330,12 +344,12 @@
inputWarningLabel.setRequestFocusEnabled(false);
inputWarningLabel.setVerifyInputWhenFocusTarget(false);
- org.openide.awt.Mnemonics.setLocalizedText(deleteSQLButtton, org.openide.util.NbBundle.getMessage(SQLHistoryPanel.class, "LBL_Delete")); // NOI18N
- deleteSQLButtton.setToolTipText(org.openide.util.NbBundle.getMessage(SQLHistoryPanel.class, "ACSD_Delete")); // NOI18N
- deleteSQLButtton.setEnabled(false);
- deleteSQLButtton.addActionListener(new java.awt.event.ActionListener() {
+ org.openide.awt.Mnemonics.setLocalizedText(deleteSQLButton, org.openide.util.NbBundle.getMessage(SQLHistoryPanel.class, "LBL_Delete")); // NOI18N
+ deleteSQLButton.setToolTipText(org.openide.util.NbBundle.getMessage(SQLHistoryPanel.class, "ACSD_Delete")); // NOI18N
+ deleteSQLButton.setEnabled(false);
+ deleteSQLButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
- deleteSQLButttonActionPerformed(evt);
+ deleteSQLButtonActionPerformed(evt);
}
});
@@ -347,6 +361,8 @@
}
});
+ matchingRowsLabel.setText(org.openide.util.NbBundle.getMessage(SQLHistoryPanel.class, "SQLHistoryPanel.matchingRowsLabel.text")); // NOI18N
+
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
@@ -355,31 +371,33 @@
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 568, Short.MAX_VALUE)
+ .addComponent(inputWarningLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
+ .addGap(493, 493, 493))
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
+ .addComponent(sqlLimitLabel)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(sqlLimitTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(sqlLimitButton)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(matchingRowsLabel))
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 595, Short.MAX_VALUE)
+ .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(connectionUrlComboBox, 0, 224, Short.MAX_VALUE)
+ .addComponent(connectionUrlComboBox, 0, 218, Short.MAX_VALUE)
.addGap(18, 18, 18)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(searchTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(insertSQLButton, javax.swing.GroupLayout.DEFAULT_SIZE, 87, Short.MAX_VALUE)
- .addComponent(deleteSQLButtton, javax.swing.GroupLayout.DEFAULT_SIZE, 87, Short.MAX_VALUE)
- .addComponent(deleteAllSQLButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addContainerGap())
- .addGroup(layout.createSequentialGroup()
- .addComponent(inputWarningLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
- .addGap(493, 493, 493))
- .addGroup(layout.createSequentialGroup()
- .addComponent(sqlLimitLabel)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(sqlLimitTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(sqlLimitButton))))
+ .addComponent(insertSQLButton, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(deleteSQLButton, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(deleteAllSQLButton, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap())))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -397,13 +415,14 @@
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 141, Short.MAX_VALUE)
.addComponent(deleteAllSQLButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(deleteSQLButtton))
+ .addComponent(deleteSQLButton))
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(sqlLimitTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(sqlLimitButton)
- .addComponent(sqlLimitLabel))
+ .addComponent(sqlLimitLabel)
+ .addComponent(matchingRowsLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(inputWarningLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
@@ -436,9 +455,9 @@
verifySQLLimit();
}//GEN-LAST:event_sqlLimitButtonActionPerformed
- private void deleteSQLButttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteSQLButttonActionPerformed
+ private void deleteSQLButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteSQLButtonActionPerformed
deleteSQL();
- }//GEN-LAST:event_deleteSQLButttonActionPerformed
+ }//GEN-LAST:event_deleteSQLButtonActionPerformed
private void deleteAllSQLButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteAllSQLButtonActionPerformed
deleteAllSQL();
@@ -561,12 +580,13 @@
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JComboBox connectionUrlComboBox;
private javax.swing.JButton deleteAllSQLButton;
- private javax.swing.JButton deleteSQLButtton;
+ private javax.swing.JButton deleteSQLButton;
private javax.swing.JLabel inputWarningLabel;
private javax.swing.JButton insertSQLButton;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JScrollPane jScrollPane1;
+ private javax.swing.JLabel matchingRowsLabel;
private javax.swing.JTextField searchTextField;
private javax.swing.JTable sqlHistoryTable;
private javax.swing.JButton sqlLimitButton;