Search in sources :

Example 1 with IAnalysisProgressListener

use of org.eclipse.tracecompass.analysis.timing.core.segmentstore.IAnalysisProgressListener in project tracecompass by tracecompass.

the class AbstractSegmentStoreDensityViewer method internalDispose.

private void internalDispose() {
    fSegmentStoreProviders.entrySet().forEach(entry -> {
        IAnalysisProgressListener listener = fProgressListeners.get(entry.getKey());
        if (listener != null) {
            Objects.requireNonNull(entry.getValue()).removeListener(listener);
        }
    });
    fTooltipProvider.dispose();
    fProgressListeners.clear();
    fDragZoomProvider.dispose();
    fDragProvider.dispose();
    super.dispose();
}
Also used : IAnalysisProgressListener(org.eclipse.tracecompass.analysis.timing.core.segmentstore.IAnalysisProgressListener)

Example 2 with IAnalysisProgressListener

use of org.eclipse.tracecompass.analysis.timing.core.segmentstore.IAnalysisProgressListener in project tracecompass by tracecompass.

the class AbstractSegmentStoreDensityViewer method updateWindowRange.

private void updateWindowRange(TmfTimeRange windowRange, boolean updateListeners) {
    for (Entry<@NonNull String, @NonNull ISegmentStoreProvider> entry : fSegmentStoreProviders.entrySet()) {
        ISegmentStoreProvider provider = Objects.requireNonNull(entry.getValue());
        if (updateListeners) {
            IAnalysisProgressListener listener = (segmentProvider, data) -> updateWithRange(windowRange);
            provider.addListener(listener);
            fProgressListeners.put(entry.getKey(), listener);
        }
        if (provider instanceof IAnalysisModule) {
            ((IAnalysisModule) provider).schedule();
        }
    }
}
Also used : TmfViewer(org.eclipse.tracecompass.tmf.ui.viewers.TmfViewer) PlotSymbolType(org.eclipse.swtchart.ILineSeries.PlotSymbolType) SimpleTooltipProvider(org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.density2.SimpleTooltipProvider) TmfTraceOpenedSignal(org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal) Arrays(java.util.Arrays) ILineSeries(org.eclipse.swtchart.ILineSeries) Format(java.text.Format) Type(org.eclipse.tracecompass.tmf.core.presentation.IYAppearance.Type) TmfTraceClosedSignal(org.eclipse.tracecompass.tmf.core.signal.TmfTraceClosedSignal) TmfTraceContext(org.eclipse.tracecompass.tmf.core.trace.TmfTraceContext) Nullable(org.eclipse.jdt.annotation.Nullable) Composite(org.eclipse.swt.widgets.Composite) Map(java.util.Map) ISeriesSet(org.eclipse.swtchart.ISeriesSet) TmfTraceManager(org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager) ColorRegistry(org.eclipse.jface.resource.ColorRegistry) MouseSelectionProvider(org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.density2.MouseSelectionProvider) TmfTraceSelectedSignal(org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal) ISegmentStore(org.eclipse.tracecompass.segmentstore.core.ISegmentStore) TmfSignalHandler(org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler) ITmfTrace(org.eclipse.tracecompass.tmf.core.trace.ITmfTrace) Predicate(java.util.function.Predicate) NonNullUtils.nullToEmptyString(org.eclipse.tracecompass.common.core.NonNullUtils.nullToEmptyString) Set(java.util.Set) Display(org.eclipse.swt.widgets.Display) Objects(java.util.Objects) SubSecondTimeWithUnitFormat(org.eclipse.tracecompass.common.core.format.SubSecondTimeWithUnitFormat) List(java.util.List) Range(org.eclipse.swtchart.Range) SWT(org.eclipse.swt.SWT) Entry(java.util.Map.Entry) IYAppearance(org.eclipse.tracecompass.tmf.core.presentation.IYAppearance) Optional(java.util.Optional) SeriesType(org.eclipse.swtchart.ISeries.SeriesType) TmfTimeRange(org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange) NonNull(org.eclipse.jdt.annotation.NonNull) LineStyle(org.eclipse.swtchart.LineStyle) SegmentComparators(org.eclipse.tracecompass.segmentstore.core.SegmentComparators) SegmentStoreWithRange(org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.table.SegmentStoreContentProvider.SegmentStoreWithRange) Chart(org.eclipse.swtchart.Chart) MouseDragZoomProvider(org.eclipse.tracecompass.internal.analysis.timing.ui.views.segmentstore.density2.MouseDragZoomProvider) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) ArrayList(java.util.ArrayList) NonNullUtils(org.eclipse.tracecompass.common.core.NonNullUtils) HashSet(java.util.HashSet) ISegmentStoreProvider(org.eclipse.tracecompass.analysis.timing.core.segmentstore.ISegmentStoreProvider) IAxis(org.eclipse.swtchart.IAxis) ILegend(org.eclipse.swtchart.ILegend) IAnalysisModule(org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule) RotatingPaletteProvider(org.eclipse.tracecompass.tmf.core.presentation.RotatingPaletteProvider) RGB(org.eclipse.swt.graphics.RGB) StreamSupport(java.util.stream.StreamSupport) TimeGraphColorScheme(org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.TimeGraphColorScheme) IAnalysisProgressListener(org.eclipse.tracecompass.analysis.timing.core.segmentstore.IAnalysisProgressListener) IBarSeries(org.eclipse.swtchart.IBarSeries) ISeries(org.eclipse.swtchart.ISeries) AxisRange(org.eclipse.tracecompass.tmf.ui.viewers.xychart.AxisRange) IImageSave(org.eclipse.tracecompass.tmf.ui.viewers.IImageSave) DoubleArraySeriesModel(org.eclipse.swtchart.model.DoubleArraySeriesModel) Color(org.eclipse.swt.graphics.Color) VisibleForTesting(com.google.common.annotations.VisibleForTesting) ISegment(org.eclipse.tracecompass.segmentstore.core.ISegment) TmfWindowRangeUpdatedSignal(org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal) RGBAUtil(org.eclipse.tracecompass.tmf.ui.colors.RGBAUtil) ISegmentStoreProvider(org.eclipse.tracecompass.analysis.timing.core.segmentstore.ISegmentStoreProvider) IAnalysisProgressListener(org.eclipse.tracecompass.analysis.timing.core.segmentstore.IAnalysisProgressListener) IAnalysisModule(org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule) NonNullUtils.nullToEmptyString(org.eclipse.tracecompass.common.core.NonNullUtils.nullToEmptyString)

Aggregations

IAnalysisProgressListener (org.eclipse.tracecompass.analysis.timing.core.segmentstore.IAnalysisProgressListener)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 Format (java.text.Format)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Map (java.util.Map)1 Entry (java.util.Map.Entry)1 Objects (java.util.Objects)1 Optional (java.util.Optional)1 Set (java.util.Set)1 CompletableFuture (java.util.concurrent.CompletableFuture)1 Predicate (java.util.function.Predicate)1 StreamSupport (java.util.stream.StreamSupport)1 NonNull (org.eclipse.jdt.annotation.NonNull)1 Nullable (org.eclipse.jdt.annotation.Nullable)1 ColorRegistry (org.eclipse.jface.resource.ColorRegistry)1 SWT (org.eclipse.swt.SWT)1