tmf : Introduce the modules for the XML pattern analysis
[deliverable/tracecompass.git] / analysis / org.eclipse.tracecompass.analysis.timing.core / src / org / eclipse / tracecompass / analysis / timing / core / segmentstore / AbstractSegmentStoreAnalysisModule.java
index ece3c75d89ae3cc314617a344ef4fd5a752e80d5..5426b07077ffafd05d124f4af10263202079ce97 100644 (file)
@@ -151,9 +151,7 @@ public abstract class AbstractSegmentStoreAnalysisModule extends TmfAbstractAnal
                         }
                     }
                     fSegmentStore = store;
-                    for (IAnalysisProgressListener listener : getListeners()) {
-                        listener.onComplete(this, store);
-                    }
+                    sendUpdate(store);
                     return true;
                 } catch (IOException | ClassNotFoundException | ClassCastException e) {
                     /*
@@ -190,10 +188,20 @@ public abstract class AbstractSegmentStoreAnalysisModule extends TmfAbstractAnal
             }
         }
 
-        for (IAnalysisProgressListener listener : getListeners()) {
-            listener.onComplete(this, segmentStore);
-        }
+        sendUpdate(segmentStore);
 
         return true;
     }
+
+    /**
+     * Send the segment store to all its listener
+     *
+     * @param store
+     *            The segment store to broadcast
+     */
+    protected void sendUpdate(final ISegmentStore<ISegment> store) {
+        for (IAnalysisProgressListener listener : getListeners()) {
+            listener.onComplete(this, store);
+        }
+    }
 }
\ No newline at end of file
This page took 0.024544 seconds and 5 git commands to generate.