X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=org.eclipse.linuxtools.lttng2.kernel.ui%2Fsrc%2Forg%2Feclipse%2Flinuxtools%2Finternal%2Flttng2%2Fkernel%2Fui%2Fviews%2Fcontrolflow%2FControlFlowEvent.java;h=b84f5dd03dbab851f47b2d1395248bb359226a4a;hb=af10fe0675db85fe9fda12d0d8df438b0e1c865d;hp=52d6f6784d6cae4ef20c90450506bd70e882806c;hpb=27f3a03d3cce2e3e9631ddfd56b66e6574b10684;p=deliverable%2Ftracecompass.git diff --git a/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowEvent.java b/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowEvent.java index 52d6f6784d..b84f5dd03d 100644 --- a/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowEvent.java +++ b/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowEvent.java @@ -1,51 +1,56 @@ -/******************************************************************************* - * Copyright (c) 2012 Ericsson - * - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License v1.0 which - * accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Patrick Tasse - Initial API and implementation - *******************************************************************************/ - -package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow; - -import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry; -import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent; - -/** - * Time Event specific to the control flow view - */ -public class ControlFlowEvent extends TimeEvent { - - private final int fStatus; - - /** - * Constructor - * - * @param entry - * The entry to which this time event is assigned - * @param time - * The timestamp of this event - * @param duration - * The duration of this event - * @param status - * The status assigned to the event - */ - public ControlFlowEvent(ITimeGraphEntry entry, long time, long duration, - int status) { - super(entry, time, duration); - fStatus = status; - } - - /** - * Get this event's status - * - * @return The integer matching this status - */ - public int getStatus() { - return fStatus; - } -} +/******************************************************************************* + * Copyright (c) 2012, 2013 Ericsson + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License v1.0 which + * accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Patrick Tasse - Initial API and implementation + *******************************************************************************/ + +package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow; + +import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry; +import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent; + +/** + * Time Event specific to the control flow view + */ +public class ControlFlowEvent extends TimeEvent { + + private final int fStatus; + + /** + * Constructor + * + * @param entry + * The entry to which this time event is assigned + * @param time + * The timestamp of this event + * @param duration + * The duration of this event + * @param status + * The status assigned to the event + */ + public ControlFlowEvent(ITimeGraphEntry entry, long time, long duration, + int status) { + super(entry, time, duration); + fStatus = status; + } + + /** + * Get this event's status + * + * @return The integer matching this status + */ + public int getStatus() { + return fStatus; + } + + @Override + public String toString() { + return "ControlFlowEvent start=" + fTime + " end=" + (fTime + fDuration) + " duration=" + fDuration + " status=" + fStatus; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + } +}