From 0283f7ffc576ed1b4e3c80c2614362785fdcdb7f Mon Sep 17 00:00:00 2001 From: Francois Chouinard Date: Wed, 25 Jul 2012 13:13:58 -0400 Subject: [PATCH] Fix a pile of Javadoc warnings Change-Id: I5f8cec0642346b863f058d56d56406a1e8b7fd77 Signed-off-by: Francois Chouinard --- .../tmf/tests/stubs/CreateTestFiles.java | 12 +-- .../stubs/request/TmfDataRequestStub.java | 30 ++++--- .../stubs/request/TmfEventRequestStub.java | 35 ++++---- .../tests/stubs/trace/TmfEmptyTraceStub.java | 6 +- .../tmf/tests/stubs/trace/TmfTraceStub.java | 17 ++-- .../core/request/TmfCoalescedDataRequest.java | 2 + .../request/TmfCoalescedEventRequest.java | 2 + .../tmf/core/component/ITmfDataProvider.java | 14 ++-- .../tmf/core/component/TmfDataProvider.java | 35 +++++--- .../tmf/core/component/TmfEventProvider.java | 12 +-- .../core/filter/model/ITmfFilterTreeNode.java | 71 ++++++++-------- .../core/filter/model/TmfFilterAndNode.java | 26 ++++-- .../filter/model/TmfFilterCompareNode.java | 36 +++++++- .../filter/model/TmfFilterContainsNode.java | 30 ++++++- .../filter/model/TmfFilterEqualsNode.java | 30 ++++++- .../filter/model/TmfFilterEventTypeNode.java | 18 +++- .../filter/model/TmfFilterMatchesNode.java | 44 ++++++++-- .../tmf/core/filter/model/TmfFilterNode.java | 18 +++- .../core/filter/model/TmfFilterOrNode.java | 26 ++++-- .../core/filter/model/TmfFilterRootNode.java | 18 ++-- .../core/filter/model/TmfFilterTreeNode.java | 5 +- .../core/filter/xml/TmfFilterXMLParser.java | 8 +- .../core/filter/xml/TmfFilterXMLWriter.java | 3 +- .../tmf/core/request/ITmfDataRequest.java | 82 +++++++++++++++++-- .../tmf/core/request/ITmfEventRequest.java | 8 +- .../tmf/core/request/TmfDataRequest.java | 58 +++++++------ .../tmf/core/request/TmfEventRequest.java | 42 +++++----- .../signal/TmfExperimentDisposedSignal.java | 8 +- .../signal/TmfExperimentSelectedSignal.java | 8 +- .../tmf/core/trace/ITmfEventParser.java | 10 ++- .../tmf/core/trace/ITmfLocation.java | 8 +- .../linuxtools/tmf/core/trace/ITmfTrace.java | 30 +++---- .../tmf/core/trace/ITmfTraceIndexer.java | 2 + .../tmf/core/trace/TmfCheckpointIndexer.java | 2 + .../tmf/core/trace/TmfExperiment.java | 18 ++-- .../tmf/core/trace/TmfLocation.java | 12 +-- .../linuxtools/tmf/core/trace/TmfTrace.java | 5 +- .../tmf/core/util/TmfSortedArrayList.java | 2 + 38 files changed, 549 insertions(+), 244 deletions(-) diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/CreateTestFiles.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/CreateTestFiles.java index 7bf67d2fdf..d15f5fce54 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/CreateTestFiles.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/CreateTestFiles.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -53,7 +53,7 @@ public class CreateTestFiles { // ======================================================================== /** - * @param args + * @param args unused */ public static void main(final String[] args) { @@ -63,7 +63,7 @@ public class CreateTestFiles { e.printStackTrace(); } - for (int i = 0; i < FILE_SIZES.length; i++) + for (int i = 0; i < FILE_SIZES.length; i++) { try { createTestFile("testfiles" + File.separator + "O-" + FILE_NAMES[i], FILE_SIZES[i], true, true); createTestFile("testfiles" + File.separator + "E-" + FILE_NAMES[i], FILE_SIZES[i], true, false); @@ -71,6 +71,7 @@ public class CreateTestFiles { } catch (final FileNotFoundException e) { } catch (final IOException e) { } + } System.out.println("Done."); } @@ -101,8 +102,9 @@ public class CreateTestFiles { out.writeUTF("Source-" + sourceIndex); // Source out.writeUTF("Type-" + typeIndex); // Type out.writeInt(i + 1); // Reference (event #) - for (int j = 0; j < typeIndex; j++) + for (int j = 0; j < typeIndex; j++) { out.writeUTF("Field-" + sourceIndex + "-" + j); + } } out.flush(); out.close(); diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/request/TmfDataRequestStub.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/request/TmfDataRequestStub.java index 0ca66da714..d81ce72c12 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/request/TmfDataRequestStub.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/request/TmfDataRequestStub.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -16,43 +16,41 @@ import org.eclipse.linuxtools.tmf.core.event.TmfEvent; import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest; /** - * TmfDataRequestStub - *

- * TODO: Implement me. Please. + * @param The event type */ public class TmfDataRequestStub extends TmfDataRequest { /** * Default constructor - * - * @param dataType + * + * @param dataType the request data type */ public TmfDataRequestStub(final Class dataType) { super(dataType); } /** - * @param dataType - * @param index + * @param dataType the request data type + * @param index the initial event index */ public TmfDataRequestStub(final Class dataType, final int index) { super(dataType, index); } /** - * @param dataType - * @param index - * @param nbRequested + * @param dataType the request data type + * @param index the initial event index + * @param nbRequested the number of events requested */ public TmfDataRequestStub(final Class dataType, final int index, final int nbRequested) { super(dataType, index, nbRequested); } /** - * @param dataType - * @param index - * @param nbRequested - * @param blockSize + * @param dataType the request data type + * @param index the initial event index + * @param nbRequested the number of events requested + * @param blockSize the event block size */ public TmfDataRequestStub(final Class dataType, final int index, final int nbRequested, final int blockSize) { super(dataType, index, nbRequested, blockSize); diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/request/TmfEventRequestStub.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/request/TmfEventRequestStub.java index ee6ee0d4f7..477de1e6e9 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/request/TmfEventRequestStub.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/request/TmfEventRequestStub.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -19,49 +19,50 @@ import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest; /** * TmfEventRequestStub *

- * TODO: Implement me. Please. + * @param The requested event type */ public class TmfEventRequestStub extends TmfEventRequest { /** - * @param dataType + * @param dataType the event type */ public TmfEventRequestStub(final Class dataType) { super(dataType); } /** - * @param dataType - * @param range + * @param dataType the event type + * @param range the requested time range */ public TmfEventRequestStub(final Class dataType, final TmfTimeRange range) { super(dataType, range); } /** - * @param dataType - * @param range - * @param nbRequested + * @param dataType the event type + * @param range the requested time range + * @param nbRequested the number of events requested */ public TmfEventRequestStub(final Class dataType, final TmfTimeRange range, final int nbRequested) { super(dataType, range, nbRequested); } /** - * @param dataType - * @param range - * @param nbRequested - * @param blockSize + * @param dataType the event type + * @param range the requested time range + * @param nbRequested the number of events requested + * @param blockSize the event block size */ public TmfEventRequestStub(final Class dataType, final TmfTimeRange range, final int nbRequested, final int blockSize) { super(dataType, range, nbRequested, blockSize); } /** - * @param dataType - * @param range - * @param nbRequested - * @param blockSize + * @param dataType the event type + * @param range the requested time range + * @param index the initial event index + * @param nbRequested the number of events requested + * @param blockSize the event block size */ public TmfEventRequestStub(final Class dataType, final TmfTimeRange range, final long index, final int nbRequested, final int blockSize) { super(dataType, range, index, nbRequested, blockSize); diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfEmptyTraceStub.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfEmptyTraceStub.java index ec82597ba0..8660594129 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfEmptyTraceStub.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfEmptyTraceStub.java @@ -25,13 +25,15 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfLocation; */ public class TmfEmptyTraceStub extends TmfTraceStub { + /** + * + */ // ------------------------------------------------------------------------ // Constructors // ------------------------------------------------------------------------ /** - * @param path - * @throws FileNotFoundException + * */ public TmfEmptyTraceStub() { super(); diff --git a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfTraceStub.java b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfTraceStub.java index 5743b5b38f..595796d88b 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfTraceStub.java +++ b/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/TmfTraceStub.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -57,10 +57,6 @@ public class TmfTraceStub extends TmfTrace implements ITmfEventParser< // Constructors // ------------------------------------------------------------------------ - /** - * @param path - * @throws FileNotFoundException - */ public TmfTraceStub() { super(); setParser(new TmfEventParserStub(this)); @@ -273,9 +269,11 @@ public class TmfTraceStub extends TmfTrace implements ITmfEventParser< public double getLocationRatio(ITmfLocation location) { fLock.lock(); try { - if (fTrace != null) - if (location.getLocation() instanceof Long) + if (fTrace != null) { + if (location.getLocation() instanceof Long) { return (double) ((Long) location.getLocation()) / fTrace.length(); + } + } } catch (final IOException e) { e.printStackTrace(); } finally { @@ -288,8 +286,9 @@ public class TmfTraceStub extends TmfTrace implements ITmfEventParser< public TmfLocation getCurrentLocation() { fLock.lock(); try { - if (fTrace != null) + if (fTrace != null) { return new TmfLocation(fTrace.getFilePointer()); + } } catch (final IOException e) { e.printStackTrace(); } finally { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedDataRequest.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedDataRequest.java index 364ab3b728..51565e7b13 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedDataRequest.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedDataRequest.java @@ -21,6 +21,8 @@ import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest; /** * The TMF coalesced data request * + * @param The request data type + * * @version 1.0 * @author Francois Chouinard */ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedEventRequest.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedEventRequest.java index 9097649911..95ad17b8d1 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedEventRequest.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedEventRequest.java @@ -24,6 +24,8 @@ import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest; /** * The TMF coalesced event request * + * @param The request event type + * * @version 1.0 * @author Francois Chouinard */ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/ITmfDataProvider.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/ITmfDataProvider.java index 107643255b..3edd87e500 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/ITmfDataProvider.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/ITmfDataProvider.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -19,10 +19,12 @@ import org.eclipse.linuxtools.tmf.core.trace.ITmfContext; /** * This is the interface of the data providers in TMF. Data providers have the * capability of handling data requests. - * + * + * @param The provider event type + * * @version 1.0 * @author Francois Chouinard - * + * * @see TmfDataProvider * @see TmfEventProvider */ @@ -30,7 +32,7 @@ public interface ITmfDataProvider extends ITmfComponent { /** * Queue the request for processing. - * + * * @param request The request to process */ public void sendRequest(ITmfDataRequest request); @@ -54,7 +56,7 @@ public interface ITmfDataProvider extends ITmfComponent { /** * Return the next event based on the context supplied. The context * will be updated for the subsequent read. - * + * * @param context the trace read context (updated) * @return the event referred to by context */ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java index 30895457d0..cf67eb1e8f 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -41,7 +41,9 @@ import org.eclipse.linuxtools.tmf.core.trace.ITmfContext; * implement the hooks (initializeContext() and getNext()). *

* TODO: Add support for providing multiple data types. - * + * + * @param The provider event type + * * @version 1.0 * @author Francois Chouinard */ @@ -201,10 +203,12 @@ public abstract class TmfDataProvider extends TmfComponent /** * Increments/decrements the pending requests counters and fires the request - * if necessary (counter == 0). Used for coalescing requests accross - * multiple TmfDataProvider. + * if necessary (counter == 0). Used for coalescing requests across multiple + * TmfDataProvider's. * * @param isIncrement + * Should we increment (true) or decrement (false) the pending + * counter */ @Override public void notifyPendingRequest(boolean isIncrement) { @@ -266,10 +270,11 @@ public abstract class TmfDataProvider extends TmfComponent // ------------------------------------------------------------------------ private void dispatchRequest(final ITmfDataRequest request) { - if (request.getExecType() == ExecutionType.FOREGROUND) + if (request.getExecType() == ExecutionType.FOREGROUND) { queueRequest(request); - else + } else { queueBackgroundRequest(request, request.getBlockSize(), true); + } } protected void queueRequest(final ITmfDataRequest request) { @@ -283,7 +288,7 @@ public abstract class TmfDataProvider extends TmfComponent // Process the request TmfThread thread = new TmfThread(request.getExecType()) { - + @Override public void run() { @@ -307,9 +312,11 @@ public abstract class TmfDataProvider extends TmfComponent // Get the ordered events T data = getNext(context); if (Tracer.isRequestTraced()) + { Tracer.traceRequest(request, "read first event"); //$NON-NLS-1$ + } while (data != null && !isCompleted(request, data, nbRead)) { - if (fLogData) { + if (fLogData) { Tracer.traceEvent(provider, request, data); } if (request.getDataType().isInstance(data)) { @@ -323,7 +330,9 @@ public abstract class TmfDataProvider extends TmfComponent } } if (Tracer.isRequestTraced()) + { Tracer.traceRequest(request, "COMPLETED"); //$NON-NLS-1$ + } if (request.isCancelled()) { request.cancel(); @@ -347,7 +356,9 @@ public abstract class TmfDataProvider extends TmfComponent }; if (Tracer.isRequestTraced()) + { Tracer.traceRequest(request, "QUEUED"); //$NON-NLS-1$ + } fExecutor.execute(thread); } @@ -437,7 +448,7 @@ public abstract class TmfDataProvider extends TmfComponent /** * Initialize the provider based on the request. The context is provider * specific and will be updated by getNext(). - * + * * @param request * @return an application specific context; null if request can't be serviced */ @@ -446,7 +457,7 @@ public abstract class TmfDataProvider extends TmfComponent // /** // * Return the next event based on the context supplied. The context // * will be updated for the subsequent read. -// * +// * // * @param context the trace read context (updated) // * @return the event referred to by context // */ @@ -454,7 +465,7 @@ public abstract class TmfDataProvider extends TmfComponent /** * Checks if the data meets the request completion criteria. - * + * * @param request the request * @param data the data to verify * @param nbRead the number of events read so far diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java index 012e72e68c..b89ed152b0 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -23,7 +23,9 @@ import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest; /** * An extension of TmfDataProvider timestamped events providers. - * + * + * @param The provider event type + * * @version 1.0 * @author Francois Chouinard */ @@ -167,10 +169,10 @@ public abstract class TmfEventProvider extends TmfDataProvi public void handleCompleted() { nbRead[0] += this.getNbRead(); if (nbRead[0] >= request.getNbRequested() || (this.getNbRead() < CHUNK_SIZE[0])) { - if (this.isCancelled()) { + if (this.isCancelled()) { request.cancel(); } else if (this.isFailed()) { - request.fail(); + request.fail(); } else { request.done(); } diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/ITmfFilterTreeNode.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/ITmfFilterTreeNode.java index 80aa915911..d55ee636ef 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/ITmfFilterTreeNode.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/ITmfFilterTreeNode.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2010 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: * Francois Godin (copelnug@gmail.com) - Initial API * Yuriy Vashchuk (yvashchuk@gmail.com) - Initial implementation @@ -22,81 +22,83 @@ import org.eclipse.linuxtools.tmf.core.filter.ITmfFilter; *

This is Node Interface in the Filter Tree

*/ public interface ITmfFilterTreeNode extends ITmfFilter { - + /** *

Get the parent node of current node

- * + * * @return The parent node (null when the node has no parent). */ public ITmfFilterTreeNode getParent(); - + /** *

Get the current node name

- * + * * @return The name of the current node. */ public String getNodeName(); - + /** - *

Tell if the node has children

- * + *

Tell if the node has children

+ * * @return True if the node has children. */ public boolean hasChildren(); - + /** *

Return the number of children

- * + * * @return The number of children. */ public int getChildrenCount(); - + /** *

Get the array of children

- * + * * @return The array (possibly empty) of children nodes. */ public ITmfFilterTreeNode[] getChildren(); - + /** *

Get the node by index

- * + * * @param index The index of node to return. * @return The desired node (null if the node is not exists). */ public ITmfFilterTreeNode getChild(int index); - + /** *

Remove the node from its parent

- * - *

Shifts all nodes after the removed one to prevent having an empty spot. + * + *

Shifts all nodes after the removed one to prevent having an empty spot. * See {@link #replaceChild(int, ITmfFilterTreeNode)} to replace a node.

- * - * @return The removed node. + * + * @return The removed node. */ public ITmfFilterTreeNode remove(); - + /** *

Remove the child from the current node

- * - *

Shifts all nodes after the removed one to prevent having an empty spot. + * + *

Shifts all nodes after the removed one to prevent having an empty spot. * See {@link #replaceChild(int, ITmfFilterTreeNode)} to replace a node.

- * - * @return The removed node. + * + * @param node the parent node + * + * @return The removed node. */ public ITmfFilterTreeNode removeChild(ITmfFilterTreeNode node); - + /** *

Append a node to the current children

- * + * * @param node Node to append. * @return Index of added node (-1 if the node cannot be added). */ public int addChild(ITmfFilterTreeNode node); - + /** *

Replace a child node

- * + * * @param index Index of the node to replace. * @param node Node who will replace. * @return Node replaced. @@ -105,18 +107,21 @@ public interface ITmfFilterTreeNode extends ITmfFilter { /** *

Sets the parent of current node

- * + * * @param parent The parent of current node. */ public void setParent(ITmfFilterTreeNode parent); - + /** *

Gets the list of valid children node names that could be added to the node

- * + * * @return The list of valid children node names. */ public List getValidChildren(); + /** + * @return a clone of the node + */ public ITmfFilterTreeNode clone(); - + } diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterAndNode.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterAndNode.java index bfb89f1f28..71559a555b 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterAndNode.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterAndNode.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2010 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 *******************************************************************************/ @@ -17,29 +17,39 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; /** * Filter node for the 'and' operation - * + * * @version 1.0 * @author Patrick Tasse */ +@SuppressWarnings("javadoc") public class TmfFilterAndNode extends TmfFilterTreeNode { public static final String NODE_NAME = "AND"; //$NON-NLS-1$ public static final String NOT_ATTR = "not"; //$NON-NLS-1$ - + private boolean fNot = false; - + + /** + * @param parent the parent node + */ public TmfFilterAndNode(ITmfFilterTreeNode parent) { super(parent); } + /** + * @return the NOT state + */ public boolean isNot() { return fNot; } - + + /** + * @param not the NOT state + */ public void setNot(boolean not) { this.fNot = not; } - + @Override public String getNodeName() { return NODE_NAME; @@ -76,5 +86,5 @@ public class TmfFilterAndNode extends TmfFilterTreeNode { } return buf.toString(); } - + } diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterCompareNode.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterCompareNode.java index ff0d95dad7..9a30f982c9 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterCompareNode.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterCompareNode.java @@ -27,9 +27,10 @@ import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp; * @version 1.0 * @author Patrick Tasse */ +@SuppressWarnings("javadoc") public class TmfFilterCompareNode extends TmfFilterTreeNode { - public static final String NODE_NAME = "COMPARE"; //$NON-NLS-1$ + public static final String NODE_NAME = "COMPARE"; //$NON-NLS-1$ public static final String NOT_ATTR = "not"; //$NON-NLS-1$ public static final String FIELD_ATTR = "field"; //$NON-NLS-1$ public static final String RESULT_ATTR = "result"; //$NON-NLS-1$ @@ -53,47 +54,80 @@ public class TmfFilterCompareNode extends TmfFilterTreeNode { private Number fValueNumber; private TmfTimestamp fValueTimestamp; + /** + * @param parent the parent node + */ public TmfFilterCompareNode(ITmfFilterTreeNode parent) { super(parent); } + /** + * @return the NOT state + */ public boolean isNot() { return fNot; } + /** + * @param not the NOT state + */ public void setNot(boolean not) { this.fNot = not; } + /** + * @return the field name + */ public String getField() { return fField; } + /** + * @param field the field name + */ public void setField(String field) { this.fField = field; } + /** + * @return the compare result + */ public int getResult() { return fResult; } + /** + * @param result the compare result + */ public void setResult(int result) { this.fResult = result; } + /** + * @return the comparison type + */ public Type getType() { return fType; } + /** + * @param type the comparison type + */ public void setType(Type type) { this.fType = type; setValue(fValue); } + /** + * @return the comparison value + */ public String getValue() { return fValue; } + /** + * @param value the comparison value + */ public void setValue(String value) { this.fValue = value; fValueNumber = null; diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterContainsNode.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterContainsNode.java index 476999e904..a00af6f4ec 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterContainsNode.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterContainsNode.java @@ -23,10 +23,11 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; * @version 1.0 * @author Patrick Tasse */ +@SuppressWarnings("javadoc") public class TmfFilterContainsNode extends TmfFilterTreeNode { public static final String NODE_NAME = "CONTAINS"; //$NON-NLS-1$ - public static final String NOT_ATTR = "not"; //$NON-NLS-1$ + public static final String NOT_ATTR = "not"; //$NON-NLS-1$ public static final String FIELD_ATTR = "field"; //$NON-NLS-1$ public static final String VALUE_ATTR = "value"; //$NON-NLS-1$ public static final String IGNORECASE_ATTR = "ignorecase"; //$NON-NLS-1$ @@ -37,39 +38,66 @@ public class TmfFilterContainsNode extends TmfFilterTreeNode { private String fValueUpperCase; private boolean fIgnoreCase = false; + /** + * @param parent the parent node + */ public TmfFilterContainsNode(ITmfFilterTreeNode parent) { super(parent); } + /** + * @return the NOT state + */ public boolean isNot() { return fNot; } + /** + * @param not the NOT state + */ public void setNot(boolean not) { this.fNot = not; } + /** + * @return the field name + */ public String getField() { return fField; } + /** + * @param field the field name + */ public void setField(String field) { this.fField = field; } + /** + * @return the contains value + */ public String getValue() { return fValue; } + /** + * @param value the contains value + */ public void setValue(String value) { this.fValue = value; fValueUpperCase = value.toUpperCase(); } + /** + * @return the ignoreCase state + */ public boolean isIgnoreCase() { return fIgnoreCase; } + /** + * @param ignoreCase the ignoreCase state + */ public void setIgnoreCase(boolean ignoreCase) { this.fIgnoreCase = ignoreCase; } diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterEqualsNode.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterEqualsNode.java index 2a85da28d7..8c54f04f56 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterEqualsNode.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterEqualsNode.java @@ -24,9 +24,10 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; * @version 1.0 * @author Patrick Tasse */ +@SuppressWarnings("javadoc") public class TmfFilterEqualsNode extends TmfFilterTreeNode { - public static final String NODE_NAME = "EQUALS"; //$NON-NLS-1$ + public static final String NODE_NAME = "EQUALS"; //$NON-NLS-1$ public static final String NOT_ATTR = "not"; //$NON-NLS-1$ public static final String FIELD_ATTR = "field"; //$NON-NLS-1$ public static final String VALUE_ATTR = "value"; //$NON-NLS-1$ @@ -37,38 +38,65 @@ public class TmfFilterEqualsNode extends TmfFilterTreeNode { private String fValue; private boolean fIgnoreCase = false; + /** + * @param parent the aprent node + */ public TmfFilterEqualsNode(ITmfFilterTreeNode parent) { super(parent); } + /** + * @return the NOT state + */ public boolean isNot() { return fNot; } + /** + * @param not the NOT state + */ public void setNot(boolean not) { this.fNot = not; } + /** + * @return the field name + */ public String getField() { return fField; } + /** + * @param field the field name + */ public void setField(String field) { this.fField = field; } + /** + * @return the equals value + */ public String getValue() { return fValue; } + /** + * @param value the equals value + */ public void setValue(String value) { this.fValue = value; } + /** + * @return the ignoreCase state + */ public boolean isIgnoreCase() { return fIgnoreCase; } + /** + * @param ignoreCase the ignoreCase state + */ public void setIgnoreCase(boolean ignoreCase) { this.fIgnoreCase = ignoreCase; } diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterEventTypeNode.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterEventTypeNode.java index 8086ea1a45..70137b7857 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterEventTypeNode.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterEventTypeNode.java @@ -23,15 +23,19 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; * @version 1.0 * @author Patrick Tasse */ +@SuppressWarnings("javadoc") public class TmfFilterEventTypeNode extends TmfFilterTreeNode { - public static final String NODE_NAME = "EVENTTYPE"; //$NON-NLS-1$ + public static final String NODE_NAME = "EVENTTYPE"; //$NON-NLS-1$ public static final String TYPE_ATTR = "type"; //$NON-NLS-1$ public static final String NAME_ATTR = "name"; //$NON-NLS-1$ private String fType; private String fName; + /** + * @param parent the parent node + */ public TmfFilterEventTypeNode(ITmfFilterTreeNode parent) { super(parent); } @@ -41,18 +45,30 @@ public class TmfFilterEventTypeNode extends TmfFilterTreeNode { return NODE_NAME; } + /** + * @return the event type + */ public String getEventType() { return fType; } + /** + * @param type the event type + */ public void setEventType(String type) { this.fType = type; } + /** + * @return TBD + */ public String getName() { return fName; } + /** + * @param name TBD + */ public void setName(String name) { this.fName = name; } diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterMatchesNode.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterMatchesNode.java index 4a289274ac..8d2c35c875 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterMatchesNode.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterMatchesNode.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2010 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 *******************************************************************************/ @@ -21,46 +21,68 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; /** * Filter node for the regex match - * + * * @version 1.0 * @author Patrick Tasse */ +@SuppressWarnings("javadoc") public class TmfFilterMatchesNode extends TmfFilterTreeNode { - public static final String NODE_NAME = "MATCHES"; //$NON-NLS-1$ + public static final String NODE_NAME = "MATCHES"; //$NON-NLS-1$ public static final String NOT_ATTR = "not"; //$NON-NLS-1$ public static final String FIELD_ATTR = "field"; //$NON-NLS-1$ public static final String REGEX_ATTR = "regex"; //$NON-NLS-1$ - + private boolean fNot = false; private String fField; private String fRegex; private Pattern fPattern; - + + /** + * @param parent the parent node + */ public TmfFilterMatchesNode(ITmfFilterTreeNode parent) { super(parent); } + /** + * @return the NOT state + */ public boolean isNot() { return fNot; } - + + /** + * @param not the NOT state + */ public void setNot(boolean not) { this.fNot = not; } - + + /** + * @return the field name + */ public String getField() { return fField; } + /** + * @param field the field name + */ public void setField(String field) { this.fField = field; } + /** + * @return the regular expression + */ public String getRegex() { return fRegex; } + /** + * @param regex the regular expression + */ public void setRegex(String regex) { this.fRegex = regex; try { @@ -107,7 +129,11 @@ public class TmfFilterMatchesNode extends TmfFilterTreeNode { clone.setRegex(fRegex); return clone; } - + + /** + * @param pattern the rough regex pattern + * @return the compliant regex + */ public static String regexFix(String pattern) { // if the pattern does not contain one of the expressions .* !^ // (at the beginning) $ (at the end), then a .* is added at the diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterNode.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterNode.java index af7d2428fe..9c610f3073 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterNode.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterNode.java @@ -19,31 +19,45 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; /** * Filter node for the event match operation - * + * * @version 1.0 * @author Patrick Tasse */ +@SuppressWarnings("javadoc") public class TmfFilterNode extends TmfFilterTreeNode { - public static final String NODE_NAME = "FILTER"; //$NON-NLS-1$ + public static final String NODE_NAME = "FILTER"; //$NON-NLS-1$ public static final String NAME_ATTR = "name"; //$NON-NLS-1$ String fFilterName; + /** + * @param filterName the filter name + */ public TmfFilterNode(String filterName) { super(null); fFilterName = filterName; } + /** + * @param parent the parent node + * @param filterName the filter name + */ public TmfFilterNode(ITmfFilterTreeNode parent, String filterName) { super(parent); fFilterName = filterName; } + /** + * @return the filer name + */ public String getFilterName() { return fFilterName; } + /** + * @param filterName the filer name + */ public void setFilterName(String filterName) { fFilterName = filterName; } diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterOrNode.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterOrNode.java index 0dfa91c4cd..fa474e1959 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterOrNode.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterOrNode.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2010 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 *******************************************************************************/ @@ -16,17 +16,21 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; /** * Filter node for the 'or' operation - * + * * @version 1.0 * @author Patrick Tasse */ +@SuppressWarnings("javadoc") public class TmfFilterOrNode extends TmfFilterTreeNode { - public static final String NODE_NAME = "OR"; //$NON-NLS-1$ + public static final String NODE_NAME = "OR"; //$NON-NLS-1$ public static final String NOT_ATTR = "not"; //$NON-NLS-1$ - + private boolean fNot = false; - + + /** + * @param parent the parent node + */ public TmfFilterOrNode(ITmfFilterTreeNode parent) { super(parent); } @@ -36,14 +40,20 @@ public class TmfFilterOrNode extends TmfFilterTreeNode { return NODE_NAME; } + /** + * @return the NOT state + */ public boolean isNot() { return fNot; } - + + /** + * @param not the NOT state + */ public void setNot(boolean not) { this.fNot = not; } - + @Override public boolean matches(ITmfEvent event) { for (ITmfFilterTreeNode node : getChildren()) { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterRootNode.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterRootNode.java index b1216e72b4..f7f00be67a 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterRootNode.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterRootNode.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2010 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 *******************************************************************************/ @@ -19,18 +19,22 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; /** * The Filter tree root node - * + * * @version 1.0 * @author Patrick Tasse */ public class TmfFilterRootNode extends TmfFilterTreeNode { - - public static final String NODE_NAME = "ROOT"; //$NON-NLS-1$ - + + @SuppressWarnings("javadoc") + public static final String NODE_NAME = "ROOT"; //$NON-NLS-1$ + private static final String[] VALID_CHILDREN = { TmfFilterNode.NODE_NAME }; - + + /** + * Default constructor + */ public TmfFilterRootNode() { super(null); } diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterTreeNode.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterTreeNode.java index 2c3b5a294c..d5cb9b5d5a 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterTreeNode.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterTreeNode.java @@ -22,7 +22,7 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEventField; /** * The base class for the Filter tree nodes - * + * * @version 1.0 * @author Yuriy Vashchuk * @author Patrick Tasse @@ -42,6 +42,9 @@ public abstract class TmfFilterTreeNode implements ITmfFilterTreeNode, Cloneable private ITmfFilterTreeNode parent = null; private ArrayList children = new ArrayList(); + /** + * @param parent the parent node + */ public TmfFilterTreeNode(final ITmfFilterTreeNode parent) { if (parent != null) { parent.addChild(this); diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/xml/TmfFilterXMLParser.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/xml/TmfFilterXMLParser.java index df7534299f..e5befebc18 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/xml/TmfFilterXMLParser.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/xml/TmfFilterXMLParser.java @@ -35,11 +35,11 @@ public class TmfFilterXMLParser { /** * The XMLParser constructor * - * @param uri - * The XML file to parse + * @param uri The XML file to parse + * @throws SAXException SAX exception + * @throws IOException IO exception */ - public TmfFilterXMLParser(final String uri) throws SAXException, - IOException { + public TmfFilterXMLParser(final String uri) throws SAXException, IOException { SAXParserFactory m_parserFactory = null; m_parserFactory = SAXParserFactory.newInstance(); diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/xml/TmfFilterXMLWriter.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/xml/TmfFilterXMLWriter.java index 49c6282059..5a5fca5db0 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/xml/TmfFilterXMLWriter.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/xml/TmfFilterXMLWriter.java @@ -51,7 +51,8 @@ public class TmfFilterXMLWriter { * The XMLParser constructor * * @param root The tree root - * @throws ParserConfigurationException + * @throws ParserConfigurationException if a DocumentBuilder + * cannot be created which satisfies the configuration requested. */ public TmfFilterXMLWriter(final ITmfFilterTreeNode root) throws ParserConfigurationException { DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/ITmfDataRequest.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/ITmfDataRequest.java index 4cfd494b6f..ea84d93dde 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/ITmfDataRequest.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/ITmfDataRequest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -16,7 +16,9 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; /** * The TMF data request - * + * + * @param The request data type + * * @version 1.0 * @author Francois Chouinard */ @@ -26,7 +28,19 @@ public interface ITmfDataRequest { // Constants // ------------------------------------------------------------------------ - public enum ExecutionType { BACKGROUND, FOREGROUND } + /** + * The request execution type/priority + */ + public enum ExecutionType { + /** + * Backgroung, long-running, lower priority request + */ + BACKGROUND, + /** + * Foreground, short-running, high priority request + */ + FOREGROUND + } // ------------------------------------------------------------------------ // Accessors @@ -68,33 +82,74 @@ public interface ITmfDataRequest { public int getNbRead(); // ------------------------------------------------------------------------ - // Request state + // Request state predicates // ------------------------------------------------------------------------ + /** + * @return true if the request is still active + */ public boolean isRunning(); + + /** + * @return true if the request is completed + */ public boolean isCompleted(); + + /** + * @return true if the request has failed + */ public boolean isFailed(); + + /** + * @return true if the request was cancelled + */ public boolean isCancelled(); // ------------------------------------------------------------------------ // Data handling // ------------------------------------------------------------------------ + /** + * Process the piece of data + * + * @param data the data to process + */ public void handleData(T data); // ------------------------------------------------------------------------ - // Request handling + // Request notifications // ------------------------------------------------------------------------ + /** + * Request processing start notification + */ public void handleStarted(); + + /** + * Request processing completion notification + */ public void handleCompleted(); + + /** + * Request successful completion notification + */ public void handleSuccess(); + + /** + * Request failure notification + */ public void handleFailure(); + + /** + * Request cancellation notification + */ public void handleCancel(); /** * To suspend the client thread until the request completes * (or is canceled). + * + * @throws InterruptedException thrown if the request was cancelled */ public void waitForCompletion() throws InterruptedException; @@ -102,8 +157,23 @@ public interface ITmfDataRequest { // Request state modifiers // ------------------------------------------------------------------------ + /** + * Put the request in the running state + */ public void start(); + + /** + * Put the request in the completed state + */ public void done(); + + /** + * Put the request in the failed completed state + */ public void fail(); + + /** + * Put the request in the cancelled completed state + */ public void cancel(); } diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/ITmfEventRequest.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/ITmfEventRequest.java index b22e032586..0fb7301f9a 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/ITmfEventRequest.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/ITmfEventRequest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -17,7 +17,9 @@ import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange; /** * The TMF event request - * + * + * @param The request event type + * * @version 1.0 * @author Francois Chouinard */ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfDataRequest.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfDataRequest.java index e8418f1fe3..5be9be4d37 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfDataRequest.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfDataRequest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -33,7 +33,7 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; * with cancel(). *

* Typical usage: - * + * *

  * TmfTimeWindow range = new TmfTimewindow(...);
  * TmfDataRequest<DataType[]> request = new TmfDataRequest<DataType[]>(DataType.class, 0, NB_EVENTS, BLOCK_SIZE) {
@@ -59,14 +59,16 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
  * fProcessor.process(request, true);
  * 
  * 
- * + * * TODO: Consider decoupling from "time range", "rank", etc and for the more generic notion of "criteria". This would * allow to extend for "time range", etc instead of providing specialized constructors. This also means removing the * criteria info from the data structure (with the possible exception of fNbRequested). The nice thing about it is that * it would prepare us well for the coming generation of analysis tools. - * + * * TODO: Implement request failures (codes, etc...) - * + * + * @param The request data type + * * @version 1.0 * @author Francois Chouinard */ @@ -117,7 +119,7 @@ public abstract class TmfDataRequest implements ITmfDataReq /** * 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 TmfDataRequest(Class dataType) { @@ -127,7 +129,7 @@ public abstract class TmfDataRequest implements ITmfDataReq /** * 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 */ @@ -138,7 +140,7 @@ public abstract class TmfDataRequest implements ITmfDataReq /** * 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 */ @@ -149,7 +151,7 @@ public abstract class TmfDataRequest implements ITmfDataReq /** * 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 @@ -161,7 +163,7 @@ public abstract class TmfDataRequest implements ITmfDataReq /** * 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 @@ -173,7 +175,7 @@ public abstract class TmfDataRequest implements ITmfDataReq /** * 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 @@ -186,7 +188,7 @@ public abstract class TmfDataRequest implements ITmfDataReq /** * 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 @@ -199,7 +201,7 @@ public abstract class TmfDataRequest implements ITmfDataReq /** * 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 @@ -224,8 +226,8 @@ public abstract class TmfDataRequest implements ITmfDataReq String type = getClass().getName(); type = type.substring(type.lastIndexOf('.') + 1); @SuppressWarnings("nls") - String message = "CREATED " - + (getExecType() == ITmfDataRequest.ExecutionType.BACKGROUND ? "(BG)" : "(FG)") + String message = "CREATED " + + (getExecType() == ITmfDataRequest.ExecutionType.BACKGROUND ? "(BG)" : "(FG)") + " Type=" + type + " Index=" + getIndex() + " NbReq=" + getNbRequested() + " DataType=" + getDataType().getSimpleName(); Tracer.traceRequest(this, message); @@ -338,7 +340,7 @@ public abstract class TmfDataRequest implements ITmfDataReq /** * this method is called by the event provider to set the index corresponding to the time range start time - * + * * @param index * the start time index */ @@ -353,7 +355,7 @@ public abstract class TmfDataRequest implements ITmfDataReq /** * 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. @@ -362,7 +364,7 @@ public abstract class TmfDataRequest implements ITmfDataReq * - 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 data a piece of data */ @Override @@ -375,16 +377,18 @@ public abstract class TmfDataRequest implements ITmfDataReq @Override public void handleStarted() { if (Tracer.isRequestTraced()) + { Tracer.traceRequest(this, "STARTED"); //$NON-NLS-1$ + } } /** * 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 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. */ @@ -405,30 +409,38 @@ public abstract class TmfDataRequest implements ITmfDataReq handleSuccess(); } if (Tracer.isRequestTraced()) + { Tracer.traceRequest(this, "COMPLETED (" + fNbRead + " events read)"); //$NON-NLS-1$ //$NON-NLS-2$ + } } @Override public void handleSuccess() { if (Tracer.isRequestTraced()) + { Tracer.traceRequest(this, "SUCCEEDED"); //$NON-NLS-1$ + } } @Override public void handleFailure() { if (Tracer.isRequestTraced()) + { Tracer.traceRequest(this, "FAILED"); //$NON-NLS-1$ + } } @Override public void handleCancel() { if (Tracer.isRequestTraced()) + { Tracer.traceRequest(this, "CANCELLED"); //$NON-NLS-1$ + } } /** * To suspend the client thread until the request starts (or is canceled). - * + * * @throws InterruptedException * If the thread was interrupted while waiting */ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfEventRequest.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfEventRequest.java index 859a767f51..5a052faa5b 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfEventRequest.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfEventRequest.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -18,7 +18,9 @@ import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange; /** * An extension of TmfDataRequest for timestamped events. - * + * + * @param The request event type + * * @version 1.0 * @author Francois Chouinard */ @@ -37,7 +39,7 @@ public abstract class TmfEventRequest extends TmfDataReques /** * 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 dataType) { @@ -47,7 +49,7 @@ public abstract class TmfEventRequest extends TmfDataReques /** * 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 */ @@ -58,7 +60,7 @@ public abstract class TmfEventRequest extends TmfDataReques /** * 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 */ @@ -69,7 +71,7 @@ public abstract class TmfEventRequest extends TmfDataReques /** * 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 @@ -81,7 +83,7 @@ public abstract class TmfEventRequest extends TmfDataReques /** * 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 @@ -89,11 +91,11 @@ public abstract class TmfEventRequest extends TmfDataReques public TmfEventRequest(Class dataType, TmfTimeRange range, int nbRequested) { this(dataType, range, 0, nbRequested, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND); } - + /** * 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 @@ -102,11 +104,11 @@ public abstract class TmfEventRequest extends TmfDataReques public TmfEventRequest(Class dataType, TmfTimeRange range, int nbRequested, ExecutionType priority) { this(dataType, range, 0, nbRequested, DEFAULT_BLOCK_SIZE, priority); } - + /** * 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 @@ -119,7 +121,7 @@ public abstract class TmfEventRequest extends TmfDataReques /** * 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 index the index of the first event to retrieve @@ -133,7 +135,7 @@ public abstract class TmfEventRequest extends TmfDataReques /** * 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 @@ -147,7 +149,7 @@ public abstract class TmfEventRequest extends TmfDataReques /** * 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 @@ -163,9 +165,9 @@ public abstract class TmfEventRequest extends TmfDataReques String type = getClass().getName(); type = type.substring(type.lastIndexOf('.') + 1); @SuppressWarnings("nls") - String message = "CREATED " - + (getExecType() == ITmfDataRequest.ExecutionType.BACKGROUND ? "(BG)" : "(FG)") - + " Type=" + type + " Index=" + getIndex() + " NbReq=" + getNbRequested() + String message = "CREATED " + + (getExecType() == ITmfDataRequest.ExecutionType.BACKGROUND ? "(BG)" : "(FG)") + + " Type=" + type + " Index=" + getIndex() + " NbReq=" + getNbRequested() + " Range=" + getRange() + " DataType=" + getDataType().getSimpleName(); Tracer.traceRequest(this, message); @@ -191,7 +193,7 @@ public abstract class TmfEventRequest extends TmfDataReques /** * 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 index */ @Override @@ -221,7 +223,7 @@ public abstract class TmfEventRequest extends TmfDataReques @Override @SuppressWarnings("nls") public String toString() { - return "[TmfEventRequest(" + getRequestId() + "," + getDataType().getSimpleName() + return "[TmfEventRequest(" + getRequestId() + "," + getDataType().getSimpleName() + "," + getRange() + "," + getIndex() + "," + getNbRequested() + "," + getBlockSize() + ")]"; } diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfExperimentDisposedSignal.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfExperimentDisposedSignal.java index 34cb219828..adffcbff51 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfExperimentDisposedSignal.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfExperimentDisposedSignal.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2011 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -17,7 +17,9 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment; /** * Experiemnt has been disposed - * + * + * @param The experiment event type + * * @version 1.0 * @author Francois Chouinard */ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfExperimentSelectedSignal.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfExperimentSelectedSignal.java index e978af1c08..3b677f95fd 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfExperimentSelectedSignal.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/signal/TmfExperimentSelectedSignal.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009 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: * Francois Chouinard - Initial API and implementation *******************************************************************************/ @@ -17,7 +17,9 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment; /** * New experiment has been selected - * + * + * @param The experiment event type + * * @version 1.0 * @author Francois Chouinard */ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfEventParser.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfEventParser.java index 1b7920ba52..011311dbdd 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfEventParser.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfEventParser.java @@ -1,11 +1,11 @@ /******************************************************************************* * 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 * accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * Francois Chouinard - Initial API and implementation * Francois Chouinard - Updated as per TMF Trace Model 1.0 @@ -17,7 +17,9 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; /** * The generic trace parser in TMF. - * + * + * @param The trace event type + * * @version 1.0 * @author Francois Chouinard * @@ -29,7 +31,7 @@ public interface ITmfEventParser { /** * Parses the trace event referenced by the context. * The context should *not* be altered. - * + * * @param context the trace context * @return a parsed event (null if none) */ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfLocation.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfLocation.java index 708ff96562..d78aae8cfc 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfLocation.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfLocation.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010, 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: * Francois Chouinard - Initial API and implementation * Francois Chouinard - Updated as per TMF Trace Model 1.0 @@ -22,7 +22,9 @@ package org.eclipse.linuxtools.tmf.core.trace; * arbitrary event. *

* This location is trace-specific and must be comparable. - * + * + * @param The trace location type + * * @version 1.0 * @author Francois Chouinard */ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java index 5d2e1ca953..d0d949cbf2 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2011, 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: * Francois Chouinard - Initial API and implementation * Francois Chouinard - Updated as per TMF Trace Model 1.0 @@ -32,7 +32,7 @@ import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException; * * Concrete ITmfTrace classes have to provide a parameter-less constructor and * an initialization method (initTrace) if they are to be opened from - * the Project View. Also, a validation method (validate) has to be + * the Project View. Also, a validation method (validate) has to be * provided to ensure that the trace is of the correct type. *

* A trace can be accessed simultaneously from multiple threads by various @@ -92,16 +92,18 @@ import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException; * super.handleCompleted(); * } * }; - * + * * fTrace.handleRequest(request); * if (youWant) { * request.waitForCompletion(); - * } + * } * - * + * + * @param The trace event type + * * @version 1.0 * @author Francois Chouinard - * + * * @see ITmfContext * @see ITmfEvent * @see ITmfTraceIndexer @@ -129,7 +131,7 @@ public interface ITmfTrace extends ITmfDataProvider { *

* Typically, the parameterless constructor will provide the block size * and its associated parser and indexer. - * + * * @param resource the trace resource * @param path the trace path * @param type the trace event type @@ -139,10 +141,10 @@ public interface ITmfTrace extends ITmfDataProvider { /** * Validate that the trace is of the correct type. - * + * * @param project the eclipse project * @param path the trace path - * + * * @return true if trace is valid */ public boolean validate(IProject project, String path); @@ -211,7 +213,7 @@ public interface ITmfTrace extends ITmfDataProvider { /** * Returns the ratio (proportion) corresponding to the specified location. - * + * * @param location a trace specific location * @return a floating-point number between 0.0 (beginning) and 1.0 (end) */ @@ -243,7 +245,7 @@ public interface ITmfTrace extends ITmfDataProvider { *

* If the requested rank is beyond the last trace event, the context * returned will yield a null event if used in a subsequent read. - * + * * @param rank the event rank * @return a context which can later be used to read the corresponding event */ @@ -259,7 +261,7 @@ public interface ITmfTrace extends ITmfDataProvider { *

* If the requested timestamp is beyond the last trace event, the context * returned will yield a null event if used in a subsequent read. - * + * * @param timestamp the timestamp of desired event * @return a context which can later be used to read the corresponding event */ @@ -272,7 +274,7 @@ public interface ITmfTrace extends ITmfDataProvider { * The notion of ratio (0.0 <= r <= 1.0) is trace specific and left * voluntarily vague. Typically, it would refer to the event proportional * rank (arguably more intuitive) or timestamp in the trace file. - * + * * @param ratio the proportional 'rank' in the trace * @return a context which can later be used to read the corresponding event */ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java index bdad22ec17..8d04a0b3c6 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java @@ -19,6 +19,8 @@ import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange; /** * The generic trace indexer in TMF with support for incremental indexing. * + * @param The trace event type + * * @version 1.0 * @author Francois Chouinard * diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java index 21047497a5..66c700fb06 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java @@ -44,6 +44,8 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal; * Locating a specific checkpoint is trivial for both rank (rank % interval) and * timestamp (bsearch in the array). * + * @param The trace event type + * * @version 1.0 * @author Francois Chouinard * diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java index 7f9576cbda..b4f85fa0f1 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java @@ -38,6 +38,8 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal; * TmfExperiment presents a time-ordered, unified view of a set of ITmfTrace:s * that are part of a tracing experiment. * + * @param The experiment event type + * * @version 1.0 * @author Francois Chouinard */ @@ -85,21 +87,19 @@ public class TmfExperiment extends TmfTrace implements I // ------------------------------------------------------------------------ /** - * @param type - * @param id - * @param traces - * @throws TmfTraceException + * @param type the event type + * @param id the experiment id + * @param traces the experiment set of traces */ public TmfExperiment(final Class type, final String id, final ITmfTrace[] traces) { this(type, id, traces, DEFAULT_INDEX_PAGE_SIZE); } /** - * @param type - * @param id - * @param traces - * @param indexPageSize - * @throws TmfTraceException + * @param type the event type + * @param path the experiment path + * @param traces the experiment set of traces + * @param indexPageSize the experiment index page size */ @SuppressWarnings({ "unchecked", "rawtypes" }) public TmfExperiment(final Class type, final String path, final ITmfTrace[] traces, final int indexPageSize) { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfLocation.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfLocation.java index 8a438dc622..6688736e4c 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfLocation.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfLocation.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2009, 2010, 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: * Francois Chouinard - Initial API and implementation * Francois Chouinard - Updated as per TMF Trace Model 1.0 @@ -18,7 +18,9 @@ import java.lang.reflect.Method; /** * A convenience implementation on of ITmfLocation. The generic class (L) must * be comparable. - * + * + * @param The trace lcoation type + * * @version 1.0 * @author Francois Chouinard */ @@ -43,7 +45,7 @@ public class TmfLocation> implements ITmfLocation, Cl /** * Standard constructor. - * + * * @param location the trace location */ public TmfLocation(final L location) { @@ -52,7 +54,7 @@ public class TmfLocation> implements ITmfLocation, Cl /** * Copy constructor - * + * * @param location the original location */ public TmfLocation(final TmfLocation location) { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java index 82421f5d62..a1ccadb03e 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java @@ -46,6 +46,8 @@ import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest; * TmfCheckpointIndexer (default). In this case, the trace cache size will be * used as checkpoint interval. * + * @param The trace event type + * * @version 1.0 * @author Francois Chouinard * @@ -267,7 +269,6 @@ public abstract class TmfTrace extends TmfEventProvider * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getEventType() */ @Override - @SuppressWarnings("unchecked") public Class getEventType() { return (Class) super.getType(); } @@ -492,7 +493,7 @@ public abstract class TmfTrace extends TmfEventProvider } return context; } - + // ------------------------------------------------------------------------ // ITmfTrace - Read operations (returning an actual event) // ------------------------------------------------------------------------ diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfSortedArrayList.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfSortedArrayList.java index 184b8868a2..a93d4a291f 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfSortedArrayList.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfSortedArrayList.java @@ -17,6 +17,8 @@ import java.util.ArrayList; /** * Implementation of a sorted array list. * + * @param The array element type + * * @version 1.0 * @author Francois Chouinard */ -- 2.34.1