diff --git a/java/com.sap.sailing.dashboards.gwt/GWT Dashboards DevMode.launch b/java/com.sap.sailing.dashboards.gwt/GWT Dashboards DevMode.launch
index a678ba8d821..f930818bbb8 100755
--- a/java/com.sap.sailing.dashboards.gwt/GWT Dashboards DevMode.launch
+++ b/java/com.sap.sailing.dashboards.gwt/GWT Dashboards DevMode.launch
@@ -20,7 +20,6 @@
-
diff --git a/java/com.sap.sailing.dashboards.gwt/GWT Dashboards SDM.launch b/java/com.sap.sailing.dashboards.gwt/GWT Dashboards SDM.launch
index 1907538d6fc..b1e903bb8cc 100755
--- a/java/com.sap.sailing.dashboards.gwt/GWT Dashboards SDM.launch
+++ b/java/com.sap.sailing.dashboards.gwt/GWT Dashboards SDM.launch
@@ -22,7 +22,6 @@
-
diff --git a/java/com.sap.sailing.gwt.ui/GWT Sailing DevMode.launch b/java/com.sap.sailing.gwt.ui/GWT Sailing DevMode.launch
index c26253939b9..964428b8c6e 100755
--- a/java/com.sap.sailing.gwt.ui/GWT Sailing DevMode.launch
+++ b/java/com.sap.sailing.gwt.ui/GWT Sailing DevMode.launch
@@ -33,7 +33,6 @@
-
diff --git a/java/com.sap.sailing.gwt.ui/GWT Sailing SDM (Home+Admin+Raceboard).launch b/java/com.sap.sailing.gwt.ui/GWT Sailing SDM (Home+Admin+Raceboard).launch
index c0ecf649f0c..451b0abcafd 100644
--- a/java/com.sap.sailing.gwt.ui/GWT Sailing SDM (Home+Admin+Raceboard).launch
+++ b/java/com.sap.sailing.gwt.ui/GWT Sailing SDM (Home+Admin+Raceboard).launch
@@ -25,7 +25,6 @@
-
diff --git a/java/com.sap.sailing.gwt.ui/GWT Sailing SDM ManagementConsole.launch b/java/com.sap.sailing.gwt.ui/GWT Sailing SDM ManagementConsole.launch
index bac27d92537..3813def89a1 100644
--- a/java/com.sap.sailing.gwt.ui/GWT Sailing SDM ManagementConsole.launch
+++ b/java/com.sap.sailing.gwt.ui/GWT Sailing SDM ManagementConsole.launch
@@ -22,7 +22,6 @@
-
diff --git a/java/com.sap.sailing.gwt.ui/GWT Sailing SDM.launch b/java/com.sap.sailing.gwt.ui/GWT Sailing SDM.launch
index 4ce5f617b93..18d1b3b918e 100755
--- a/java/com.sap.sailing.gwt.ui/GWT Sailing SDM.launch
+++ b/java/com.sap.sailing.gwt.ui/GWT Sailing SDM.launch
@@ -53,7 +53,6 @@
-
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/datamining/DataMiningEntryPoint.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/datamining/DataMiningEntryPoint.java
index 2f450886be4..254bcf59c5f 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/datamining/DataMiningEntryPoint.java
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/datamining/DataMiningEntryPoint.java
@@ -312,7 +312,7 @@ public class DataMiningEntryPoint extends AbstractSailingReadEntryPoint implemen
});
// removing a tab from the result presenter shall remove its query from the current report
resultsPresenter.addPresenterRemovedListener((String presenterId, int presenterIndex, StatisticQueryDefinitionDTO queryDefinition) -> {
- if (queryDefinition != null) {
+ if (queryDefinition != null && currentReport != null && currentReport.getReport() != null) {
currentReport.getReport().removeQueryDefinition(queryDefinition);
}
});
diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/datamining/DataMiningReportStoreControls.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/datamining/DataMiningReportStoreControls.java
index 117247e5fdf..ebfcf31f09b 100644
--- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/datamining/DataMiningReportStoreControls.java
+++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/datamining/DataMiningReportStoreControls.java
@@ -184,20 +184,22 @@ public class DataMiningReportStoreControls extends Composite {
final DataMiningReportDTO report = storedReport.getReport();
reportProvider.setCurrentReport(storedReport);
final Iterable reportQueries = report.getQueryDefinitions();
- final SequentialQueryExecutor executor = new SequentialQueryExecutor(reportQueries);
- executor.run(results -> {
- resultsPresenter.showResults(results);
- showBusyIndicator(false);
- if (!executor.hasErrorOccurred()) {
- Notification.notify(
- StringMessages.INSTANCE.dataMiningStoredReportLoadedSuccessful(storedReport.getName()),
- NotificationType.SUCCESS);
- } else {
- Notification.notify(
- StringMessages.INSTANCE.dataMiningStoredReportLoadedWithErrors(storedReport.getName()),
- NotificationType.WARNING);
- }
- });
+ if (!Util.isEmpty(reportQueries)) {
+ final SequentialQueryExecutor executor = new SequentialQueryExecutor(reportQueries);
+ executor.run(results -> {
+ resultsPresenter.showResults(results);
+ showBusyIndicator(false);
+ if (!executor.hasErrorOccurred()) {
+ Notification.notify(
+ StringMessages.INSTANCE.dataMiningStoredReportLoadedSuccessful(storedReport.getName()),
+ NotificationType.SUCCESS);
+ } else {
+ Notification.notify(
+ StringMessages.INSTANCE.dataMiningStoredReportLoadedWithErrors(storedReport.getName()),
+ NotificationType.WARNING);
+ }
+ });
+ }
}
return storedReport;
}
@@ -226,7 +228,13 @@ public class DataMiningReportStoreControls extends Composite {
private boolean errorOccurred = false;
private Consumer>>> callback;
+ /**
+ * @param queryDefinitions must contain at least one query
+ */
public SequentialQueryExecutor(Iterable queryDefinitions) {
+ if (Util.isEmpty(queryDefinitions)) {
+ throw new IllegalArgumentException("SequentialQueryExecutor expects at least one query");
+ }
this.queryDefinitions = new ArrayList<>();
Util.addAll(queryDefinitions, this.queryDefinitions);
}
diff --git a/java/com.sap.sse.datamining.ui/src/main/java/com/sap/sse/datamining/ui/client/CompositeResultsPresenter.java b/java/com.sap.sse.datamining.ui/src/main/java/com/sap/sse/datamining/ui/client/CompositeResultsPresenter.java
index b39859184be..f59a5974f4b 100644
--- a/java/com.sap.sse.datamining.ui/src/main/java/com/sap/sse/datamining/ui/client/CompositeResultsPresenter.java
+++ b/java/com.sap.sse.datamining.ui/src/main/java/com/sap/sse/datamining/ui/client/CompositeResultsPresenter.java
@@ -99,7 +99,12 @@ public interface CompositeResultsPresenter extend
/**
* Display the given query result pairs. Any results that are currently displayed will be overridden and additional
- * child presenters will be created if necessary.
+ * child presenters will be created if necessary. No {@link CurrentPresenterChangedListener} or
+ * {@link PresenterRemovedListener} registered through
+ * {@link #addCurrentPresenterChangedListener(CurrentPresenterChangedListener)} and
+ * {@link #addPresenterRemovedListener(PresenterRemovedListener)}, respectively, will be notified by calling this
+ * method. It is assumed that the caller is entirely replacing all results at once and not incrementally
+ * manipulating, e.g., a report.
*
* @param results
* The query result pairs to display
diff --git a/java/com.sap.sse.datamining.ui/src/main/java/com/sap/sse/datamining/ui/client/presentation/TabbedResultsPresenter.java b/java/com.sap.sse.datamining.ui/src/main/java/com/sap/sse/datamining/ui/client/presentation/TabbedResultsPresenter.java
index 432da094a16..20f3677458b 100755
--- a/java/com.sap.sse.datamining.ui/src/main/java/com/sap/sse/datamining/ui/client/presentation/TabbedResultsPresenter.java
+++ b/java/com.sap.sse.datamining.ui/src/main/java/com/sap/sse/datamining/ui/client/presentation/TabbedResultsPresenter.java
@@ -162,8 +162,7 @@ public class TabbedResultsPresenter extends AbstractDataMiningComponent>> results) {
- // TODO bug4789: should we check for changes in the tabs before removing them?
- new ArrayList<>(tabsMappedById.keySet()).stream().map(tabsMappedById::get).forEach(this::removeTab);
+ new ArrayList<>(tabsMappedById.keySet()).stream().map(tabsMappedById::get).forEach(this::removeTabNotNotifyingListeners);
for (final Pair> entry : results) {
final StatisticQueryDefinitionDTO queryDefinition = entry.getA();
final QueryResultDTO> result = entry.getB();
@@ -272,13 +271,23 @@ public class TabbedResultsPresenter extends AbstractDataMiningComponent l.onPresenterRemoved(presenterId, index, tab.getPresenter().getCurrentQueryDefinition()));
+ if (notifyListeners) {
+ this.presenterRemovedListeners.forEach(l -> l.onPresenterRemoved(presenterId, index, tab.getPresenter().getCurrentQueryDefinition()));
+ }
}
@Override
diff --git a/java/com.sap.sse.gwt/GWT xdStorage Sample SDM.launch b/java/com.sap.sse.gwt/GWT xdStorage Sample SDM.launch
index 58c93dedb19..7cebd74e454 100755
--- a/java/com.sap.sse.gwt/GWT xdStorage Sample SDM.launch
+++ b/java/com.sap.sse.gwt/GWT xdStorage Sample SDM.launch
@@ -23,7 +23,6 @@
-
diff --git a/java/com.sap.sse.security.ui/GWT Security DevMode.launch b/java/com.sap.sse.security.ui/GWT Security DevMode.launch
index 4639cbe30da..26167ca2c75 100755
--- a/java/com.sap.sse.security.ui/GWT Security DevMode.launch
+++ b/java/com.sap.sse.security.ui/GWT Security DevMode.launch
@@ -25,7 +25,6 @@
-
diff --git a/java/com.sap.sse.security.ui/GWT Security SDM.launch b/java/com.sap.sse.security.ui/GWT Security SDM.launch
index 0a6beef0691..2e8a0fde913 100755
--- a/java/com.sap.sse.security.ui/GWT Security SDM.launch
+++ b/java/com.sap.sse.security.ui/GWT Security SDM.launch
@@ -27,7 +27,6 @@
-