public static String ManageCustomParsersDialog_NewButtonLabel;
public static String ManageCustomParsersDialog_TextButtonLabel;
+ public static String MarkerEvent_Bookmark;
+
public static String TmfEventsTable_AddBookmarkActionText;
public static String TmfEventsTable_ApplyPresetFilterMenuName;
public static String TmfEventsTable_ClearFiltersActionText;
TmfMarker_LocationTime=timestamp [{0}]
TmfMarker_LocationTimeRange=timestamp [{0}, {1}]
-# org.eclipse.tracecompass.tmf.ui.viewers.timegraph.dialogs
+# org.eclipse.tracecompass.tmf.ui.widgets.timegraph.dialogs
TmfTimeFilterDialog_EDIT_PROFILING_OPTIONS=Edit Profiling Options
TmfTimeFilterDialog_TRACE_FILTER=Trace Filter
TmfTimeFilterDialog_TRACE_FILTER_DESC=Define the filter set
TmfTimeFilterDialog_CHECK_SUBTREE=Check subtree
TmfTimeFilterDialog_UNCHECK_SUBTREE=Uncheck subtree
-# org.eclipse.tracecompass.tmf.ui.viewers.timegraph.widgets
+# org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model
+MarkerEvent_Bookmark=Bookmark
+
+# org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets
TmfTimeTipHandler_DURATION=Duration
TmfTimeTipHandler_LINK_SOURCE=Source
TmfTimeTipHandler_LINK_SOURCE_TIME=Source Time
ColorsView_TickButtonText=Tick
TickColorDialog_TickColorDialogTitle=Choose tick color
-# org.eclipse.tracecompass.tmf.ui.wizards
+# org.eclipse.tracecompass.tmf.ui.parsers.wizards
CustomTxtParserInputWizardPage_addChildLine=Add child line
CustomTxtParserInputWizardPage_addGroup=Add group
CustomTxtParserInputWizardPage_addNextLine=Add next line
TmfView_AlignViewsActionNameText=Align Views
TmfView_AlignViewsActionToolTipText=Align Views
-# Call Stack View
+# org.eclipse.tracecompass.tmf.ui.views.callstack
CallStackPresentationProvider_Thread=Thread
CallStackView_FunctionColumn=Function
CallStackView_DepthColumn=Depth
int alpha = Integer.valueOf(matcher.group(4));
Color color = new Color(Display.getDefault(), red, green, blue, alpha);
fColors.add(color);
- bookmarks.add(new MarkerEvent(null, Long.valueOf(time), Long.valueOf(duration), color, label, true));
+ bookmarks.add(new MarkerEvent(null, Long.valueOf(time), Long.valueOf(duration), IMarkerEvent.BOOKMARK, color, label, true));
} catch (NumberFormatException e) {
Activator.getDefault().logError(e.getMessage());
}
long resolution, @NonNull IProgressMonitor monitor) {
List<IMarkerEvent> markers = new ArrayList<>();
for (IMarkerEventSource markerEventSource : getMarkerEventSources(getTrace())) {
- if (monitor.isCanceled()) {
- break;
+ for (String category : markerEventSource.getMarkerCategories()) {
+ if (monitor.isCanceled()) {
+ break;
+ }
+ markers.addAll(markerEventSource.getMarkerList(checkNotNull(category), startTime, endTime, resolution, monitor));
}
- markers.addAll(markerEventSource.getMarkerList(startTime, endTime, resolution, monitor));
}
return markers;
}
final RGBA rgba = dialog.getColorValue();
Color color = new Color(Display.getDefault(), rgba.rgb.red, rgba.rgb.green, rgba.rgb.blue, rgba.alpha);
fColors.add(color);
- IMarkerEvent bookmark = new MarkerEvent(null, time, duration, color, label, true);
+ IMarkerEvent bookmark = new MarkerEvent(null, time, duration, IMarkerEvent.BOOKMARK, color, label, true);
fBookmarks.add(bookmark);
Collections.sort(fBookmarks, new BookmarkComparator());
getTimeGraphControl().setBookmarks(fBookmarks);
package org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model;
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.swt.graphics.Color;
+import org.eclipse.tracecompass.internal.tmf.ui.Messages;
/**
- * Interface for a marker time event that includes a color and optional label.
+ * Interface for a marker time event that includes a category, a color and
+ * an optional label.
*
* @since 2.0
*/
public interface IMarkerEvent extends ITimeEvent {
+ /** Bookmark marker category */
+ @NonNull String BOOKMARK = checkNotNull(Messages.MarkerEvent_Bookmark);
+
+ /**
+ * Get this marker's category.
+ *
+ * @return The category
+ */
+ String getCategory();
+
/**
* Get this marker's label.
*
public interface IMarkerEventSource {
/**
- * Gets the list of marker events in a given time range.
+ * Gets the list of marker categories that this object provides.
*
+ * @return The list of marker categories
+ */
+ @NonNull List<String> getMarkerCategories();
+
+ /**
+ * Gets the list of marker events of a specific category in a given time
+ * range.
+ *
+ * @param category
+ * The marker category
* @param startTime
* Start of the time range
* @param endTime
* @param monitor
* The progress monitor object
* @return The list of marker events
- * @since 2.0
*/
- @NonNull List<IMarkerEvent> getMarkerList(long startTime, long endTime, long resolution, @NonNull IProgressMonitor monitor);
+ @NonNull List<IMarkerEvent> getMarkerList(@NonNull String category, long startTime, long endTime, long resolution, @NonNull IProgressMonitor monitor);
}
*/
public class MarkerEvent extends TimeEvent implements IMarkerEvent {
+ private final String fCategory;
private final Color fColor;
private final String fLabel;
private final boolean fForeground;
* The timestamp of this marker
* @param duration
* The duration of the marker
+ * @param category
+ * The category of the marker
* @param color
* The marker color
* @param label
* @param foreground
* true if the marker is drawn in foreground, and false otherwise
*/
- public MarkerEvent(ITimeGraphEntry entry, long time, long duration, Color color, String label, boolean foreground) {
+ public MarkerEvent(ITimeGraphEntry entry, long time, long duration, String category, Color color, String label, boolean foreground) {
super(entry, time, duration);
+ fCategory = category;
fColor = color;
fLabel = label;
fForeground = foreground;
* The timestamp of this marker
* @param duration
* The duration of the marker
+ * @param category
+ * The category of the marker
* @param color
* The marker color
* @param label
* @param value
* The value of the marker
*/
- public MarkerEvent(ITimeGraphEntry entry, long time, long duration, Color color, String label, boolean foreground, int value) {
+ public MarkerEvent(ITimeGraphEntry entry, long time, long duration, String category, Color color, String label, boolean foreground, int value) {
super(entry, time, duration, value);
+ fCategory = category;
fColor = color;
fLabel = label;
fForeground = foreground;
}
+ @Override
+ public String getCategory() {
+ return fCategory;
+ }
+
@Override
public Color getColor() {
return fColor;