/**
* Copy constructor
- *
- * @return
*/
public CTFTraceReader copyFrom() {
CTFTraceReader newReader = null;
/**
* Return the start time of this trace (== timestamp of the first event)
*
- * @return
+ * @return the trace start time
*/
public long getStartTime() {
return this.startTime;
*
* @param timestamp
* the timestamp to seek to
- * @return
+ * @return true if the trace has more events following the timestamp
*/
public boolean seek(long timestamp) {
/*
* Note : If the events were read before, the top event and the event
* currently loaded (currentEvent) are most likely the same.
*
- * @@return The top event in the stack or null if no event is available or if the heap is null.
+ * @return The top event in the stack or null if no event is available or if the heap is null.
*
* @see org.eclipse.linuxtools.lttng.jni.JniEvent
*/
/**
* Default constructor
+ *
+ * @param dataType
*/
public TmfDataRequestStub(Class<T> dataType) {
super(dataType);
}
/**
- * @param nbRequested
+ * @param dataType
+ * @param index
*/
public TmfDataRequestStub(Class<T> dataType, int index) {
super(dataType, index);
}
/**
+ * @param dataType
* @param index
* @param nbRequested
*/
}
/**
+ * @param dataType
* @param index
* @param nbRequested
* @param blockSize
super(dataType, index, nbRequested, blockSize);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.request.TmfDataRequest#handleData(org.eclipse.linuxtools.tmf.core.event.ITmfEvent)
+ */
@Override
public void handleData(T data) {
super.handleData(data);
public class TmfEventRequestStub<T extends TmfEvent> extends TmfEventRequest<T> {
/**
- * @param range
+ * @param dataType
*/
public TmfEventRequestStub(Class<T> dataType) {
super(dataType);
}
/**
+ * @param dataType
* @param range
*/
public TmfEventRequestStub(Class<T> dataType, TmfTimeRange range) {
}
/**
+ * @param dataType
* @param range
* @param nbRequested
*/
}
/**
+ * @param dataType
* @param range
* @param nbRequested
- * @param blockSize Size of the largest blocks expected
+ * @param blockSize
*/
public TmfEventRequestStub(Class<T> dataType, TmfTimeRange range, int nbRequested, int blockSize) {
super(dataType, range, nbRequested, blockSize);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.tmf.core.request.TmfDataRequest#handleData(org.eclipse.linuxtools.tmf.core.event.ITmfEvent)
+ */
@Override
public void handleData(T data) {
super.handleData(data);
/**
* This method queues the coalesced requests.
- *
- * @param thread
*/
@Override
public void fireRequest() {
/**
* Checks if the data meets the request completion criteria.
*
- * @param request
- * @param data
- * @return
+ * @param request the request
+ * @param data the data to verify
+ * @param nbRead the number of events read so far
+ * @return true if completion criteria is met
*/
public boolean isCompleted(ITmfDataRequest<T> request, T data, int nbRead) {
return request.isCompleted() || nbRead >= request.getNbRequested();
/**
* Re-registers [provider] as a provider of [eventType]
*
- * @param dataClass
+ * @param eventType
* @param provider
*/
- public static <T extends ITmfEvent> void deregister(Class<T> dataClass, TmfDataProvider<? extends ITmfEvent> provider) {
- List<TmfDataProvider<? extends ITmfEvent>> list = fProviders.get(dataClass);
+ public static <T extends ITmfEvent> void deregister(Class<T> eventType, TmfDataProvider<? extends ITmfEvent> provider) {
+ List<TmfDataProvider<? extends ITmfEvent>> list = fProviders.get(eventType);
if (list != null) {
list.remove(provider);
if (list.size() == 0)
- fProviders.remove(dataClass);
+ fProviders.remove(eventType);
}
}
/**
* Returns the list of components that provide [eventType]
*
- * @param dataClass
- * @return
+ * @param eventType
+ * @return the list of components that provide [eventType]
*/
@SuppressWarnings("unchecked")
- public static TmfDataProvider<? extends ITmfEvent>[] getProviders(Class<? extends ITmfEvent> dataClass) {
- List<TmfDataProvider<? extends ITmfEvent>> list = fProviders.get(dataClass);
+ public static TmfDataProvider<? extends ITmfEvent>[] getProviders(Class<? extends ITmfEvent> eventType) {
+ List<TmfDataProvider<? extends ITmfEvent>> list = fProviders.get(eventType);
if (list == null)
list = new ArrayList<TmfDataProvider<? extends ITmfEvent>>();
TmfDataProvider<? extends ITmfEvent>[] result = new TmfDataProvider[list.size()];
/**
* Returns the list of components of type [providerType] that provide [eventType]
*
- * @param type
- * @param clazz
- * @return
+ * @param eventType
+ * @param providerType
+ * @return the list of components of type [providerType] that provide [eventType]
*/
@SuppressWarnings("unchecked")
- public static TmfDataProvider<? extends ITmfEvent>[] getProviders(Class<? extends ITmfEvent> dataClass, Class<? extends TmfDataProvider<? extends ITmfEvent>> providerClass) {
- if (providerClass == null) {
- return getProviders(dataClass);
+ public static TmfDataProvider<? extends ITmfEvent>[] getProviders(Class<? extends ITmfEvent> eventType, Class<? extends TmfDataProvider<? extends ITmfEvent>> providerType) {
+ if (providerType == null) {
+ return getProviders(eventType);
}
- TmfDataProvider<? extends ITmfEvent>[] list = getProviders(dataClass);
+ TmfDataProvider<? extends ITmfEvent>[] list = getProviders(eventType);
List<TmfDataProvider<? extends ITmfEvent>> result = new ArrayList<TmfDataProvider<? extends ITmfEvent>>();
if (list != null) {
for (TmfDataProvider<? extends ITmfEvent> provider : list) {
- if (provider.getClass() == providerClass) {
+ if (provider.getClass() == providerType) {
result.add(provider);
}
}
* this ID is not constant from one trace to another for the same event
* types! Use "getEventName()" for a constant reference.
*
- * @return
+ * @return the event ID
*/
public long getID() {
return this.typeId;
/**
* Return the int representing this field's value type
*
- * @return
+ * @return the field type
*/
public abstract int getFieldType();
* Return this field's value. You can cast it to the correct type depending
* on what getFieldType says.
*
- * @return
+ * @return the field value
*/
@Override
public abstract Object getValue();
/**
- * @name Other methods defined by ITmfEventField, but not used here: the CTF
+ * Other methods defined by ITmfEventField, but not used here: the CTF
* fields do not have sub-fields (yet!)
+ *
+ * @return the field names
*/
-
@Override
public String[] getFieldNames() {
return null;
* @param timestamp the event timestamp
* @param source the event source
* @param type the event type
- * @param type the event content (payload)
+ * @param content the event content (payload)
* @param reference the event reference
*/
public TmfEvent(ITmfTrace<? extends ITmfEvent> trace, long rank, ITmfTimestamp timestamp, String source,
// ------------------------------------------------------------------------
/**
- * @param trace the new event tarce
+ * @param trace the new event trace
*/
protected void setTrace(ITmfTrace<? extends ITmfEvent> trace) {
fTrace = trace;
}
/**
- * @param source the new event source
+ * @param rank the new event rank
*/
protected void setRank(long rank) {
fRank = rank;
* Constructor for a structural field
*
* @param name the event field id
- * @param subfields the list of subfields
+ * @param fields the list of subfields
*/
public TmfEventField(String name, ITmfEventField[] fields) {
this(name, null, fields);
*
* @param name the event field id
* @param value the event field value
- * @param subfields the list of subfields
+ * @param fields the list of subfields
*/
public TmfEventField(String name, Object value, ITmfEventField[] fields) {
if (name == null) {
* Returns the rank of the first event with the requested timestamp. If none, returns the index of the next event
* (if any).
*
- * @param timestamp
- * @return
+ * @param timestamp the event timestamp
+ * @return the corresponding event rank
*/
@Override
public long getRank(ITmfTimestamp timestamp) {
/**
* Returns the timestamp of the event at the requested index. If none, returns null.
*
- * @param index
- * @return
+ * @param index the event index (rank)
+ * @return the corresponding event timestamp
*/
public ITmfTimestamp getTimestamp(int index) {
TmfExperimentContext context = seekEvent(index);
return null;
}
- /**
- * Scan the next events from all traces and return the next one in chronological order.
- *
- * @param context
- * @return
- */
-
// private void dumpContext(TmfExperimentContext context, boolean isBefore) {
// TmfContext context0 = context.getContexts()[0];
// Tracer.trace(result.toString());
// }
+ /**
+ * Scan the next events from all traces and return the next one in chronological order.
+ *
+ * @param context the trace context
+ * @return the next event
+ */
@SuppressWarnings("unchecked")
@Override
public synchronized ITmfEvent getNextEvent(ITmfContext context) {
// ------------------------------------------------------------------------
/**
- * @param ts
- * @param location
+ * @param ts the checkpoint timestamp
+ * @param contexts the corresponding set of trace contexts
*/
public TmfExperimentCheckpoint(TmfTimestamp ts, TmfContext[] contexts) {
fTimestamp = ts;
* <h4>Remove the node from its parent</h4>\r
* \r
* <p>Shifts all nodes after the removed one to prevent having an empty spot. \r
- * See {@link #replaceChildren(int, ITmfFilterTreeNode)} to replace a node.</p>\r
+ * See {@link #replaceChild(int, ITmfFilterTreeNode)} to replace a node.</p>\r
* \r
* @return The removed node. \r
*/\r
* <h4>Remove the child from the current node</h4>\r
* \r
* <p>Shifts all nodes after the removed one to prevent having an empty spot. \r
- * See {@link #replaceChildren(int, ITmfFilterTreeNode)} to replace a node.</p>\r
+ * See {@link #replaceChild(int, ITmfFilterTreeNode)} to replace a node.</p>\r
* \r
* @return The removed node. \r
*/\r
public abstract boolean matches(ITmfEvent event);\r
\r
/**\r
- * @param event\r
- * @param field\r
- * @return\r
+ * @param event the event\r
+ * @param field the field id\r
+ * @return the field value\r
*/\r
protected Object getFieldValue(ITmfEvent event, String field) {\r
Object value = null;\r
/**\r
* The XMLParser constructor\r
* \r
- * @param uri The XML file to parse\r
- * @throws ParserConfigurationException \r
+ * @param root The tree root\r
+ * @throws ParserConfigurationException \r
*/ \r
public TmfFilterXMLWriter(final ITmfFilterTreeNode root) throws IOException, ParserConfigurationException {\r
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\r
/**
* Retrieve the start time of the interval
*
- * @return
+ * @return the start time of the interval
*/
public long getStartTime();
/**
* Retrieve the end time of the interval
*
- * @return
+ * @return the end time of the interval
*/
public long getEndTime();
/**
* Retrieve the quark of the attribute this state interval refers to
*
- * @return
+ * @return the quark of the attribute this state interval refers to
*/
public int getAttribute();
/**
* Retrieve the state value represented by this interval
*
- * @return
+ * @return the state value represented by this interval
*/
public ITmfStateValue getStateValue();
/**
* <b><u>ITmfEventParser</u></b>
* <p>
- * TODO: Implement me. Please.
*/
public interface ITmfEventParser<T extends ITmfEvent> {
/**
- * @return
+ * @return a parsed event
* @throws IOException
*/
- public ITmfEvent parseNextEvent(ITmfTrace<T> stream, ITmfContext context) throws IOException;
+ /**
+ * Parses the trace event referenced by the context.
+ *
+ * @param trace the event stream
+ * @param context the trace context
+ * @return the parsed event
+ * @throws IOException
+ */
+ public ITmfEvent parseNextEvent(ITmfTrace<T> trace, ITmfContext context) throws IOException;
}
/**
* <b><u>TmfCoalescedDataRequest</u></b>
* <p>
- * TODO: Implement me. Please.
*/
public class TmfCoalescedDataRequest<T extends ITmfEvent> extends TmfDataRequest<T> {
// Attributes
// ------------------------------------------------------------------------
+ /**
+ * The list of coalesced requests
+ */
protected Vector<ITmfDataRequest<T>> fRequests = new Vector<ITmfDataRequest<T>>();
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
/**
- * Default constructor
+ * Request all the events of a given type (high priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
*/
public TmfCoalescedDataRequest(Class<T> dataType) {
this(dataType, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
}
- public TmfCoalescedDataRequest(Class<T> dataType, ExecutionType execType) {
- this(dataType, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, execType);
+ /**
+ * Request all the events of a given type (given priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param priority the requested execution priority
+ */
+ public TmfCoalescedDataRequest(Class<T> dataType, ExecutionType priority) {
+ this(dataType, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
}
/**
- * @param nbRequested
+ * Request all the events of a given type from the given index (high priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param index the index of the first event to retrieve
*/
public TmfCoalescedDataRequest(Class<T> dataType, int index) {
this(dataType, index, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
}
- public TmfCoalescedDataRequest(Class<T> dataType, int index, ExecutionType execType) {
- this(dataType, index, ALL_DATA, DEFAULT_BLOCK_SIZE, execType);
+ /**
+ * Request all the events of a given type from the given index (given priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param index the index of the first event to retrieve
+ * @param priority the requested execution priority
+ */
+ public TmfCoalescedDataRequest(Class<T> dataType, int index, ExecutionType priority) {
+ this(dataType, index, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
}
/**
- * @param index
- * @param nbRequested
+ * Request 'n' events of a given type from the given index (high priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param index the index of the first event to retrieve
+ * @param nbRequested the number of events requested
*/
public TmfCoalescedDataRequest(Class<T> dataType, int index, int nbRequested) {
this(dataType, index, nbRequested, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
}
- public TmfCoalescedDataRequest(Class<T> dataType, int index, int nbRequested, ExecutionType execType) {
- this(dataType, index, nbRequested, DEFAULT_BLOCK_SIZE, execType);
+ /**
+ * Request 'n' events of a given type from the given index (given priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param index the index of the first event to retrieve
+ * @param nbRequested the number of events requested
+ * @param priority the requested execution priority
+ */
+ public TmfCoalescedDataRequest(Class<T> dataType, int index, int nbRequested, ExecutionType priority) {
+ this(dataType, index, nbRequested, DEFAULT_BLOCK_SIZE, priority);
}
/**
- * @param index
- * @param nbRequested
- * @param blockSize
+ * Request 'n' events of a given type from the given index (high priority).
+ * Events are returned in blocks of the given size.
+ *
+ * @param dataType the requested data type
+ * @param index the index of the first event to retrieve
+ * @param nbRequested the number of events requested
+ * @param blockSize the number of events per block
*/
public TmfCoalescedDataRequest(Class<T> dataType, int index, int nbRequested, int blockSize) {
super(dataType, index, nbRequested, blockSize, ExecutionType.FOREGROUND);
}
- public TmfCoalescedDataRequest(Class<T> dataType, int index, int nbRequested, int blockSize, ExecutionType execType) {
- super(dataType, index, nbRequested, blockSize, execType);
+ /**
+ * Request 'n' events of a given type from the given index (given priority).
+ * Events are returned in blocks of the given size.
+ *
+ * @param dataType the requested data type
+ * @param index the index of the first event to retrieve
+ * @param nbRequested the number of events requested
+ * @param blockSize the number of events per block
+ * @param priority the requested execution priority
+ */
+ public TmfCoalescedDataRequest(Class<T> dataType, int index, int nbRequested, int blockSize, ExecutionType priority) {
+ super(dataType, index, nbRequested, blockSize, priority);
}
// ------------------------------------------------------------------------
/**
* <b><u>TmfCoalescedEventRequest</u></b>
* <p>
- * TODO: Implement me. Please.
*/
public class TmfCoalescedEventRequest<T extends ITmfEvent> extends TmfCoalescedDataRequest<T> implements ITmfEventRequest<T> {
// ------------------------------------------------------------------------
/**
- * @param range
+ * Request all the events of a given type (high priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
*/
public TmfCoalescedEventRequest(Class<T> dataType) {
this(dataType, TmfTimeRange.ETERNITY, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
}
- public TmfCoalescedEventRequest(Class<T> dataType, ExecutionType execType) {
- this(dataType, TmfTimeRange.ETERNITY, ALL_DATA, DEFAULT_BLOCK_SIZE, execType);
+ /**
+ * Request all the events of a given type (given priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param priority the requested execution priority
+ */
+ public TmfCoalescedEventRequest(Class<T> dataType, ExecutionType priority) {
+ this(dataType, TmfTimeRange.ETERNITY, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
}
/**
- * @param range
+ * Request all the events of a given type for the given time range (high priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
*/
public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range) {
this(dataType, range, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
}
- public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, ExecutionType execType) {
- this(dataType, range, ALL_DATA, DEFAULT_BLOCK_SIZE, execType);
+ /**
+ * Request all the events of a given type for the given time range (given priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
+ * @param priority the requested execution priority
+ */
+ public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, ExecutionType priority) {
+ this(dataType, range, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
}
/**
- * @param range
- * @param nbRequested
+ * Request 'n' events of a given type from the given time range (high priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
+ * @param nbRequested the number of events requested
*/
public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested) {
this(dataType, range, nbRequested, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
}
-
- public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, ExecutionType execType) {
- this(dataType, range, nbRequested, DEFAULT_BLOCK_SIZE, execType);
+
+ /**
+ * Request 'n' events of a given type for the given time range (given priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
+ * @param nbRequested the number of events requested
+ * @param priority the requested execution priority
+ */
+ public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, ExecutionType priority) {
+ this(dataType, range, nbRequested, DEFAULT_BLOCK_SIZE, priority);
}
-
+
/**
- * @param range
- * @param nbRequested
- * @param blockSize Size of the largest blocks expected
+ * Request 'n' events of a given type for the given time range (high priority).
+ * Events are returned in blocks of the given size.
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
+ * @param nbRequested the number of events requested
+ * @param blockSize the number of events per block
*/
public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, int blockSize) {
- super(dataType, 0, nbRequested, blockSize, ExecutionType.FOREGROUND);
- fRange = range;
+ super(dataType, 0, nbRequested, blockSize, ExecutionType.FOREGROUND);
+ fRange = range;
}
- public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, int blockSize, ExecutionType execType) {
- super(dataType, 0, nbRequested, blockSize, execType);
- fRange = range;
+ /**
+ * Request 'n' events of a given type for the given time range (given priority).
+ * Events are returned in blocks of the given size.
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
+ * @param nbRequested the number of events requested
+ * @param blockSize the number of events per block
+ * @param priority the requested execution priority
+ */
+ public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, int blockSize, ExecutionType priority) {
+ super(dataType, 0, nbRequested, blockSize, priority);
+ fRange = range;
}
- public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int index, int nbRequested, int blockSize, ExecutionType execType) {
- super(dataType, index, nbRequested, blockSize, execType);
- fRange = range;
+ /**
+ * Request 'n' events of a given type for the given time range (given priority).
+ * Events are returned in blocks of the given size.
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
+ * @param index the index of the first event to retrieve
+ * @param nbRequested the number of events requested
+ * @param blockSize the number of events per block
+ * @param priority the requested execution priority
+ */
+ public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int index, int nbRequested, int blockSize, ExecutionType priority) {
+ super(dataType, index, nbRequested, blockSize, priority);
+ fRange = range;
}
// ------------------------------------------------------------------------
}
/**
- * Default constructor
+ * Request all the events of a given type (high priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
*
- * @param dataType
- * the requested data type
+ * @param dataType the requested data type
*/
public TmfDataRequest(Class<T> dataType) {
this(dataType, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
}
- public TmfDataRequest(Class<T> dataType, ExecutionType execType) {
- this(dataType, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, execType);
+ /**
+ * Request all the events of a given type (given priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param priority the requested execution priority
+ */
+ public TmfDataRequest(Class<T> dataType, ExecutionType priority) {
+ this(dataType, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
}
/**
- * @param dataType
- * the requested data type
- * @param nbRequested
- * the number of data items requested
+ * Request all the events of a given type from the given index (high priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param index the index of the first event to retrieve
*/
public TmfDataRequest(Class<T> dataType, int index) {
this(dataType, index, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
}
- public TmfDataRequest(Class<T> dataType, int index, ExecutionType execType) {
- this(dataType, index, ALL_DATA, DEFAULT_BLOCK_SIZE, execType);
+ /**
+ * Request all the events of a given type from the given index (given priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param index the index of the first event to retrieve
+ * @param priority the requested execution priority
+ */
+ public TmfDataRequest(Class<T> dataType, int index, ExecutionType priority) {
+ this(dataType, index, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
}
/**
- * @param dataType
- * the requested data type
- * @param index
- * the index (rank) of the first event requested
- * @param blockSize
- * the number of data items per block
+ * Request 'n' events of a given type from the given index (high priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param index the index of the first event to retrieve
+ * @param nbRequested the number of events requested
*/
public TmfDataRequest(Class<T> dataType, int index, int nbRequested) {
this(dataType, index, nbRequested, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
}
- public TmfDataRequest(Class<T> dataType, int index, int nbRequested, ExecutionType execType) {
- this(dataType, index, nbRequested, DEFAULT_BLOCK_SIZE, execType);
+ /**
+ * Request 'n' events of a given type from the given index (given priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param index the index of the first event to retrieve
+ * @param nbRequested the number of events requested
+ * @param priority the requested execution priority
+ */
+ public TmfDataRequest(Class<T> dataType, int index, int nbRequested, ExecutionType priority) {
+ this(dataType, index, nbRequested, DEFAULT_BLOCK_SIZE, priority);
}
/**
- * @param dataType
- * the requested data type
- * @param index
- * the index (rank) of the first event requested
- * @param nbRequested
- * the number of data items requested
- * @param blockSize
- * the number of data items per block
+ * Request 'n' events of a given type from the given index (high priority).
+ * Events are returned in blocks of the given size.
+ *
+ * @param dataType the requested data type
+ * @param index the index of the first event to retrieve
+ * @param nbRequested the number of events requested
+ * @param blockSize the number of events per block
*/
public TmfDataRequest(Class<T> dataType, int index, int nbRequested, int blockSize) {
this(dataType, index, nbRequested, blockSize, ExecutionType.FOREGROUND);
}
- public TmfDataRequest(Class<T> dataType, int index, int nbRequested, int blockSize, ExecutionType execType) {
+ /**
+ * Request 'n' events of a given type from the given index (given priority).
+ * Events are returned in blocks of the given size.
+ *
+ * @param dataType the requested data type
+ * @param index the index of the first event to retrieve
+ * @param nbRequested the number of events requested
+ * @param blockSize the number of events per block
+ * @param priority the requested execution priority
+ */
+ public TmfDataRequest(Class<T> dataType, int index, int nbRequested, int blockSize, ExecutionType priority) {
fRequestId = fRequestNumber++;
fDataType = dataType;
fIndex = index;
fNbRequested = nbRequested;
fBlockSize = blockSize;
- fExecType = execType;
+ fExecType = priority;
fNbRead = 0;
fRequestRunning = false;
}
/**
- * @return the index of the first event requested
+ * @return the execution type (priority)
*/
@Override
public ExecutionType getExecType() {
}
/**
- * @return indicates if the request is completed
+ * @return indicates if the request is currently running
*/
@Override
public synchronized boolean isRunning() {
}
/**
- * @return indicates if the request is canceled
+ * @return indicates if the request has failed
*/
@Override
public synchronized boolean isFailed() {
// ------------------------------------------------------------------------
/**
- * Sets the data object to specified value. To be called by the asynchronous method implementor.
- *
- * @param data
- * Data value to set.
- */
-
- /**
- * Handle a block of incoming data. This method is called every time a block of data becomes available.
+ * Handle incoming data, one event at a time i.e. this method is invoked
+ * for every data item obtained by the request.
*
- * - Data items are received in the order they appear in the stream. - Called by the request processor, in its
- * execution thread, every time a block of data becomes available. - Request processor performs a synchronous call
- * to handlePartialResult() i.e. its execution threads holds until handlePartialData() returns. - Original data
- * items are disposed of on return i.e. keep a reference (or a copy) if some persistence is needed between
- * invocations. - When there is no more data, done() is called.
+ * - Data items are received in the order they appear in the stream
+ * - Called by the request processor, in its execution thread, every time
+ * a block of data becomes available.
+ * - Request processor performs a synchronous call to handleData() i.e.
+ * its execution threads holds until handleData() returns.
+ * - Original data items are disposed of on return i.e. keep a reference
+ * (or a copy) if some persistence is needed between invocations.
+ * - When there is no more data, done() is called.
*
- * @param events
- * - an events
+ * @param data a piece of data
*/
@Override
public void handleData(T data) {
}
/**
- * Handle the completion of the request. It is called when there is no more data available either because: - the
- * request completed normally - the request failed - the request was canceled
+ * Handle the completion of the request. It is called when there is no
+ * more data available either because:
+ * - the request completed normally
+ * - the request failed
+ * - the request was canceled
*
- * As a convenience, handleXXXX methods are provided. They are meant to be overridden by the application if it needs
- * to handle these conditions.
+ * As a convenience, handleXXXX methods are provided. They are meant to be
+ * overridden by the application if it needs to handle these conditions.
*/
@Override
public synchronized void handleCompleted() {
// ------------------------------------------------------------------------
/**
- * @param range
+ * Request all the events of a given type (high priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
*/
public TmfEventRequest(Class<T> dataType) {
this(dataType, TmfTimeRange.ETERNITY, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
}
- public TmfEventRequest(Class<T> dataType, ExecutionType execType) {
- this(dataType, TmfTimeRange.ETERNITY, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, execType);
+ /**
+ * Request all the events of a given type (given priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param priority the requested execution priority
+ */
+ public TmfEventRequest(Class<T> dataType, ExecutionType priority) {
+ this(dataType, TmfTimeRange.ETERNITY, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
}
/**
- * @param range
+ * Request all the events of a given type for the given time range (high priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
*/
public TmfEventRequest(Class<T> dataType, TmfTimeRange range) {
this(dataType, range, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
}
- public TmfEventRequest(Class<T> dataType, TmfTimeRange range, ExecutionType execType) {
- this(dataType, range, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, execType);
+ /**
+ * Request all the events of a given type for the given time range (given priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
+ * @param priority the requested execution priority
+ */
+ public TmfEventRequest(Class<T> dataType, TmfTimeRange range, ExecutionType priority) {
+ this(dataType, range, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
}
/**
- * @param range
- * @param nbRequested
+ * Request 'n' events of a given type from the given time range (high priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
+ * @param nbRequested the number of events requested
*/
public TmfEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested) {
this(dataType, range, 0, nbRequested, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
}
- public TmfEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, ExecutionType execType) {
- this(dataType, range, 0, nbRequested, DEFAULT_BLOCK_SIZE, execType);
+ /**
+ * Request 'n' events of a given type for the given time range (given priority)
+ * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
+ * @param nbRequested the number of events requested
+ * @param priority the requested execution priority
+ */
+ public TmfEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, ExecutionType priority) {
+ this(dataType, range, 0, nbRequested, DEFAULT_BLOCK_SIZE, priority);
}
/**
- * @param range
- * @param nbRequested
- * @param blockSize Size of the largest blocks expected
+ * Request 'n' events of a given type for the given time range (high priority).
+ * Events are returned in blocks of the given size.
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
+ * @param nbRequested the number of events requested
+ * @param blockSize the number of events per block
*/
public TmfEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, int blockSize) {
this(dataType, range, 0, nbRequested, blockSize, ExecutionType.FOREGROUND);
}
- public TmfEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, int blockSize, ExecutionType execType) {
- this(dataType, range, 0, nbRequested, blockSize, execType);
+ /**
+ * Request 'n' events of a given type for the given time range (given priority).
+ * Events are returned in blocks of the given size.
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
+ * @param nbRequested the number of events requested
+ * @param blockSize the number of events per block
+ * @param priority the requested execution priority
+ */
+ public TmfEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, int blockSize, ExecutionType priority) {
+ this(dataType, range, 0, nbRequested, blockSize, priority);
}
- public TmfEventRequest(Class<T> dataType, TmfTimeRange range, int index, int nbRequested, int blockSize, ExecutionType execType) {
- super(dataType, index, nbRequested, blockSize, execType);
+ /**
+ * Request 'n' events of a given type for the given time range (given priority).
+ * Events are returned in blocks of the given size.
+ *
+ * @param dataType the requested data type
+ * @param range the time range of the requested events
+ * @param index the index of the first event to retrieve
+ * @param nbRequested the number of events requested
+ * @param blockSize the number of events per block
+ * @param priority the requested execution priority
+ */
+ public TmfEventRequest(Class<T> dataType, TmfTimeRange range, int index, int nbRequested, int blockSize, ExecutionType priority) {
+ super(dataType, index, nbRequested, blockSize, priority);
fRange = range;
}
/**
* this method is called by the event provider to set the index corresponding
* to the time range start time once it is known
- * @param index the start time index
+ *
+ * @param index the start index
*/
@Override
public void setStartIndex(int index) {
/**
* Existing history constructor. Use this to open an existing state-file.
*
- * @param existingFileName
+ * @param existingStateFile
* Filename/location of the history we want to load
* @throws IOException
* If we can't read the file, if it doesn't exist or is not
* Returns a context which can later be used to read the event.
*
* @param location
- * @param timestamp
- * @param rank
* @return a context object for subsequent reads
*/
public ITmfContext seekLocation(ITmfLocation<?> location);
* Returns the rank of the first event with the requested timestamp. If none, returns the index of the next event
* (if any).
*
- * @param timestamp
- * @return
+ * @param timestamp the requested event timestamp
+ * @return the corresponding event rank
*/
public long getRank(ITmfTimestamp timestamp);
* Returns the rank of the first event with the requested timestamp. If none, returns the index of the next event
* (if any).
*
- * @param timestamp
- * @return
+ * @param timestamp the requested event timestamp
+ * @return the corresponding event rank
*/
@Override
public long getRank(ITmfTimestamp timestamp) {
* subsequent read.
*
* @param context
- * @return
+ * @return the event referred to by context
*/
@SuppressWarnings("unchecked")
@Override
}\r
\r
/**\r
- * @param table\r
+ * @param columnData\r
* \r
- * FIXME: Add support for column selection\r
+ * FIXME: Add support for column selection\r
*/\r
protected void setColumnHeaders(ColumnData[] columnData) {\r
fTable.setColumnHeaders(columnData);\r
\r
/**\r
* Set the top index\r
- * @param the top index\r
+ * @param index the top index\r
*/\r
public void setTopIndex(int index);\r
\r
* convert it to an internal color index\r
* \r
* @param event\r
- * @return\r
+ * @return the internal color index\r
*/\r
public int getEventColorVal(ITimeEvent event) {\r
StateColor colors = getEventColor(event);\r
* Select the color for the different internal variants of events.\r
* \r
* @param event\r
- * @return\r
+ * @return the corresponding event color\r
*/\r
public abstract StateColor getEventColor(ITimeEvent event);\r
\r
* [java.lang.Thread]\r
* \r
* @param trace\r
- * @return\r
+ * @return the trace class name\r
*/\r
public abstract String getTraceClassName(ITmfTimeAnalysisEntry trace);\r
\r
* True return String value in Upper case\r
* @param extInfo\r
* Verbose, add additional information if applicable\r
- * @return\r
+ * @return the event name\r
*/\r
public abstract String getEventName(ITimeEvent event, boolean upper,\r
boolean extInfo);\r
* different icons according to specific event /state combination\r
* \r
* @param obj\r
- * @return\r
+ * @return the image icon\r
*/\r
public Image getItemImage(Object obj) {\r
/*\r
/**\r
* needed in case there's a need to associate a context menu\r
* \r
- * @return\r
+ * @return the state control (selection provider)\r
*/\r
@Override\r
public Control getControl() {\r
/**\r
* Get the selection provider\r
* \r
- * @return\r
+ * @return the selection provider\r
*/\r
@Override\r
public ISelectionProvider getSelectionProvider() {\r
}\r
\r
/**\r
- * @return\r
+ * @return the start time\r
*/\r
public long getTime0() {\r
return time0;\r
}\r
\r
/**\r
- * @return\r
+ * @return the end time\r
*/\r
public long getTime1() {\r
return time1;\r
}\r
\r
/**\r
- * @return\r
+ * @return the selection width\r
*/\r
public int getWidth() {\r
return width;\r
}\r
\r
/**\r
- * @return\r
+ * @return the selected time\r
*/\r
public long getSelectedTime() {\r
return selectedTime;\r
public long getTime();\r
\r
/**\r
- * Returning <list> <li>-1: Considers duration to be from current event till\r
- * the next</li> <li>0: Duration is not relevant e.g. a Burst / no state\r
- * associated</li> <li>>0: Valid duration value specified</list>\r
- * \r
* @return\r
+ * <list>\r
+ * <li>-1: Considers duration to be from current event till the next</li>\r
+ * <li>0: Duration is not relevant e.g. a Burst / no state associated</li>\r
+ * <li>>0: Valid duration value specified</li>\r
+ * </list>\r
+ * <p>\r
*/\r
public long getDuration();\r
\r
}\r
\r
/**\r
- * Formats time in format: MM:SS:NNN\r
- * \r
- * @param v\r
- * @param option\r
- * 0: MMMM:ss:nnnnnnnnn, 1: HH:MM:ss MMM.mmmm.nnn\r
- * @return\r
+ * Formats time in format: MM:SS:NNN\r
+ * \r
+ * @param time time\r
+ * @param format 0: MMMM:ss:nnnnnnnnn, 1: HH:MM:ss MMM.mmmm.nnn\r
+ * @param resolution the resolution\r
+ * @return the formatted time\r
*/\r
- static public String formatTime(long v, TimeFormat format, Resolution res) {\r
+ static public String formatTime(long time, TimeFormat format, Resolution resolution) {\r
// if format is absolute (Calendar)\r
if (format == TimeFormat.ABSOLUTE) {\r
- return formatTimeAbs(v, res);\r
+ return formatTimeAbs(time, resolution);\r
}\r
\r
StringBuffer str = new StringBuffer();\r
- boolean neg = v < 0;\r
+ boolean neg = time < 0;\r
if (neg) {\r
- v = -v;\r
+ time = -time;\r
str.append('-');\r
}\r
\r
- long sec = (long) (v * 1E-9);\r
+ long sec = (long) (time * 1E-9);\r
// TODO: Expand to make it possible to select the minute, second, nanosecond format\r
//printing minutes is suppressed just sec and ns\r
// if (sec / 60 < 10)\r
// if (sec < 10)\r
// str.append('0');\r
str.append(sec);\r
- String ns = formatNs(v, res);\r
+ String ns = formatNs(time, resolution);\r
if (!ns.equals("")) { //$NON-NLS-1$\r
str.append(':');\r
str.append(ns);\r
* From input time in nanoseconds, convert to Date format YYYY-MM-dd\r
* \r
* @param absTime\r
- * @return\r
+ * @return the formatted date\r
*/\r
public static String formatDate(long absTime) {\r
String sdate = sdateformat.format(new Date((long) (absTime * 1E-6)));\r
* Formats time in ns to Calendar format: HH:MM:SS MMM.mmm.nnn\r
* \r
* @param time\r
- * @return\r
+ * @return the formatted time\r
*/\r
static public String formatTimeAbs(long time, Resolution res) {\r
StringBuffer str = new StringBuffer();\r
* \r
* @param time\r
* @param res\r
- * @return\r
+ * @return the formatted nanosec\r
*/\r
public static String formatNs(long time, Resolution res) {\r
StringBuffer temp = new StringBuffer();\r
}\r
\r
/**\r
- * @param fFilter the filter to set\r
+ * @param filter the filter to set\r
*/\r
public void setFilter(ITmfFilterTreeNode filter) {\r
fRoot = new TmfFilterNode(null);\r
}\r
\r
/**\r
- * @return the fFilter\r
+ * @return the filter\r
*/\r
public ITmfFilterTreeNode getFilter() {\r
if (fRoot != null && fRoot.hasChildren()) {\r
*
* @param width
* @param height
- * @param bar width
+ * @param barWidth
* @return the result array of size [width] and where the highest value
* doesn't exceed [height]
*/
/**
* Add event to the correct bucket, compacting the if needed.
*
+ * @param eventCount the event to count
* @param timestamp the timestamp of the event to count
*/
public void countEvent(long eventCount, long timestamp);
*
* @param width
* @param height
- * @param bar width
+ * @param barWidth
* @return the result array of size [width] and where the highest value
* doesn't exceed [height] considering the bar width [barWidth]
*/
/**
* Perform the request for an experiment and populates the statistics tree with event.
+ *
* @param experiment experiment for which we need the statistics data.
- * @param time range to request
+ * @param timeRange to request
*/
@SuppressWarnings("unchecked")
protected void requestData(final TmfExperiment<?> experiment, TmfTimeRange timeRange) {
/**
* Provide a statisticsTree instance per trace
*
- * @return
+ * @return the corresponding trace statistics tree
*/
public static TmfStatisticsTreeNode getStatTreeRoot(String traceUniqueId) {
/**
*
* @param traceUniqueId
- * @return
+ * @return the corresponding trace statistics tree
*/
public static AbsTmfStatisticsTree getStatTree(String traceUniqueId) {
if (traceUniqueId == null)
/**
* Add the new trace statistics data in the tree. Can be used later on if the same traces is selected back.
*
- * @param experimentName
+ * @param traceUniqueId
* the name of the trace which will be used as a key to store the data. Must be different for each traces, otherwise the traces might
* be overwritten which would trigger a reload of the same trace.
- * @param data
+ * @param statsData
* the information about the trace
*/
public static void addStatsTreeRoot(String traceUniqueId, AbsTmfStatisticsTree statsData) {
/**
*
* @param traceUniqueId
- * @return
+ * @return true if the trace id is known
*/
public static boolean containsTreeRoot(String traceUniqueId) {
return fTreeInstances.containsKey(traceUniqueId);
* Display the tooltip using the given time range(min,max) the current value and the time unit The tooltip will stay
* on screen until it is told otherwise
*
- * @param _value the current in the scale
- * @param _min the scale min
- * @param _max the scale max
- * @param unit the scale unit
+ * @param value the current in the scale
+ * @param min the scale min
+ * @param max the scale max
*/
- public void showToolTip(ITmfTimestamp _value, ITmfTimestamp min, ITmfTimestamp max) {
+ public void showToolTip(ITmfTimestamp value, ITmfTimestamp min, ITmfTimestamp max) {
minMaxRange = new TmfTimeRange(min.clone(), max.clone());
- currentValue = _value.clone();
+ currentValue = value.clone();
int w = toolTipShell.getBounds().width;
int h = toolTipShell.getBounds().height;
/**
* Set the frame and ensure an object is visible from an other thread than the one executing the main loop
*
- * @param sm
+ * @param frame
+ * @param x
+ * @param y
*/
public void setFrameAndEnsureVisibleSync(final Frame frame, final int x, final int y) {
if (getSDWidget() == null || getSDWidget().isDisposed()) {
/**
* Set the frame and ensure an object is visible
*
- * @param sm
+ * @param frame
+ * @param x
+ * @param y
*/
public void setFrameAndEnsureVisible(Frame frame, int x, int y) {
getSDWidget().clearSelection();
/**
* Toggle between default and wait cursors from an other thread than the one executing the main loop
+ *
+ * @param wait_
*/
public void toggleWaitCursorAsync(final boolean wait_) {
if (getSDWidget() == null || getSDWidget().isDisposed()) {
/**
* Change the size of the contents area.
*
- * @param w new width of the area.
- * @param h new height of the area.
+ * @param width new width of the area.
+ * @param height new height of the area.
*/
- public void resizeContents(int _w, int _h) {
+ public void resizeContents(int width, int height) {
// System.out.println("SV--resizeContents("+_w+","+_h+" ) {");
- if (_w < 0)
- _w = 0;
- if (_h < 0)
- _h = 0;
+ if (width < 0)
+ width = 0;
+ if (height < 0)
+ height = 0;
int oldW = contents_width_;
int oldH = contents_height_;
- if (_w == oldW && _h == oldH)
+ if (width == oldW && height == oldH)
return;
// System.out.println("RESIZE-CONTENTS("+_w+","+_h+")");
- contents_width_ = _w;
- contents_height_ = _h;
+ contents_width_ = width;
+ contents_height_ = height;
- if (oldW > _w) {
- int s = _w;
- _w = oldW;
+ if (oldW > width) {
+ int s = width;
+ width = oldW;
oldW = s;
}
int vis_width = getVisibleWidth();
int vis_height = getVisibleHeight();
if (oldW < vis_width) {
- if (_w > vis_width) {
- _w = vis_width;
+ if (width > vis_width) {
+ width = vis_width;
}
- viewcontrol_.redraw(getContentsX() + oldW, 0, _w - oldW, vis_height, true);
+ viewcontrol_.redraw(getContentsX() + oldW, 0, width - oldW, vis_height, true);
}
- if (oldH > _h) {
- int s = _h;
- _h = oldH;
+ if (oldH > height) {
+ int s = height;
+ height = oldH;
oldH = s;
}
if (oldH < vis_height) {
- if (_h > vis_height) {
- _h = vis_height;
+ if (height > vis_height) {
+ height = vis_height;
}
- viewcontrol_.redraw(0, getContentsY() + oldH, vis_width, _h - oldH, true);
+ viewcontrol_.redraw(0, getContentsY() + oldH, vis_width, height - oldH, true);
}
if (updateScrollBarVisiblity()) {
layout();
* @param y
* @return org.eclipse.swt.graphics.Point
*/
- public final Point viewToContents(int _x, int _y) {
- Point p = new Point(viewToContentsX(_x), viewToContentsY(_y));
+ public final Point viewToContents(int x, int y) {
+ Point p = new Point(viewToContentsX(x), viewToContentsY(y));
return p;
}
* @param y
* @return org.eclipse.swt.graphics.Point
*/
- public final Point contentsToView(int _x, int _y) {
- Point p = new Point(contentsToViewX(_x), contentsToViewY(_y));
+ public final Point contentsToView(int x, int y) {
+ Point p = new Point(contentsToViewX(x), contentsToViewY(y));
return p;
}
/**
* Called when ScrollView view is resized.
- *
- * @param _event
*/
protected void viewResized() {
// System.out.println("SV--viewResizeEvent()");
* A new EventOccurence will be create on this lifeLine.<br>
*
* @param lifeline the message sender
- * @param autoCreateEvent if true, create an eventOccurence lifeline given in parameter
*/
public void autoSetStartLifeline(Lifeline lifeline) {
lifeline.getNewEventOccurrence();
* A new EventOccurence will be create on this lifeLine.<br>
*
* @param lifeline the message receiver
- * @param autoCreateEvent if true, create an eventOccurence lifeline given in parameter
*/
public void autoSetEndLifeline(Lifeline lifeline) {
lifeline.getNewEventOccurrence();
* Adds a lifeline to the frame lifelines list. The lifeline X drawing order depends on the lifeline addition order
* into the frame lifelines list.
*
- * @param the lifeline to add
+ * @param lifeline the lifeline to add
*/
- public void addLifeLine(Lifeline lifeLine) {
+ public void addLifeLine(Lifeline lifeline) {
computeMinMax = true;
- if (lifeLine == null)
+ if (lifeline == null)
return;
// set the lifeline parent frame
- lifeLine.setFrame(this);
+ lifeline.setFrame(this);
// Increate the frame lifeline counter
// and set the lifeline drawing order
- lifeLine.setIndex(getNewHorizontalIndex());
- if (lifeLine.hasTimeInfo()) {
+ lifeline.setIndex(getNewHorizontalIndex());
+ if (lifeline.hasTimeInfo()) {
timeInfo = true;
}
// add the lifeline to the lifelines list
- addNode(lifeLine);
+ addNode(lifeline);
}
/**
* For drawing performance reason, it is recommended to add synchronous syncMessages in the same order they should
* appear along the Y axis in the Frame.
*
- * @param the message to add
+ * @param message the message to add
*/
public void addMessage(BaseMessage message) {
addNode(message);
* Set the graph node name.<br>
* It is the name display in the view to label the graph node.
*
- * @param the name to set
+ * @param nodeName the name to set
*/
public void setName(String nodeName) {
name = nodeName;
* Returns the GraphNode visibility for the given visible area. Wrong visibility calculation, may strongly impact
* drawing performance
*
- * @param vx
- * @param vy
- * @param vwidth
- * @param vheight
+ * @param x
+ * @param y
+ * @param width
+ * @param height
* @return true if visible false otherwise
*/
public boolean isVisible(int x, int y, int width, int height) {
* After, depending on the visible area, only visible GraphNodes are drawn.<br>
*
* @param context the context to draw to
- * @param drawFrame indicate if the frame rectangle need to be redrawn
* @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#draw(IGC)
*/
protected void drawChildenNodes(IGC context) {
/**
* Set the lifeline on which the execution occurrence appears.
*
- * @param theLifeline - the parent lifeline
+ * @param occ the parent lifeline
*/
public void setExecution(BasicExecutionOccurrence occ) {
execOcc = occ;
* operation mostly to store in the frame the greater event found in the diagram (used to determine the frame
* height)
*
- * @param index the new current event occurrence
+ * @param eventOcc the new current event occurrence
*/
public void setCurrentEventOccurrence(int eventOcc) {
if ((frame != null) && (frame.getMaxEventOccurrence() < eventOcc))
* Force the lifeline to be drawn at the given coordinate
*
* @param context - the context to draw into
- * @param x1 - the x coordinate
- * @param y1 - the y coordinate
+ * @param x - the x coordinate
+ * @param y - the y coordinate
*/
public void draw(IGC context, int x, int y) {
// Set the draw color depending if the lifeline must be selected or not
* A stop is never drawn it is assigned to a lifeline.<br>
* <br>
*
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.Lifeline#setStop(Stop)
* @author sveyrier
- *
*/
public class Stop extends GraphNode {
/**
* Returns the time compression bar selection color
*
- * @return
+ * @return the time compression bar selection color
*/
public IColor getTimeCompressionSelectionColor();
* Called back when the sequence diagram is requesting 2 lifelines collapsing
*
* @param lifeline1 - One of the lifeline to collapse
- * @param Lifeline2 - The other lifeline to collapse with
+ * @param lifeline2 - The other lifeline to collapse with
*/
public void collapseTwoLifelines(Lifeline lifeline1, Lifeline lifeline2);
/**
* Called when the Filter dialog box OK button is pressed
*
- * @param toApply user selection made in the dialog box
+ * @param filters user selection made in the dialog box
* @return true if the filter applied
*/
public boolean filter(List<?> filters);
* @param toApply user selection made in the dialog box
* @return true if the find got a non empty result
*/
- public boolean find(Criteria toapply);
+ public boolean find(Criteria toApply);
/**
* Called when dialog is closed
/**
* Returns the IPropertySheetEntry that will fill in the properties view
*
- * @return
+ * @return the property sheet entry
*/
public IPropertySheetPage getPropertySheetEntry();
/**
* @param to
- * @return
+ * @return usual comparison result (< 0, 0, > 0)
*/
public boolean compareTo(Criteria to) {
boolean retVal = true;
}
/**
- * @param positive The positive to set.
+ * @param positive_ The positive to set.
*/
public void setPositive(boolean positive_) {
positive = positive_;
}
/**
- * @return Returns the class loader name.
*/
public void setLoaderClassName(String loaderClassName_) {
loaderClassName = loaderClassName_;
}
/**
- * @param theView
- * @param _provider
+ * @param view_
+ * @param provider_
+ * @param filter_
+ * @param style
*/
public SearchFilterDialog(SDView view_, ISDGraphNodeSupporter provider_, boolean filter_, int style) {
super(view_.getSDWidget().getShell());
/**
* Get the current end-user settings from the dialog to a Criteria
- *
- * @param content
*/
public void copyToCriteria() {
criteria = new Criteria();
}
/**
- * @return
- * @todo Generated comment
+ * @return the tab content
*/
protected TabContents getTabContents() {
TabContents content = null;
}
/**
- * @param t
+ * @param found
*/
public void setResult(boolean found) {
result.setVisible(!found);
/**
* @param okButton
- * @todo Generated comment
*/
public void setOkButton(Button okButton) {
parentOkButton = okButton;
/**
* Gets time range for time range signal.
* @param startTime The start time of time range.
- * @return
+ * @return the time range
*/
protected TmfTimeRange getSignalTimeRange(ITmfTimestamp startTime) {
fLock.lock();
/**
* Checks if filter criteria matches a lifeline name (sender or receiver) in given SD event.
- * @param sdEvent The SD event to check
+ * @param lifeline the message receiver
* @return true if match else false.
*/
protected boolean filterLifeLine(String lifeline) {