diff --git a/src/main/java/org/gcube/portlets/user/td/toolboxwidget/client/ToolBox.java b/src/main/java/org/gcube/portlets/user/td/toolboxwidget/client/ToolBox.java index da29fa0..3027365 100644 --- a/src/main/java/org/gcube/portlets/user/td/toolboxwidget/client/ToolBox.java +++ b/src/main/java/org/gcube/portlets/user/td/toolboxwidget/client/ToolBox.java @@ -207,7 +207,7 @@ public class ToolBox extends TabPanel { setActiveWidget(validationsTasksPanel); } - + public void openNormalizeTab(TRId trId) { Log.debug("Open Normalize Tab"); if (normalizePanel == null) { @@ -218,7 +218,7 @@ public class ToolBox extends TabPanel { setActiveWidget(normalizePanel); } - + public void openDenormalizeTab(TRId trId) { Log.debug("Open Denormalize Tab"); if (denormalizePanel == null) { @@ -229,7 +229,6 @@ public class ToolBox extends TabPanel { setActiveWidget(denormalizePanel); } - public void openDuplicatesRowsTab(TRId trId) { Log.debug("Open Duplicates Rows Tab"); @@ -348,7 +347,7 @@ public class ToolBox extends TabPanel { duplicatesRowsPanel = null; } } - + public void closeNormalizePanel() { Log.debug("Close NormalizePanel Tab"); if (normalizePanel != null) { @@ -356,7 +355,7 @@ public class ToolBox extends TabPanel { normalizePanel = null; } } - + public void closeDenormalizePanel() { Log.debug("Close DenormalizePanel Tab"); if (denormalizePanel != null) { @@ -364,84 +363,87 @@ public class ToolBox extends TabPanel { denormalizePanel = null; } } - public void updateTabs() { - Log.debug("Update ToolBox Tabs"); - if (trProperties != null) { - trProperties.update(); - } - if (historyPanel != null) { - //historyPanel.update(); - remove(historyPanel); - historyPanel = null; - } + try { + Log.debug("Update ToolBox Tabs"); + if (trProperties != null) { + trProperties.update(); + } + if (historyPanel != null) { + // historyPanel.update(); + remove(historyPanel); + historyPanel = null; + } - if (validationsTablePanel != null) { - validationsTablePanel.update(); - validationsTablePanel.onResize(); - } + if (validationsTablePanel != null) { + validationsTablePanel.update(); + validationsTablePanel.onResize(); + } - if (validationsTasksPanel != null) { - validationsTasksPanel.update(); - validationsTasksPanel.onResize(); - } + if (validationsTasksPanel != null) { + validationsTasksPanel.update(); + validationsTasksPanel.onResize(); + } - if (changeColumnTypePanel != null) { - remove(changeColumnTypePanel); - changeColumnTypePanel = null; - } - if (deleteColumnPanel != null) { - remove(deleteColumnPanel); - deleteColumnPanel = null; - } + if (changeColumnTypePanel != null) { + remove(changeColumnTypePanel); + changeColumnTypePanel = null; + } + if (deleteColumnPanel != null) { + remove(deleteColumnPanel); + deleteColumnPanel = null; + } - if (splitColumnPanel != null) { - remove(splitColumnPanel); - splitColumnPanel = null; - } + if (splitColumnPanel != null) { + remove(splitColumnPanel); + splitColumnPanel = null; + } - if (mergeColumnPanel != null) { - remove(mergeColumnPanel); - mergeColumnPanel = null; - } + if (mergeColumnPanel != null) { + remove(mergeColumnPanel); + mergeColumnPanel = null; + } - if (groupByPanel != null) { - remove(groupByPanel); - groupByPanel = null; - } + if (groupByPanel != null) { + remove(groupByPanel); + groupByPanel = null; + } - if (addColumnPanel != null) { - remove(addColumnPanel); - addColumnPanel = null; - } + if (addColumnPanel != null) { + remove(addColumnPanel); + addColumnPanel = null; + } - if (labelColumnPanel != null) { - remove(labelColumnPanel); - labelColumnPanel = null; - } - if (changeTableTypePanel != null) { - remove(changeTableTypePanel); - changeTableTypePanel = null; - } + if (labelColumnPanel != null) { + remove(labelColumnPanel); + labelColumnPanel = null; + } + if (changeTableTypePanel != null) { + remove(changeTableTypePanel); + changeTableTypePanel = null; + } - if (duplicatesRowsPanel != null) { - remove(duplicatesRowsPanel); - duplicatesRowsPanel = null; - } - - if (normalizePanel != null) { - remove(normalizePanel); - normalizePanel = null; - } - - if (denormalizePanel != null) { - remove(denormalizePanel); - denormalizePanel = null; - } - - forceLayout(); + if (duplicatesRowsPanel != null) { + remove(duplicatesRowsPanel); + duplicatesRowsPanel = null; + } + if (normalizePanel != null) { + remove(normalizePanel); + normalizePanel = null; + } + + if (denormalizePanel != null) { + remove(denormalizePanel); + denormalizePanel = null; + } + + forceLayout(); + } catch (Throwable e) { + Log.error("Error in ToolBox: " + e.getLocalizedMessage()); + e.printStackTrace(); + } } protected void addHelpPanel() { @@ -724,11 +726,9 @@ public class ToolBox extends TabPanel { }); }; - - + protected void addNormalizePanel(TRId trId) { - TabItemConfig normalizeItemConf = new TabItemConfig("Normalize", - true); + TabItemConfig normalizeItemConf = new TabItemConfig("Normalize", true); normalizePanel = new NormalizePanel(trId, eventBus); add(normalizePanel, normalizeItemConf); @@ -746,7 +746,7 @@ public class ToolBox extends TabPanel { }); }; - + protected void addDenormalizePanel(TRId trId) { TabItemConfig denormalizeItemConf = new TabItemConfig("Denormalize", true); @@ -767,8 +767,6 @@ public class ToolBox extends TabPanel { }); }; - - protected void addTdTaskPanel() { // TODO