Update of /cvsroot/squirrel-sql/sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv9865/fw/src/net/sourceforge/squirrel_sql/fw/gui
Modified Files:
TablePopupMenu.java
Log Message:
Bug 2927576 (NPE at Copy as SQL INSERT-VALUES): Remove copy function from menu whenever we do not have the information that it requires (e.g. joined table query).
Index: TablePopupMenu.java
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/TablePopupMenu.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** TablePopupMenu.java 1 Dec 2009 23:22:57 -0000 1.24
--- TablePopupMenu.java 21 Feb 2010 00:19:54 -0000 1.25
***************
*** 36,39 ****
--- 36,44 ----
public class TablePopupMenu extends BasePopupMenu
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -1016475198906837273L;
+
/** Internationalized strings for this class. */
private static final StringManager s_stringMgr =
***************
*** 122,126 ****
_menuItems[IOptionTypes.COPY_WHERE_STATEMENT] = add(_copyWhereStatement);
_menuItems[IOptionTypes.COPY_UPDATE_STATEMENT] = add(_copyUpdateStatement);
! _menuItems[IOptionTypes.COPY_INSERT_STATEMENT] = add(_copyInsertStatement);
addSeparator();
_menuItems[IOptionTypes.EXPORT_CSV] = add(_exportCvs);
--- 127,133 ----
_menuItems[IOptionTypes.COPY_WHERE_STATEMENT] = add(_copyWhereStatement);
_menuItems[IOptionTypes.COPY_UPDATE_STATEMENT] = add(_copyUpdateStatement);
! if (_updateableModel != null) {
! _menuItems[IOptionTypes.COPY_INSERT_STATEMENT] = add(_copyInsertStatement);
! }
addSeparator();
_menuItems[IOptionTypes.EXPORT_CSV] = add(_exportCvs);
***************
*** 241,244 ****
--- 248,256 ----
private class CopyAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -2067301779079584296L;
+
CopyAction()
{
***************
*** 257,260 ****
--- 269,277 ----
private class CopyWithHeadersAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 5382436496333309089L;
+
CopyWithHeadersAction()
{
***************
*** 275,278 ****
--- 292,300 ----
private class CopyHtmlAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 2213871184115799502L;
+
CopyHtmlAction()
{
***************
*** 291,294 ****
--- 313,321 ----
private class CopyInStatementAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 1635818404738839629L;
+
CopyInStatementAction()
{
***************
*** 307,310 ****
--- 334,342 ----
private class CopyWhereStatementAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 5283906236033114554L;
+
CopyWhereStatementAction()
{
***************
*** 323,326 ****
--- 355,363 ----
private class CopyUpdateStatementAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -6021874127769966277L;
+
CopyUpdateStatementAction()
{
***************
*** 339,342 ****
--- 376,384 ----
private class CopyInsertStatementAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -7435854038358286356L;
+
CopyInsertStatementAction()
{
***************
*** 356,360 ****
private class ExportCsvAction extends BaseAction
{
! ExportCsvAction()
{
// i18n[TablePopupMenu.export=Export CSV / MS Excel / XML ...]
--- 398,407 ----
private class ExportCsvAction extends BaseAction
{
! /**
! * serialVersionUID
! */
! private static final long serialVersionUID = 6085745835588355015L;
!
! ExportCsvAction()
{
// i18n[TablePopupMenu.export=Export CSV / MS Excel / XML ...]
***************
*** 374,377 ****
--- 421,429 ----
private class AdjustAllColWidthsAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -3098803720561054400L;
+
AdjustAllColWidthsAction()
{
***************
*** 394,397 ****
--- 446,454 ----
private class AlwaysAdjustAllColWidthsAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 1822505497525307610L;
+
AlwaysAdjustAllColWidthsAction()
{
***************
*** 411,414 ****
--- 468,476 ----
private class ShowRowNumbersAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 2334425978292516278L;
+
ShowRowNumbersAction()
{
***************
*** 430,433 ****
--- 492,500 ----
private class MakeEditableAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = 8437698495240738702L;
+
MakeEditableAction()
{
***************
*** 447,450 ****
--- 514,522 ----
private class UndoMakeEditableAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -4529894089150172541L;
+
UndoMakeEditableAction()
{
***************
*** 462,465 ****
--- 534,542 ----
private class DeleteRowsAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -1579260225467807234L;
+
DeleteRowsAction()
{
***************
*** 482,485 ****
--- 559,567 ----
private class InsertRowAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -1162317166099751091L;
+
InsertRowAction()
{
***************
*** 495,498 ****
--- 577,585 ----
private class SelectAllAction extends BaseAction
{
+ /**
+ * serialVersionUID
+ */
+ private static final long serialVersionUID = -1785396901358722169L;
+
SelectAllAction()
{
***************
*** 512,516 ****
private class PrintAction extends BaseAction
{
! PrintAction()
{
super(s_stringMgr.getString("TablePopupMenu.print"));
--- 599,608 ----
private class PrintAction extends BaseAction
{
! /**
! * serialVersionUID
! */
! private static final long serialVersionUID = 2017562921244356617L;
!
! PrintAction()
{
super(s_stringMgr.getString("TablePopupMenu.print"));
|