From f8f46a524251008dd9f55bfc3c87445a0c490758 Mon Sep 17 00:00:00 2001 From: Patrick Tasse Date: Thu, 7 Apr 2016 18:13:55 -0400 Subject: [PATCH] tmf: Update AbstractTimeGraphView and TimeGraphEntry API AbstractTimeGraphView.buildEventList() is renamed to buildEntryList() which is more representative of its implementation. The Javadoc of this method and getEventList() is improved to better explain their use. TimeGraphEntry methods setParent(), getParent(), getChildren() and addChild(...) are changed to restrict the entries to TimeGraphEntry. This avoids instanceof checks in AbstractTimeGraphView implementations, and avoids unexpected behavior in case a child or parent entry is not of type TimeGraphEntry. Change-Id: Ibf1c3f3fad467ab7ff215fd2552bb3350f00ef7e Signed-off-by: Patrick Tasse Reviewed-on: https://git.eclipse.org/r/70185 Reviewed-by: Hudson CI Reviewed-by: Matthew Khouzam Tested-by: Matthew Khouzam --- .../criticalpath/view/CriticalPathView.java | 4 +- .../ui/views/controlflow/ControlFlowView.java | 4 +- .../ui/views/resources/ResourcesView.java | 25 +++---- .../views/vm/vcpuview/VirtualMachineView.java | 15 ++--- .../ui/views/timegraph/XmlTimeGraphView.java | 4 +- .../tmf/ui/views/callstack/CallStackView.java | 2 +- .../AbstractStateSystemTimeGraphView.java | 19 +++--- .../timegraph/AbstractTimeGraphView.java | 27 +++++--- .../timegraph/model/TimeGraphEntry.java | 67 +++++-------------- 9 files changed, 65 insertions(+), 102 deletions(-) diff --git a/analysis/org.eclipse.tracecompass.analysis.graph.ui/src/org/eclipse/tracecompass/internal/analysis/graph/ui/criticalpath/view/CriticalPathView.java b/analysis/org.eclipse.tracecompass.analysis.graph.ui/src/org/eclipse/tracecompass/internal/analysis/graph/ui/criticalpath/view/CriticalPathView.java index 67a5bfe4fc..e716284d5d 100644 --- a/analysis/org.eclipse.tracecompass.analysis.graph.ui/src/org/eclipse/tracecompass/internal/analysis/graph/ui/criticalpath/view/CriticalPathView.java +++ b/analysis/org.eclipse.tracecompass.analysis.graph.ui/src/org/eclipse/tracecompass/internal/analysis/graph/ui/criticalpath/view/CriticalPathView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 École Polytechnique de Montréal + * Copyright (c) 2015, 2016 École Polytechnique de Montréal * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which @@ -468,7 +468,7 @@ public class CriticalPathView extends AbstractTimeGraphView { } @Override - protected void buildEventList(@NonNull ITmfTrace trace, @NonNull ITmfTrace parentTrace, @NonNull IProgressMonitor monitor) { + protected void buildEntryList(@NonNull ITmfTrace trace, @NonNull ITmfTrace parentTrace, @NonNull IProgressMonitor monitor) { /* This class uses a content provider instead */ } diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowView.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowView.java index c31fd20779..822685c070 100644 --- a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowView.java +++ b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2015 Ericsson, École Polytechnique de Montréal and others. + * Copyright (c) 2012, 2016 Ericsson, École Polytechnique de Montréal and others. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which @@ -246,7 +246,7 @@ public class ControlFlowView extends AbstractStateSystemTimeGraphView { // ------------------------------------------------------------------------ @Override - protected void buildEventList(final ITmfTrace trace, final ITmfTrace parentTrace, final IProgressMonitor monitor) { + protected void buildEntryList(final ITmfTrace trace, final ITmfTrace parentTrace, final IProgressMonitor monitor) { final ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID); if (ssq == null) { return; diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesView.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesView.java index a760e4dbbf..933470ae14 100644 --- a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesView.java +++ b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesView.java @@ -155,7 +155,7 @@ public class ResourcesView extends AbstractStateSystemTimeGraphView { } @Override - protected void buildEventList(ITmfTrace trace, ITmfTrace parentTrace, final IProgressMonitor monitor) { + protected void buildEntryList(ITmfTrace trace, ITmfTrace parentTrace, final IProgressMonitor monitor) { final ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID); if (ssq == null) { return; @@ -196,34 +196,31 @@ public class ResourcesView extends AbstractStateSystemTimeGraphView { if (parentTrace.equals(getTrace())) { refresh(); } - final List traceEntryChildren = traceEntry.getChildren(); + final List<@NonNull TimeGraphEntry> traceEntryChildren = traceEntry.getChildren(); final long resolution = Math.max(1, (endTime - ssq.getStartTime()) / getDisplayWidth()); final long qStart = start; final long qEnd = end; queryFullStates(ssq, qStart, qEnd, resolution, monitor, new IQueryHandler() { @Override public void handle(List> fullStates, List prevFullState) { - for (ITimeGraphEntry child : traceEntryChildren) { + for (TimeGraphEntry child : traceEntryChildren) { if (!populateEventsRecursively(fullStates, prevFullState, child).isOK()) { return; } } } - private IStatus populateEventsRecursively(@NonNull List> fullStates, @Nullable List prevFullState, ITimeGraphEntry entry) { + private IStatus populateEventsRecursively(@NonNull List> fullStates, @Nullable List prevFullState, @NonNull TimeGraphEntry entry) { if (monitor.isCanceled()) { return Status.CANCEL_STATUS; } - if (entry instanceof TimeGraphEntry) { - TimeGraphEntry timeGraphEntry = (TimeGraphEntry) entry; - List eventList = getEventList(timeGraphEntry, ssq, fullStates, prevFullState, monitor); - if (eventList != null) { - for (ITimeEvent event : eventList) { - timeGraphEntry.addEvent(event); - } + List eventList = getEventList(entry, ssq, fullStates, prevFullState, monitor); + if (eventList != null) { + for (ITimeEvent event : eventList) { + entry.addEvent(event); } } - for (ITimeGraphEntry child : entry.getChildren()) { + for (TimeGraphEntry child : entry.getChildren()) { IStatus status = populateEventsRecursively(fullStates, prevFullState, child); if (!status.isOK()) { return status; @@ -339,7 +336,7 @@ public class ResourcesView extends AbstractStateSystemTimeGraphView { return null; } - private static List createCpuEventsList(TimeGraphEntry entry, ITmfStateSystem ssq, List> fullStates, List prevFullState, IProgressMonitor monitor, int quark) { + private static List createCpuEventsList(ITimeGraphEntry entry, ITmfStateSystem ssq, List> fullStates, List prevFullState, IProgressMonitor monitor, int quark) { List eventList; int statusQuark; try { @@ -384,7 +381,7 @@ public class ResourcesView extends AbstractStateSystemTimeGraphView { return eventList; } - private static List createIrqEventsList(TimeGraphEntry entry, List> fullStates, List prevFullState, IProgressMonitor monitor, int quark) { + private static List createIrqEventsList(ITimeGraphEntry entry, List> fullStates, List prevFullState, IProgressMonitor monitor, int quark) { List eventList; eventList = new ArrayList<>(fullStates.size()); ITmfStateInterval lastInterval = prevFullState == null || quark >= prevFullState.size() ? null : prevFullState.get(quark); diff --git a/lttng/org.eclipse.tracecompass.lttng2.kernel.ui/src/org/eclipse/tracecompass/internal/lttng2/kernel/ui/views/vm/vcpuview/VirtualMachineView.java b/lttng/org.eclipse.tracecompass.lttng2.kernel.ui/src/org/eclipse/tracecompass/internal/lttng2/kernel/ui/views/vm/vcpuview/VirtualMachineView.java index 541aad0bee..4352641034 100644 --- a/lttng/org.eclipse.tracecompass.lttng2.kernel.ui/src/org/eclipse/tracecompass/internal/lttng2/kernel/ui/views/vm/vcpuview/VirtualMachineView.java +++ b/lttng/org.eclipse.tracecompass.lttng2.kernel.ui/src/org/eclipse/tracecompass/internal/lttng2/kernel/ui/views/vm/vcpuview/VirtualMachineView.java @@ -131,7 +131,7 @@ public class VirtualMachineView extends AbstractTimeGraphView { // ------------------------------------------------------------------------ @Override - protected void buildEventList(ITmfTrace trace, ITmfTrace parentTrace, IProgressMonitor monitor) { + protected void buildEntryList(ITmfTrace trace, ITmfTrace parentTrace, IProgressMonitor monitor) { setStartTime(Long.MAX_VALUE); setEndTime(Long.MIN_VALUE); @@ -311,14 +311,11 @@ public class VirtualMachineView extends AbstractTimeGraphView { List eventList = getEventList(entry, startTime, endTime, resolution, monitor); entry.setEventList(eventList); redraw(); - for (ITimeGraphEntry child : entry.getChildren()) { - if (!(child instanceof TimeGraphEntry)) { - continue; - } + for (TimeGraphEntry child : entry.getChildren()) { if (monitor.isCanceled()) { return; } - buildEntryEventList((TimeGraphEntry) child, ssq, start, end, monitor); + buildEntryEventList(child, ssq, start, end, monitor); } } } @@ -465,14 +462,12 @@ public class VirtualMachineView extends AbstractTimeGraphView { * The parent VM entry will contain the thread intervals for all * threads. Just take the list from there */ - ITimeGraphEntry parent = vmEntry.getParent(); + TimeGraphEntry parent = vmEntry.getParent(); while (threadIntervals == null && parent != null) { if (parent instanceof VirtualMachineViewEntry) { threadIntervals = ((VirtualMachineViewEntry) parent).getThreadIntervals(vmEntry.getNumericId()); } - if (parent instanceof TimeGraphEntry) { - parent = ((TimeGraphEntry) parent).getParent(); - } + parent = parent.getParent(); } return threadIntervals; } diff --git a/tmf/org.eclipse.tracecompass.tmf.analysis.xml.ui/src/org/eclipse/tracecompass/tmf/analysis/xml/ui/views/timegraph/XmlTimeGraphView.java b/tmf/org.eclipse.tracecompass.tmf.analysis.xml.ui/src/org/eclipse/tracecompass/tmf/analysis/xml/ui/views/timegraph/XmlTimeGraphView.java index e7116ff571..0b40966ad9 100644 --- a/tmf/org.eclipse.tracecompass.tmf.analysis.xml.ui/src/org/eclipse/tracecompass/tmf/analysis/xml/ui/views/timegraph/XmlTimeGraphView.java +++ b/tmf/org.eclipse.tracecompass.tmf.analysis.xml.ui/src/org/eclipse/tracecompass/tmf/analysis/xml/ui/views/timegraph/XmlTimeGraphView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2014 École Polytechnique de Montréal + * Copyright (c) 2014, 2016 École Polytechnique de Montréal * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which @@ -221,7 +221,7 @@ public class XmlTimeGraphView extends AbstractTimeGraphView { // ------------------------------------------------------------------------ @Override - protected void buildEventList(ITmfTrace trace, ITmfTrace parentTrace, IProgressMonitor monitor) { + protected void buildEntryList(ITmfTrace trace, ITmfTrace parentTrace, IProgressMonitor monitor) { /* * Get the view element from the XML file. If the element can't be diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java index 8efa4881f0..f63595e784 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java @@ -534,7 +534,7 @@ public class CallStackView extends AbstractTimeGraphView { } @Override - protected void buildEventList(final ITmfTrace trace, final ITmfTrace parentTrace, final IProgressMonitor monitor) { + protected void buildEntryList(final ITmfTrace trace, final ITmfTrace parentTrace, final IProgressMonitor monitor) { if (monitor.isCanceled()) { return; } diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractStateSystemTimeGraphView.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractStateSystemTimeGraphView.java index b2ec511046..d27ffb2947 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractStateSystemTimeGraphView.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractStateSystemTimeGraphView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Ericsson + * Copyright (c) 2015, 2016 Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which @@ -33,7 +33,6 @@ import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.TimeGraphPresentationPr import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ILinkEvent; import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.IMarkerEvent; import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent; -import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeGraphEntry; import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeGraphEntry; import com.google.common.collect.HashMultimap; @@ -171,13 +170,11 @@ public abstract class AbstractStateSystemTimeGraphView extends AbstractTimeGraph } }); } - for (ITimeGraphEntry child : entry.getChildren()) { + for (TimeGraphEntry child : entry.getChildren()) { if (monitor.isCanceled()) { return; } - if (child instanceof TimeGraphEntry) { - zoom((TimeGraphEntry) child, ss, fullStates, prevFullState, monitor); - } + zoom(child, ss, fullStates, prevFullState, monitor); } } @@ -198,10 +195,8 @@ public abstract class AbstractStateSystemTimeGraphView extends AbstractTimeGraph private void clearZoomedList(TimeGraphEntry entry) { entry.setZoomedEventList(null); - for (ITimeGraphEntry child : entry.getChildren()) { - if (child instanceof TimeGraphEntry) { - clearZoomedList((TimeGraphEntry) child); - } + for (TimeGraphEntry child : entry.getChildren()) { + clearZoomedList(child); } } } @@ -369,6 +364,10 @@ public abstract class AbstractStateSystemTimeGraphView extends AbstractTimeGraph /** * Gets the list of events for an entry for a given list of full states. + *

+ * Called from the ZoomThread for every entry to update the zoomed event + * list. Can be an empty implementation if the view does not support zoomed + * event lists. Can also be used to compute the full event list. * * @param tgentry * The time graph entry diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java index 1a31a46dd6..d65a9f2641 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/timegraph/AbstractTimeGraphView.java @@ -696,7 +696,7 @@ public abstract class AbstractTimeGraphView extends TmfView implements ITmfTimeA @Override public void run() { - buildEventList(fBuildTrace, fParentTrace, fMonitor); + buildEntryList(fBuildTrace, fParentTrace, fMonitor); synchronized (fBuildThreadMap) { fBuildThreadMap.remove(fBuildTrace); } @@ -849,13 +849,11 @@ public abstract class AbstractTimeGraphView extends TmfView implements ITmfTimeA } } redraw(); - for (ITimeGraphEntry child : entry.getChildren()) { + for (TimeGraphEntry child : entry.getChildren()) { if (monitor.isCanceled()) { return; } - if (child instanceof TimeGraphEntry) { - zoom((TimeGraphEntry) child, monitor); - } + zoom(child, monitor); } } @@ -1644,9 +1642,11 @@ public abstract class AbstractTimeGraphView extends TmfView implements ITmfTimeA } /** - * Build the entries list to show in this time graph - * - * Called from the BuildThread + * Build the entry list to show in this time graph view. + *

+ * Called from the BuildThread for each trace returned by + * {@link #getTracesToBuild(ITmfTrace)}. The full event list is also + * normally computed for every entry that is created. * * @param trace * The trace being built @@ -1654,11 +1654,16 @@ public abstract class AbstractTimeGraphView extends TmfView implements ITmfTimeA * The parent of the trace set, or the trace itself * @param monitor * The progress monitor object + * @since 2.0 */ - protected abstract void buildEventList(@NonNull ITmfTrace trace, @NonNull ITmfTrace parentTrace, @NonNull IProgressMonitor monitor); + protected abstract void buildEntryList(@NonNull ITmfTrace trace, @NonNull ITmfTrace parentTrace, @NonNull IProgressMonitor monitor); /** - * Gets the list of event for an entry in a given timerange + * Gets the list of event for an entry in a given time range. + *

+ * Called from the ZoomThread for every entry to update the zoomed event + * list. Can be an empty implementation if the view does not support zoomed + * event lists. Can also be used to compute the full event list. * * @param entry * The entry to get events for @@ -2264,7 +2269,7 @@ public abstract class AbstractTimeGraphView extends TmfView implements ITmfTimeA fEntryMenuManager.addMenuListener(new IMenuListener() { @Override public void menuAboutToShow(IMenuManager manager) { - fillTimeGraphEntryContextMenu(fEntryMenuManager); + fillTimeGraphEntryContextMenu(fEntryMenuManager); fEntryMenuManager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); } }); diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/model/TimeGraphEntry.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/model/TimeGraphEntry.java index 4c6356bb6a..f25342a91e 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/model/TimeGraphEntry.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/model/TimeGraphEntry.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2015 Ericsson, École Polytechnique de Montréal + * Copyright (c) 2012, 2016 Ericsson, École Polytechnique de Montréal * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which @@ -30,10 +30,10 @@ import org.eclipse.swt.SWT; public class TimeGraphEntry implements ITimeGraphEntry { /** Entry's parent */ - private ITimeGraphEntry fParent = null; + private TimeGraphEntry fParent = null; /** List of child entries */ - private final List<@NonNull ITimeGraphEntry> fChildren = new CopyOnWriteArrayList<>(); + private final List<@NonNull TimeGraphEntry> fChildren = new CopyOnWriteArrayList<>(); /** Name of this entry (text to show) */ private String fName; @@ -63,32 +63,21 @@ public class TimeGraphEntry implements ITimeGraphEntry { // Getters and setters // --------------------------------------------- - @Override - public ITimeGraphEntry getParent() { - return fParent; - } - /** - * Sets the entry's parent - * - * @param entry The new parent entry - */ - /* - * TODO: This method can be removed in the next major API version. + * @since 2.0 */ - protected void setParent(TimeGraphEntry entry) { - fParent = entry; + @Override + public TimeGraphEntry getParent() { + return fParent; } /** * Sets the entry's parent * * @param entry The new parent entry + * @since 2.0 */ - /* - * TODO: This method should be added to the interface in the next major API version. - */ - protected void setParent(ITimeGraphEntry entry) { + public void setParent(TimeGraphEntry entry) { fParent = entry; } @@ -98,7 +87,7 @@ public class TimeGraphEntry implements ITimeGraphEntry { } @Override - public synchronized List<@NonNull ? extends ITimeGraphEntry> getChildren() { + public synchronized List<@NonNull TimeGraphEntry> getChildren() { return fChildren; } @@ -250,19 +239,6 @@ public class TimeGraphEntry implements ITimeGraphEntry { } } - /** - * Add a child entry to this one - * - * @param child - * The child entry - */ - /* - * TODO: This method can be removed in the next major API version. - */ - public synchronized void addChild(@NonNull TimeGraphEntry child) { - addChild((ITimeGraphEntry) child); - } - /** * Add a child entry to this one. If a comparator was previously set with * {@link #sortChildren(Comparator)}, the entry will be inserted in its @@ -271,13 +247,8 @@ public class TimeGraphEntry implements ITimeGraphEntry { * @param child * The child entry */ - public synchronized void addChild(@NonNull ITimeGraphEntry child) { - /* - * TODO: Use setParent() once it is added to the interface. - */ - if (child instanceof TimeGraphEntry) { - ((TimeGraphEntry) child).fParent = this; - } + public synchronized void addChild(@NonNull TimeGraphEntry child) { + child.setParent(this); if (fComparator == null) { fChildren.add(child); } else { @@ -299,20 +270,16 @@ public class TimeGraphEntry implements ITimeGraphEntry { * Index at which the specified entry is to be inserted * @param child * The child entry + * @since 2.0 */ - public synchronized void addChild(int index, @NonNull ITimeGraphEntry child) { - /* - * TODO: Use setParent() once it is added to the interface. - */ - if (child instanceof TimeGraphEntry) { - ((TimeGraphEntry) child).fParent = this; - } + public synchronized void addChild(int index, @NonNull TimeGraphEntry child) { + child.setParent(this); fChildren.add(index, child); } /** * Sort the children of this entry using the provided comparator. Subsequent - * calls to {@link #addChild(ITimeGraphEntry)} will use this comparator to + * calls to {@link #addChild(TimeGraphEntry)} will use this comparator to * maintain the sort order. * * @param comparator @@ -323,7 +290,7 @@ public class TimeGraphEntry implements ITimeGraphEntry { if (comparator == null) { return; } - @NonNull ITimeGraphEntry[] array = fChildren.toArray(new @NonNull ITimeGraphEntry[0]); + @NonNull TimeGraphEntry[] array = fChildren.toArray(new @NonNull TimeGraphEntry[0]); Arrays.sort(array, comparator); fChildren.clear(); fChildren.addAll(Arrays.asList(array)); -- 2.34.1