context.updateRank(1);
}
- protected void updateIndex(TmfContext context, long rank, TmfTimestamp timestamp) {
+ protected void updateIndex(TmfContext context, long rank, ITmfTimestamp timestamp) {
if (getStartTime().compareTo(timestamp, false) > 0)
setStartTime(timestamp);
}
}
- private void addCheckPoint(TmfContext context, TmfTimestamp timestamp) {
+ private void addCheckPoint(TmfContext context, ITmfTimestamp timestamp) {
ITmfLocation<?> location = context.getLocation().clone();
fCheckpoints.add(new TmfCheckpoint(timestamp.clone(), location));
}
protected TmfTimeRange getInitTRange(TmfTimeRange experimentTRange) {
ITmfTimestamp expStartTime = experimentTRange.getStartTime();
ITmfTimestamp expEndTime = experimentTRange.getEndTime();
- TmfTimestamp initialEndOfWindow = new LttngTimestamp(expStartTime
+ ITmfTimestamp initialEndOfWindow = new LttngTimestamp(expStartTime
.getValue()
+ INITIAL_WINDOW_OFFSET);
if (initialEndOfWindow.compareTo(expEndTime, false) < 0) {
package org.eclipse.linuxtools.lttng.ui.views.events;\r
\r
import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;\r
+import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;\r
import org.eclipse.linuxtools.tmf.core.event.TmfEvent;\r
import org.eclipse.linuxtools.tmf.core.event.TmfEventField;\r
import org.eclipse.linuxtools.tmf.ui.viewers.events.TmfEventsTable;\r
* @return\r
*/\r
@Override\r
- protected TmfEventField[] extractItemFields(TmfEvent event) {\r
- TmfEventField[] fields = new TmfEventField[0];\r
+ protected ITmfEventField[] extractItemFields(TmfEvent event) {\r
+ ITmfEventField[] fields = new TmfEventField[0];\r
if (event != null) {\r
fields = new TmfEventField[] {\r
new TmfEventField(ITmfEvent.EVENT_FIELD_TIMESTAMP, ((Long) event.getTimestamp().getValue()).toString()),\r
/*******************************************************************************
- * Copyright (c) 2009 Ericsson
+ * Copyright (c) 2009, 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
*
* Contributors:
* Francois Chouinard - Initial API and implementation
+ * Francois Chouinard - Revisit for TMF Event Model 1.0
*******************************************************************************/
package org.eclipse.linuxtools.tmf.core.tests.event;
import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
import org.eclipse.linuxtools.tmf.core.parser.ITmfEventParser;
import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
}
@Override
- public void setStartTime(TmfTimestamp startTime) {
+ public void setStartTime(ITmfTimestamp startTime) {
super.setStartTime(startTime);
}
public static final String ROOT_ID = ":root:"; //$NON-NLS-1$
/**
- * @return the field ID
+ * @return the field name
*/
public String getName();
/* (non-Javadoc)
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
+ @Override
public int compareTo(ITmfTimestamp ts);
}
* <p>
* A basic implementation of ITmfEvent.
*
- * Note that for performance reasons TmfEvent is NOT immutable. If a copy of
- * the event is needed, use the copy constructor.
+ * Note that for performance reasons TmfEvent is NOT immutable. If a shallow
+ * copy of the event is needed, use the copy constructor. Otherwise (deep copy)
+ * use clone().
*/
public class TmfEvent implements ITmfEvent {
// Attributes
// ------------------------------------------------------------------------
+ /**
+ * The trace containing the event
+ */
protected ITmfTrace<? extends TmfEvent> fTrace;
+
+ /**
+ * The event rank within the trace
+ */
protected long fRank;
+
+ /**
+ * The event timestamp
+ */
protected ITmfTimestamp fTimestamp;
+
+ /**
+ * The event source
+ */
protected String fSource;
+
+ /**
+ * The event type
+ */
protected ITmfEventType fType;
+
+ /**
+ * The event content (root field)
+ */
protected ITmfEventField fContent;
+
+ /**
+ * The event reference
+ */
protected String fReference;
// ------------------------------------------------------------------------
* @param reference the event reference
*/
public TmfEvent(ITmfTrace<? extends TmfEvent> trace, long rank, ITmfTimestamp timestamp, String source,
- TmfEventType type, ITmfEventField content, String reference)
+ ITmfEventType type, ITmfEventField content, String reference)
{
fTrace = trace;
fRank = rank;
* Constructor - no rank
*/
public TmfEvent(ITmfTrace<? extends TmfEvent> trace, ITmfTimestamp timestamp, String source,
- TmfEventType type, ITmfEventField content, String reference)
+ ITmfEventType type, ITmfEventField content, String reference)
{
this(trace, -1, timestamp, source, type, content, reference);
}
* Constructor - no rank, no content
*/
public TmfEvent(ITmfTrace<? extends TmfEvent> trace, ITmfTimestamp timestamp, String source,
- TmfEventType type, String reference)
+ ITmfEventType type, String reference)
{
this(trace, -1, timestamp, source, type, null, reference);
}
/**
* Constructor - no rank, no content, no trace
*/
- public TmfEvent(TmfTimestamp timestamp, String source, TmfEventType type, String reference)
+ public TmfEvent(TmfTimestamp timestamp, String source, ITmfEventType type, String reference)
{
this(null, -1, timestamp, source, type, null, reference);
}
// ITmfEvent
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEvent#getTrace()
+ */
+ @Override
public ITmfTrace<? extends TmfEvent> getTrace() {
return fTrace;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEvent#getRank()
+ */
+ @Override
public long getRank() {
return fRank;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEvent#getTimestamp()
+ */
+ @Override
public ITmfTimestamp getTimestamp() {
return fTimestamp;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEvent#getSource()
+ */
+ @Override
public String getSource() {
return fSource;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEvent#getType()
+ */
+ @Override
public ITmfEventType getType() {
return fType;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEvent#getContent()
+ */
+ @Override
public ITmfEventField getContent() {
return fContent;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEvent#getReference()
+ */
+ @Override
public String getReference() {
return fReference;
}
/**
* @param type the new event type
*/
- public void setType(TmfEventType type) {
+ public void setType(ITmfEventType type) {
fType = type;
}
// Cloneable
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see java.lang.Object#clone()
+ */
@Override
public TmfEvent clone() {
TmfEvent clone = null;
// Object
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
@Override
@SuppressWarnings("nls")
public String toString() {
// ITmfEventField
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getName()
+ */
+ @Override
public String getName() {
return fName;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getValue()
+ */
+ @Override
public Object getValue() {
return fValue;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getFieldNames()
+ */
+ @Override
public String[] getFieldNames() {
return fFieldNames;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getFieldName(int)
+ */
+ @Override
public String getFieldName(int index) {
ITmfEventField field = getField(index);
if (field != null) {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getFields()
+ */
+ @Override
public ITmfEventField[] getFields() {
return fFields;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getField(java.lang.String)
+ */
+ @Override
public ITmfEventField getField(String name) {
+ // FIXME: Add treatment for 'special' fields
return fNameMapping.get(name);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getField(int)
+ */
+ @Override
public ITmfEventField getField(int index) {
if (index >= 0 && index < fFields.length)
return fFields[index];
// Cloneable
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see java.lang.Object#clone()
+ */
@Override
public ITmfEventField clone() {
TmfEventField clone = null;
// Object
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
@Override
@SuppressWarnings("nls")
public String toString() {
throw new IllegalArgumentException();
fContext = type.fContext;
fTypeId = type.fTypeId;
- fRootField = type.fRootField;
+ fRootField = type.fRootField;
}
// ------------------------------------------------------------------------
// ITmfEventType
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventType#getContext()
+ */
+ @Override
public String getContext() {
return fContext;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventType#getName()
+ */
+ @Override
public String getName() {
return fTypeId;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventType#getRootField()
+ */
+ @Override
public ITmfEventField getRootField() {
return fRootField;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventType#getFieldNames()
+ */
+ @Override
public String[] getFieldNames() {
return (fRootField != null) ? fRootField.getFieldNames() : null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventType#getFieldName(int)
+ */
+ @Override
public String getFieldName(int index) {
return (fRootField != null) ? fRootField.getFieldName(index) : null;
}
// Cloneable
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see java.lang.Object#clone()
+ */
@Override
public ITmfEventType clone() {
TmfEventType clone = null;
// Object
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
@Override
@SuppressWarnings("nls")
public String toString() {
// Constructors
// ------------------------------------------------------------------------
+ /**
+ * The singleton constructor
+ */
private TmfEventTypeManager() {
fEventTypes = new HashMap<String, HashMap<String, ITmfEventType>>();
}
+ /**
+ * @return the TmfEventTypeManager singleton
+ */
public static synchronized TmfEventTypeManager getInstance() {
if (fEventTypeManager == null) {
fEventTypeManager = new TmfEventTypeManager();
// Object
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
@Override
@SuppressWarnings("nls")
public String toString() {
// ITmfTimestamp
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#normalize(long, int)
+ */
@Override
public ITmfTimestamp normalize(long offset, int scale) throws ArithmeticException {
if (scale == 0) {
return super.normalize(offset, scale);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#compareTo(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp, boolean)
+ */
@Override
public int compareTo(ITmfTimestamp ts, boolean withinPrecision) {
if (ts instanceof TmfSimpleTimestamp) {
return super.compareTo(ts, withinPrecision);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#getDelta(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
+ */
@Override
public ITmfTimestamp getDelta(ITmfTimestamp ts) {
if (ts instanceof TmfSimpleTimestamp) {
// Object
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#equals(java.lang.Object)
+ */
@Override
public boolean equals(Object other) {
if (this == other)
return compareTo(ts, false) == 0;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#toString()
+ */
@Override
@SuppressWarnings("nls")
public String toString() {
// Constants
// ------------------------------------------------------------------------
+ /**
+ * The full possible time range
+ */
public static final TmfTimeRange Eternity =
new TmfTimeRange(TmfTimestamp.BigBang, TmfTimestamp.BigCrunch);
+ /**
+ * The null time range
+ */
public static final TmfTimeRange Null =
new TmfTimeRange(TmfTimestamp.BigBang, TmfTimestamp.BigBang);
if (startTime == null || endTime == null) {
throw new IllegalArgumentException();
}
- fStartTime = startTime.clone();
- fEndTime = endTime.clone();
+ fStartTime = startTime;
+ fEndTime = endTime;
}
/**
if (range == null) {
throw new IllegalArgumentException();
}
- fStartTime = range.getStartTime().clone();
- fEndTime = range.getEndTime().clone();
+ fStartTime = range.getStartTime();
+ fEndTime = range.getEndTime();
}
// ------------------------------------------------------------------------
// Cloneable
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see java.lang.Object#clone()
+ */
+ @Override
public TmfTimeRange clone() {
TmfTimeRange clone = null;
try {
// Object
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
@Override
@SuppressWarnings("nls")
public String toString() {
// Constants
// ------------------------------------------------------------------------
- // The beginning and end of time
- public static final ITmfTimestamp BigBang = new TmfTimestamp(Long.MIN_VALUE, Integer.MAX_VALUE, 0);
- public static final ITmfTimestamp BigCrunch = new TmfTimestamp(Long.MAX_VALUE, Integer.MAX_VALUE, 0);
- public static final ITmfTimestamp Zero = new TmfTimestamp(0, 0, 0);
+ /**
+ * The beginning of time
+ */
+ public static final ITmfTimestamp BigBang =
+ new TmfTimestamp(Long.MIN_VALUE, Integer.MAX_VALUE, 0);
+
+ /**
+ * The end of time
+ */
+ public static final ITmfTimestamp BigCrunch =
+ new TmfTimestamp(Long.MAX_VALUE, Integer.MAX_VALUE, 0);
+
+ /**
+ * Zero
+ */
+ public static final ITmfTimestamp Zero =
+ new TmfTimestamp(0, 0, 0);
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
- protected long fValue; // The timestamp raw value
- protected int fScale; // The time scale
- protected int fPrecision; // The value precision (tolerance)
+ /**
+ * The timestamp raw value (mantissa)
+ */
+ protected long fValue;
+
+ /**
+ * The timestamp scale (magnitude)
+ */
+ protected int fScale;
+
+ /**
+ * The value precision (tolerance)
+ */
+ protected int fPrecision;
// ------------------------------------------------------------------------
// Constructors
// ITmfTimestamp
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getValue()
+ */
+ @Override
public long getValue() {
return fValue;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getScale()
+ */
+ @Override
public int getScale() {
return fScale;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getPrecision()
+ */
+ @Override
public int getPrecision() {
return fPrecision;
}
1000000000000000000L,
};
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#normalize(long, int)
+ */
+ @Override
public ITmfTimestamp normalize(long offset, int scale) throws ArithmeticException {
long value = fValue;
return new TmfTimestamp(value, scale, precision);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#compareTo(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp, boolean)
+ */
+ @Override
public int compareTo(ITmfTimestamp ts, boolean withinPrecision) {
// Check the corner cases (we can't use equals() because it uses compareTo()...)
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getDelta(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
+ */
@Override
public ITmfTimestamp getDelta(ITmfTimestamp ts) {
ITmfTimestamp nts = ts.normalize(0, fScale);
// Cloneable
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see java.lang.Object#clone()
+ */
@Override
public ITmfTimestamp clone() {
TmfTimestamp clone = null;
// Comparable
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#compareTo(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
+ */
@Override
public int compareTo(ITmfTimestamp ts) {
return compareTo(ts, false);
// Object
// ------------------------------------------------------------------------
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
@Override
public boolean equals(Object other) {
if (this == other)
return compareTo(ts, false) == 0;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
@Override
@SuppressWarnings("nls")
public String toString() {
fEndTime = range.getEndTime();
}
- protected void setStartTime(TmfTimestamp startTime) {
+ protected void setStartTime(ITmfTimestamp startTime) {
fStartTime = startTime;
}
\r
import java.util.regex.Matcher;\r
\r
+import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;\r
import org.eclipse.linuxtools.tmf.core.event.TmfEvent;\r
import org.eclipse.linuxtools.tmf.core.event.TmfEventType;\r
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;\r
import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;\r
import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTxtTraceDefinition.InputData;\r
import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTxtTraceDefinition.InputLine;\r
super(definition, other);\r
}\r
\r
- public CustomTxtEvent(CustomTxtTraceDefinition definition, ITmfTrace<?> parentTrace, TmfTimestamp timestamp, String source, TmfEventType type, String reference) {\r
+ public CustomTxtEvent(CustomTxtTraceDefinition definition, ITmfTrace<?> parentTrace, ITmfTimestamp timestamp, String source, TmfEventType type, String reference) {\r
super(definition, parentTrace, timestamp, source, type, reference);\r
}\r
\r
import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;\r
import org.eclipse.linuxtools.tmf.core.component.TmfComponent;\r
import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;\r
+import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;\r
import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;\r
import org.eclipse.linuxtools.tmf.core.event.TmfEvent;\r
import org.eclipse.linuxtools.tmf.core.event.TmfEventField;\r
}\r
\r
protected void setItemData(TableItem item, TmfEvent event, long rank) {\r
- TmfEventField[] fields = extractItemFields(event);\r
+ ITmfEventField[] fields = extractItemFields(event);\r
String[] content = new String[fields.length];\r
for (int i = 0; i < fields.length; i++) {\r
content[i] = (String) fields[i].getValue();\r
* FIXME: Add support for column selection\r
*/\r
//TmfEventContent content, String id, Object value\r
- protected TmfEventField[] extractItemFields(TmfEvent event) {\r
- TmfEventField[] fields = new TmfEventField[0];\r
+ protected ITmfEventField[] extractItemFields(TmfEvent event) {\r
+ ITmfEventField[] fields = new TmfEventField[0];\r
if (event != null) {\r
fields = new TmfEventField[] {\r
new TmfEventField(ITmfEvent.EVENT_FIELD_TIMESTAMP, ((Long) event.getTimestamp().getValue()).toString()),\r
import org.eclipse.jface.viewers.SelectionChangedEvent;\r
import org.eclipse.jface.viewers.StructuredSelection;\r
import org.eclipse.jface.viewers.TreeViewer;\r
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;\r
import org.eclipse.linuxtools.tmf.core.event.ITmfEventType;\r
import org.eclipse.linuxtools.tmf.core.event.TmfEvent;\r
import org.eclipse.linuxtools.tmf.core.filter.model.ITmfFilterTreeNode;\r
for (IConfigurationElement ce : TmfTraceType.getTypeElements()) {\r
if (ce.getAttribute(TmfTraceType.EVENT_TYPE_ATTR).equals(eventTypeNode.getEventType())) {\r
try {\r
- TmfEvent event = (TmfEvent) ce.createExecutableExtension(TmfTraceType.EVENT_TYPE_ATTR);\r
+ ITmfEvent event = (TmfEvent) ce.createExecutableExtension(TmfTraceType.EVENT_TYPE_ATTR);\r
ITmfEventType eventType = event.getType();\r
if (eventType != null) {\r
for (String field : eventType.getRootField().getFieldNames()) {\r
int step = SCALE_LENGTH / 10;
// double gr = (max - min) / 10;
- TmfTimestamp minMaxdelta = (TmfTimestamp) minMaxRange.getEndTime().getDelta(minMaxRange.getStartTime());
+ ITmfTimestamp minMaxdelta = (TmfTimestamp) minMaxRange.getEndTime().getDelta(minMaxRange.getStartTime());
double gr = (minMaxdelta.getValue()) / (double) 10;
// double delta = currentValue-min;
- TmfTimestamp delta = (TmfTimestamp) currentValue.getDelta(minMaxRange.getStartTime());
+ ITmfTimestamp delta = (TmfTimestamp) currentValue.getDelta(minMaxRange.getStartTime());
long absDelta = Math.abs(delta.getValue());
int colIndex = 0;
min = frame.getMinTime();
max = frame.getMaxTime();
- TmfTimestamp minMaxdelta = (TmfTimestamp) max.getDelta(min);
+ ITmfTimestamp minMaxdelta = (TmfTimestamp) max.getDelta(min);
double gr = (minMaxdelta.getValue()) / (double) 10;
- TmfTimestamp delta = (TmfTimestamp) m2.getTime().getDelta(m1.getTime()).getDelta(min);
+ ITmfTimestamp delta = (TmfTimestamp) m2.getTime().getDelta(m1.getTime()).getDelta(min);
long absDelta = Math.abs(delta.getValue());
ColorImpl color;
return minTime;
}
- public void setMin(TmfTimestamp min) {
+ public void setMin(ITmfTimestamp min) {
minTime = min;
customMinMax = true;
}
- public void setMax(TmfTimestamp max) {
+ public void setMax(ITmfTimestamp max) {
maxTime = max;
customMinMax = true;
}
package org.eclipse.linuxtools.tmf.ui.views.uml2sd.core;
import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IColor;
import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC;
import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IImage;
*
* @param time the time when the execution occurrence starts
*/
- public void setStartTime(TmfTimestamp time) {
+ public void setStartTime(ITmfTimestamp time) {
startTime = time.clone();
hasTime = true;
if (lifeline != null) {
*
* @param time the time when the execution occurrence ends
*/
- public void setEndTime(TmfTimestamp time) {
+ public void setEndTime(ITmfTimestamp time) {
endTime = time.clone();
hasTime = true;
if (lifeline != null) {
import java.util.List;
import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IColor;
import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC;
import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.SDViewPref;
* @param bounds a two items array that will receive bounds if found
* @return true if both bounds not null
*/
- public boolean findDateBounds(TmfTimestamp dateToFind, ITimeRange bounds[]) {
+ public boolean findDateBounds(ITmfTimestamp dateToFind, ITimeRange bounds[]) {
if (hasTimeInfo()) {
List<SDTimeEvent> timeArray = buildTimeArray();
bounds[0] = null;
try {
if ((signal.getSource() != this) && (fFrame != null) && !fIsSignalSent) {
TmfTimeRange newTimeRange = signal.getCurrentRange();
- TmfTimestamp delta = (TmfTimestamp) newTimeRange.getEndTime().getDelta(newTimeRange.getStartTime());
+ ITmfTimestamp delta = (TmfTimestamp) newTimeRange.getEndTime().getDelta(newTimeRange.getStartTime());
fInitialWindow = delta.getValue();
fIsSelect = false;