lttng: Javadoc udpate for the lttng2.kernel.ui package
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 12 Jun 2012 21:05:01 +0000 (17:05 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 14 Jun 2012 19:59:49 +0000 (15:59 -0400)
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
16 files changed:
org.eclipse.linuxtools.lttng2.kernel.ui.tests/src/org/eclipse/linuxtools/lttng2/kernel/ui/tests/ActivatorTest.java
org.eclipse.linuxtools.lttng2.kernel.ui.tests/src/org/eclipse/linuxtools/lttng2/kernel/ui/tests/AllTests.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/Activator.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/Messages.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/viewers/events/LTTng2EventsTable.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/viewers/events/Messages.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/PerspectiveFactory.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/common/EventIterator.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowEntry.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowEvent.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowPresentationProvider.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesEntry.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesEvent.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesPresentationProvider.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesView.java

index 90b2c42a0958f0e07900035ed6b98cbdd2915668..6f9a0866d8eed39c960c8a2a77192d965878439a 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -26,6 +26,7 @@ import org.junit.Test;
  * Test suite for the Activator class
  * <p>
  */
+@SuppressWarnings("javadoc")
 public class ActivatorTest extends TestCase {
 
     // ------------------------------------------------------------------------
index a892186bffa1f9d252e5582e9879e8d8cfcde910..b9a41090801781010fc466248773eaa1e46fd479 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -19,6 +19,7 @@ import junit.framework.TestSuite;
  * <b><u>AllTests</u></b>
  * <p>
  */
+@SuppressWarnings("javadoc")
 public class AllTests {
 
     public static Test suite() {
index 910f4f54142684a48973c6c36214c063389e480f..0a2e626df9822bce523143f6c99a013f21dbe4b1 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -95,14 +95,35 @@ public class Activator extends AbstractUIPlugin {
     // Operations
     // ------------------------------------------------------------------------
 
+    /**
+     * Get the image object from a given path
+     *
+     * @param path
+     *            The path to the image file
+     * @return The Image object
+     */
     public Image getImageFromPath(String path) {
         return getImageDescripterFromPath(path).createImage();
     }
 
+    /**
+     * Get the ImageDescriptor from a given path
+     *
+     * @param path
+     *            The path to the image file
+     * @return The ImageDescriptor object
+     */
     public ImageDescriptor getImageDescripterFromPath(String path) {
         return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
     }
 
+    /**
+     * Get the Image from a registry
+     *
+     * @param path
+     *            The path to the image registry
+     * @return The Image object
+     */
     public Image getImageFromImageRegistry(String path) {
         Image icon = getImageRegistry().get(path);
         if (icon == null) {
@@ -111,19 +132,19 @@ public class Activator extends AbstractUIPlugin {
         }
         return icon;
     }
-    
+
     /**
      * Logs a message with severity INFO in the runtime log of the plug-in.
-     * 
+     *
      * @param message A message to log
      */
     public void logInfo(String message) {
         getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
     }
-    
+
     /**
      * Logs a message and exception with severity INFO in the runtime log of the plug-in.
-     * 
+     *
      * @param message A message to log
      * @param exception A exception to log
      */
@@ -133,16 +154,16 @@ public class Activator extends AbstractUIPlugin {
 
     /**
      * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
-     * 
+     *
      * @param message A message to log
      */
     public void logWarning(String message) {
         getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
     }
-    
+
     /**
      * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
-     * 
+     *
      * @param message A message to log
      * @param exception A exception to log
      */
@@ -152,16 +173,16 @@ public class Activator extends AbstractUIPlugin {
 
     /**
      * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
-     * 
+     *
      * @param message A message to log
      */
     public void logError(String message) {
         getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
     }
-    
+
     /**
      * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
-     * 
+     *
      * @param message A message to log
      * @param exception A exception to log
      */
index b4905ea59c7359634ac5959f36a662a62213b0f8..4782fcd9a1ecae071de13e4edaab4ed9eeb0c533 100644 (file)
@@ -2,6 +2,7 @@ package org.eclipse.linuxtools.internal.lttng2.kernel.ui;
 \r
 import org.eclipse.osgi.util.NLS;\r
 \r
+@SuppressWarnings("javadoc")\r
 public class Messages extends NLS {\r
     private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.kernel.ui.messages"; //$NON-NLS-1$\r
 \r
@@ -10,13 +11,13 @@ public class Messages extends NLS {
     public static String ControlFlowView_ptidColumn;\r
     public static String ControlFlowView_processColumn;\r
     public static String ControlFlowView_traceColumn;\r
-    \r
+\r
     public static String ControlFlowView_stateTypeName;\r
     public static String ControlFlowView_nextProcessActionNameText;\r
     public static String ControlFlowView_nextProcessActionToolTipText;\r
     public static String ControlFlowView_previousProcessActionNameText;\r
     public static String ControlFlowView_previousProcessActionToolTipText;\r
-    \r
+\r
     public static String ControlFlowView_attributeSyscallName;\r
 \r
     public static String ResourcesView_stateTypeName;\r
@@ -27,7 +28,7 @@ public class Messages extends NLS {
     public static String ResourcesView_attributeCpuName;\r
     public static String ResourcesView_attributeIrqName;\r
     public static String ResourcesView_attributeSoftIrqName;\r
-    \r
+\r
     static {\r
         // initialize resource bundle\r
         NLS.initializeMessages(BUNDLE_NAME, Messages.class);\r
index 47791c7bc1512430a3957157b381cb9650729018..7a413ad5fb7994929b77f1fd7642159eb686f71c 100644 (file)
@@ -20,6 +20,9 @@ import org.eclipse.linuxtools.tmf.ui.widgets.virtualtable.ColumnData;
 import org.eclipse.swt.SWT;\r
 import org.eclipse.swt.widgets.Composite;\r
 \r
+/**\r
+ * Events table specific for LTTng 2.0 kernel traces\r
+ */\r
 public class LTTng2EventsTable extends TmfEventsTable {\r
 \r
     // ------------------------------------------------------------------------\r
@@ -49,6 +52,14 @@ public class LTTng2EventsTable extends TmfEventsTable {
     // Constructor\r
     // ------------------------------------------------------------------------\r
 \r
+    /**\r
+     * Constructor\r
+     *\r
+     * @param parent\r
+     *            The parent composite\r
+     * @param cacheSize\r
+     *            The size of the rows cache\r
+     */\r
     public LTTng2EventsTable(Composite parent, int cacheSize) {\r
         super(parent, cacheSize, COLUMN_DATA);\r
         fTable.getColumns()[0].setData(Key.FIELD_ID, ITmfEvent.EVENT_FIELD_TIMESTAMP);\r
index 2fa90a001e358f3e2043f89522aebe6e7c010363..9c3c6120edc1beec15c1f0151686512ddd06cdd1 100644 (file)
@@ -2,6 +2,7 @@ package org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events;
 
 import org.eclipse.osgi.util.NLS;
 
+@SuppressWarnings("javadoc")
 public class Messages extends NLS {
        private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events.messages"; //$NON-NLS-1$
        public static String EventsTable_channelColumn;
index 67873e7998fdecea868dbec73d591005267f4a18..186bf6db58d9ed976a2b0d6a09aea85953fb66e5 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************
  * Copyright (c) 2012 Ericsson
- * 
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
@@ -27,7 +27,7 @@ import org.eclipse.ui.IPerspectiveFactory;
  */
 public class PerspectiveFactory implements IPerspectiveFactory {
 
-    // Perspective ID
+    /** Perspective ID */
     public static final String ID = "org.eclipse.linuxtools.lttng2.ui.perspective"; //$NON-NLS-1$
 
     // LTTng views
@@ -45,7 +45,7 @@ public class PerspectiveFactory implements IPerspectiveFactory {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
      */
     @Override
@@ -76,7 +76,7 @@ public class PerspectiveFactory implements IPerspectiveFactory {
 
         // Create the middle right folder
         IFolderLayout middleRightFolder = layout.createFolder(
-                "middleRightFolder", IPageLayout.BOTTOM, 0.40f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$ 
+                "middleRightFolder", IPageLayout.BOTTOM, 0.40f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
         middleRightFolder.addView(EVENTS_VIEW_ID);
 
         // Create the bottom right folder
@@ -89,7 +89,7 @@ public class PerspectiveFactory implements IPerspectiveFactory {
 
     /**
      * Add fast views to the perspective
-     * 
+     *
      * @param layout
      */
     private void addFastViews(IPageLayout layout) {
@@ -97,7 +97,7 @@ public class PerspectiveFactory implements IPerspectiveFactory {
 
     /**
      * Add view shortcuts to the perspective
-     * 
+     *
      * @param layout
      */
     private void addViewShortcuts(IPageLayout layout) {
@@ -105,7 +105,7 @@ public class PerspectiveFactory implements IPerspectiveFactory {
 
     /**
      * Add perspective shortcuts to the perspective
-     * 
+     *
      * @param layout
      */
     private void addPerspectiveShortcuts(IPageLayout layout) {
index 18a8a9e78d448fa4352a11376084ed686bd0cae1..d1acc54c55cb3483b56770af624bd0833f34cde9 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************\r
  * Copyright (c) 2012 Ericsson\r
- * \r
+ *\r
  * All rights reserved. This program and the accompanying materials are\r
  * made available under the terms of the Eclipse Public License v1.0 which\r
  * accompanies this distribution, and is available at\r
  * http://www.eclipse.org/legal/epl-v10.html\r
- * \r
+ *\r
  * Contributors:\r
  *   Patrick Tasse - Initial API and implementation\r
  *******************************************************************************/\r
@@ -19,10 +19,13 @@ import java.util.NoSuchElementException;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;\r
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;\r
 \r
+/**\r
+ * An iterator for time events\r
+ */\r
 public class EventIterator implements Iterator<ITimeEvent> {\r
 \r
-    private long fStartTime;\r
-    private long fEndTime;\r
+    private final long fStartTime;\r
+    private final long fEndTime;\r
     private List<ITimeEvent> fEventList;\r
     private List<ITimeEvent> fZoomedEventList;\r
     private long fZoomedStartTime;\r
@@ -32,11 +35,33 @@ public class EventIterator implements Iterator<ITimeEvent> {
     private ITimeEvent fNext = null;\r
     private ITimeEvent fZoomedNext = null;\r
 \r
+    /**\r
+     * Basic constructor, with start time and end times equal to the lowest and\r
+     * highest values possible, respectively.\r
+     *\r
+     * @param eventList\r
+     *            The list on which this iterator will iterate\r
+     * @param zoomedEventList\r
+     *            The "zoomed" list\r
+     */\r
     public EventIterator(List<ITimeEvent> eventList, List<ITimeEvent> zoomedEventList) {\r
         this(eventList, zoomedEventList, Long.MIN_VALUE, Long.MAX_VALUE);\r
     }\r
 \r
-    public EventIterator(List<ITimeEvent> eventList, List<ITimeEvent> zoomedEventList, long startTime, long endTime) {\r
+    /**\r
+     * Complete constructor, where we specify start and end times.\r
+     *\r
+     * @param eventList\r
+     *            The list on which this iterator will iterate\r
+     * @param zoomedEventList\r
+     *            The "zoomed" list\r
+     * @param startTime\r
+     *            The start time\r
+     * @param endTime\r
+     *            The end time\r
+     */\r
+    public EventIterator(List<ITimeEvent> eventList,\r
+            List<ITimeEvent> zoomedEventList, long startTime, long endTime) {\r
         fEventList = eventList;\r
         fZoomedEventList = zoomedEventList;\r
         if (zoomedEventList != null && zoomedEventList.size() > 0) {\r
index c7401d019da82597207de46b7109069c366eb1cf..0bf076993dff89074d52e99b588f0d8b1d526c1a 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************\r
  * Copyright (c) 2012 Ericsson\r
- * \r
+ *\r
  * All rights reserved. This program and the accompanying materials are\r
  * made available under the terms of the Eclipse Public License v1.0 which\r
  * accompanies this distribution, and is available at\r
  * http://www.eclipse.org/legal/epl-v10.html\r
- * \r
+ *\r
  * Contributors:\r
  *   Patrick Tasse - Initial API and implementation\r
  *******************************************************************************/\r
@@ -21,20 +21,44 @@ import org.eclipse.linuxtools.lttng2.kernel.core.trace.CtfKernelTrace;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;\r
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;\r
 \r
+/**\r
+ * An entry in the Control Flow view\r
+ */\r
 public class ControlFlowEntry implements ITimeGraphEntry {\r
-    private int fThreadQuark;\r
-    private CtfKernelTrace fTrace;\r
+    private final int fThreadQuark;\r
+    private final CtfKernelTrace fTrace;\r
     private ControlFlowEntry fParent = null;\r
-    private ArrayList<ControlFlowEntry> fChildren = new ArrayList<ControlFlowEntry>();\r
-    private String fName;\r
-    private int fThreadId;\r
-    private int fParentThreadId;\r
+    private final ArrayList<ControlFlowEntry> fChildren = new ArrayList<ControlFlowEntry>();\r
+    private final String fName;\r
+    private final int fThreadId;\r
+    private final int fParentThreadId;\r
     private long fBirthTime = -1;\r
     private long fStartTime = -1;\r
     private long fEndTime = -1;\r
     private List<ITimeEvent> fEventList = new ArrayList<ITimeEvent>();\r
     private List<ITimeEvent> fZoomedEventList = null;\r
 \r
+    /**\r
+     * Constructor\r
+     *\r
+     * @param threadQuark\r
+     *            The attribute quark matching the thread\r
+     * @param trace\r
+     *            The trace on which we are working\r
+     * @param execName\r
+     *            The exec_name of this entry\r
+     * @param threadId\r
+     *            The TID of the thread\r
+     * @param parentThreadId\r
+     *            the Parent_TID of this thread\r
+     * @param birthTime\r
+     *            The birth time of this entry (this allows separating different\r
+     *            process that could have the same TID)\r
+     * @param startTime\r
+     *            The start time of this process's lifetime\r
+     * @param endTime\r
+     *            The end time of this process\r
+     */\r
     public ControlFlowEntry(int threadQuark, CtfKernelTrace trace, String execName, int threadId, int parentThreadId, long birthTime, long startTime, long endTime) {\r
         fThreadQuark = threadQuark;\r
         fTrace = trace;\r
@@ -91,26 +115,57 @@ public class ControlFlowEntry implements ITimeGraphEntry {
         return new EventIterator(fEventList, fZoomedEventList, startTime, stopTime);\r
     }\r
 \r
+    /**\r
+     * Get the quark of the attribute matching this thread's TID\r
+     *\r
+     * @return The quark\r
+     */\r
     public int getThreadQuark() {\r
         return fThreadQuark;\r
     }\r
 \r
+    /**\r
+     * Get the CTF trace object\r
+     *\r
+     * @return The trace\r
+     */\r
     public CtfKernelTrace getTrace() {\r
         return fTrace;\r
     }\r
 \r
+    /**\r
+     * Get this entry's thread ID\r
+     *\r
+     * @return The TID\r
+     */\r
     public int getThreadId() {\r
         return fThreadId;\r
     }\r
 \r
+    /**\r
+     * Get this thread's parent TID\r
+     *\r
+     * @return The "PTID"\r
+     */\r
     public int getParentThreadId() {\r
         return fParentThreadId;\r
     }\r
 \r
+    /**\r
+     * Get the birth time of this entry/process\r
+     *\r
+     * @return The birth time\r
+     */\r
     public long getBirthTime() {\r
         return fBirthTime;\r
     }\r
 \r
+    /**\r
+     * Add an event to this process's timeline\r
+     *\r
+     * @param event\r
+     *            The time event\r
+     */\r
     public void addEvent(ITimeEvent event) {\r
         long start = event.getTime();\r
         long end = start + event.getDuration();\r
@@ -125,14 +180,33 @@ public class ControlFlowEntry implements ITimeGraphEntry {
         }\r
     }\r
 \r
+    /**\r
+     * Set the general event list of this entry\r
+     *\r
+     * @param eventList\r
+     *            The list of time events\r
+     */\r
     public void setEventList(List<ITimeEvent> eventList) {\r
         fEventList = eventList;\r
     }\r
 \r
+    /**\r
+     * Set the zoomed event list of this entry\r
+     *\r
+     * @param eventList\r
+     *            The list of time events\r
+     */\r
     public void setZoomedEventList(List<ITimeEvent> eventList) {\r
         fZoomedEventList = eventList;\r
     }\r
 \r
+    /**\r
+     * Add a child entry to this one (to show relationships between processes as\r
+     * a tree)\r
+     *\r
+     * @param child\r
+     *            The child entry\r
+     */\r
     public void addChild(ControlFlowEntry child) {\r
         child.fParent = this;\r
         fChildren.add(child);\r
index f342b46f5679030392e81807c35586971f37ea36..52d6f6784d6cae4ef20c90450506bd70e882806c 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************\r
  * Copyright (c) 2012 Ericsson\r
- * \r
+ *\r
  * All rights reserved. This program and the accompanying materials are\r
  * made available under the terms of the Eclipse Public License v1.0 which\r
  * accompanies this distribution, and is available at\r
  * http://www.eclipse.org/legal/epl-v10.html\r
- * \r
+ *\r
  * Contributors:\r
  *   Patrick Tasse - Initial API and implementation\r
  *******************************************************************************/\r
@@ -15,15 +15,36 @@ package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;\r
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;\r
 \r
+/**\r
+ * Time Event specific to the control flow view\r
+ */\r
 public class ControlFlowEvent extends TimeEvent {\r
 \r
-    private int fStatus;\r
+    private final int fStatus;\r
 \r
-    public ControlFlowEvent(ITimeGraphEntry entry, long time, long duration, int status) {\r
+    /**\r
+     * Constructor\r
+     *\r
+     * @param entry\r
+     *            The entry to which this time event is assigned\r
+     * @param time\r
+     *            The timestamp of this event\r
+     * @param duration\r
+     *            The duration of this event\r
+     * @param status\r
+     *            The status assigned to the event\r
+     */\r
+    public ControlFlowEvent(ITimeGraphEntry entry, long time, long duration,\r
+            int status) {\r
         super(entry, time, duration);\r
         fStatus = status;\r
     }\r
 \r
+    /**\r
+     * Get this event's status\r
+     *\r
+     * @return The integer matching this status\r
+     */\r
     public int getStatus() {\r
         return fStatus;\r
     }\r
index 9ebc6f200ea32f610b9de9af3855af18aaa4c75d..e0f790de41c8fcbcf97c02c58d5e582655d98f77 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************\r
  * Copyright (c) 2012 Ericsson\r
- * \r
+ *\r
  * All rights reserved. This program and the accompanying materials are\r
  * made available under the terms of the Eclipse Public License v1.0 which\r
  * accompanies this distribution, and is available at\r
  * http://www.eclipse.org/legal/epl-v10.html\r
- * \r
+ *\r
  * Contributors:\r
  *   Patrick Tasse - Initial API and implementation\r
  *******************************************************************************/\r
@@ -28,6 +28,9 @@ import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphPresentationProv
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;\r
 import org.eclipse.swt.graphics.RGB;\r
 \r
+/**\r
+ * Presentation provider for the control flow view\r
+ */\r
 public class ControlFlowPresentationProvider extends TimeGraphPresentationProvider {\r
 \r
     private enum State {\r
@@ -44,7 +47,7 @@ public class ControlFlowPresentationProvider extends TimeGraphPresentationProvid
         }\r
     }\r
 \r
-    @Override \r
+    @Override\r
     public String getStateTypeName() {\r
         return Messages.ControlFlowView_stateTypeName;\r
     }\r
@@ -114,7 +117,7 @@ public class ControlFlowPresentationProvider extends TimeGraphPresentationProvid
                 } catch (TimeRangeException e) {\r
                     e.printStackTrace();\r
                 }\r
-            } \r
+            }\r
         }\r
 \r
         return retMap;\r
index e68580b1b344da958d7909ffa95fdc8fdcc02272..8a27bda95cb1e9865914e9540b2198c22f4e1368 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************\r
  * Copyright (c) 2012 Ericsson\r
- * \r
+ *\r
  * All rights reserved. This program and the accompanying materials are\r
  * made available under the terms of the Eclipse Public License v1.0 which\r
  * accompanies this distribution, and is available at\r
  * http://www.eclipse.org/legal/epl-v10.html\r
- * \r
+ *\r
  * Contributors:\r
  *   Patrick Tasse - Initial API and implementation\r
  *******************************************************************************/\r
@@ -67,6 +67,10 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.TreeColumn;\r
 import org.eclipse.ui.IActionBars;\r
 \r
+/**\r
+ * The Control Flow view main object\r
+ *\r
+ */\r
 public class ControlFlowView extends TmfView {\r
 \r
     // ------------------------------------------------------------------------\r
@@ -120,7 +124,7 @@ public class ControlFlowView extends TmfView {
     private long fEndTime;\r
 \r
     // The display width\r
-    private int fDisplayWidth;\r
+    private final int fDisplayWidth;\r
 \r
     // The zoom thread\r
     private ZoomThread fZoomThread;\r
@@ -130,9 +134,9 @@ public class ControlFlowView extends TmfView {
 \r
     // The previous resource action\r
     private Action fPreviousResourceAction;\r
-    \r
+\r
     // A comparator class\r
-    private ControlFlowEntryComparator fControlFlowEntryComparator = new ControlFlowEntryComparator();\r
+    private final ControlFlowEntryComparator fControlFlowEntryComparator = new ControlFlowEntryComparator();\r
 \r
     // ------------------------------------------------------------------------\r
     // Classes\r
@@ -244,12 +248,12 @@ public class ControlFlowView extends TmfView {
         }\r
     }\r
 \r
-    \r
+\r
     private class ZoomThread extends Thread {\r
-        private long fZoomStartTime;\r
-        private long fZoomEndTime;\r
-        private long fResolution;\r
-        private IProgressMonitor fMonitor;\r
+        private final long fZoomStartTime;\r
+        private final long fZoomEndTime;\r
+        private final long fResolution;\r
+        private final IProgressMonitor fMonitor;\r
 \r
         public ZoomThread(long startTime, long endTime) {\r
             super("ControlFlowView zoom"); //$NON-NLS-1$\r
@@ -303,6 +307,9 @@ public class ControlFlowView extends TmfView {
     // Constructors\r
     // ------------------------------------------------------------------------\r
 \r
+    /**\r
+     * Constructor\r
+     */\r
     public ControlFlowView() {\r
         super(ID);\r
         fDisplayWidth = Display.getDefault().getBounds().width;\r
@@ -386,6 +393,12 @@ public class ControlFlowView extends TmfView {
     // Signal handlers\r
     // ------------------------------------------------------------------------\r
 \r
+    /**\r
+     * Handler for the experiment selected signal\r
+     *\r
+     * @param signal\r
+     *            The signal that's received\r
+     */\r
     @TmfSignalHandler\r
     public void experimentSelected(final TmfExperimentSelectedSignal<? extends ITmfEvent> signal) {\r
         if (signal.getExperiment().equals(fSelectedExperiment)) {\r
@@ -401,6 +414,12 @@ public class ControlFlowView extends TmfView {
         thread.start();\r
     }\r
 \r
+    /**\r
+     * Handler for the synch signal\r
+     *\r
+     * @param signal\r
+     *            The signal that's received\r
+     */\r
     @TmfSignalHandler\r
     public void synchToTime(final TmfTimeSynchSignal signal) {\r
         if (signal.getSource() == this || fSelectedExperiment == null) {\r
@@ -442,7 +461,7 @@ public class ControlFlowView extends TmfView {
             }\r
         }\r
         final int selectedThread = thread;\r
\r
+\r
         Display.getDefault().asyncExec(new Runnable() {\r
             @Override\r
             public void run() {\r
@@ -467,6 +486,12 @@ public class ControlFlowView extends TmfView {
         });\r
     }\r
 \r
+    /**\r
+     * Handler for the range sync signal\r
+     *\r
+     * @param signal\r
+     *            The signal that's received\r
+     */\r
     @TmfSignalHandler\r
     public void synchToRange(final TmfRangeSynchSignal signal) {\r
         if (signal.getSource() == this || fSelectedExperiment == null) {\r
@@ -488,6 +513,12 @@ public class ControlFlowView extends TmfView {
         });\r
     }\r
 \r
+    /**\r
+     * Handler for the state system build completed signal\r
+     *\r
+     * @param signal\r
+     *            The signal that's received\r
+     */\r
     @TmfSignalHandler\r
     public void stateSystemBuildCompleted (final TmfStateSystemBuildCompleted signal) {\r
         final TmfExperiment<?> selectedExperiment = fSelectedExperiment;\r
index 4e07d99cfb513854cbdecd364d469cf5382262fe..d2acc99600aca294daee7d8112d3affdc20a0405 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************\r
  * Copyright (c) 2012 Ericsson\r
- * \r
+ *\r
  * All rights reserved. This program and the accompanying materials are\r
  * made available under the terms of the Eclipse Public License v1.0 which\r
  * accompanies this distribution, and is available at\r
  * http://www.eclipse.org/legal/epl-v10.html\r
- * \r
+ *\r
  * Contributors:\r
  *   Patrick Tasse - Initial API and implementation\r
  *******************************************************************************/\r
@@ -21,21 +21,49 @@ import org.eclipse.linuxtools.lttng2.kernel.core.trace.CtfKernelTrace;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;\r
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;\r
 \r
+/**\r
+ * An entry, or row, in the resource view\r
+ *\r
+ * @author Patrick Tasse\r
+ */\r
 public class ResourcesEntry implements ITimeGraphEntry {\r
-    public static enum Type { NULL, CPU, IRQ, SOFT_IRQ };\r
 \r
-    private int fQuark;\r
-    private CtfKernelTrace fTrace;\r
+    /** Type of resource */\r
+    public static enum Type {\r
+        /** Null resources (filler rows, etc.) */\r
+        NULL,\r
+        /** Entries for CPUs */\r
+        CPU,\r
+        /** Entries for IRQs */\r
+        IRQ,\r
+        /** Entries for Soft IRQ */\r
+        SOFT_IRQ }\r
+\r
+    private final int fQuark;\r
+    private final CtfKernelTrace fTrace;\r
     private ITimeGraphEntry fParent = null;\r
-    private ITimeGraphEntry[] children = null;\r
-    private String fName;\r
-    private Type fType;\r
-    private int fId;\r
+    private final ITimeGraphEntry[] children = null;\r
+    private final String fName;\r
+    private final Type fType;\r
+    private final int fId;\r
     private long fStartTime;\r
     private long fEndTime;\r
     private List<ITimeEvent> fEventList = new ArrayList<ITimeEvent>();\r
     private List<ITimeEvent> fZoomedEventList = null;\r
 \r
+    /**\r
+     * Standard constructor\r
+     *\r
+     * @param quark\r
+     *            The quark of the state system attribute whose state is shown\r
+     *            on this row\r
+     * @param trace\r
+     *            The trace that this view is talking about\r
+     * @param type\r
+     *            Type of entry, see the Type enum\r
+     * @param id\r
+     *            The integer id associated with this entry or row\r
+     */\r
     public ResourcesEntry(int quark, CtfKernelTrace trace, Type type, int id) {\r
         fQuark = quark;\r
         fTrace = trace;\r
@@ -89,26 +117,59 @@ public class ResourcesEntry implements ITimeGraphEntry {
         return new EventIterator(fEventList, fZoomedEventList, startTime, stopTime);\r
     }\r
 \r
+    /**\r
+     * Assign a parent entry to this one, to organize them in a tree in the\r
+     * view.\r
+     *\r
+     * @param parent\r
+     *            The parent entry\r
+     */\r
     public void setParent(ITimeGraphEntry parent) {\r
         fParent = parent;\r
     }\r
 \r
+    /**\r
+     * Retrieve the attribute quark that's represented by this entry.\r
+     *\r
+     * @return The integer quark\r
+     */\r
     public int getQuark() {\r
         return fQuark;\r
     }\r
 \r
+    /**\r
+     * Retrieve the trace that is associated to this Resource view.\r
+     *\r
+     * @return The LTTng 2 kernel trace\r
+     */\r
     public CtfKernelTrace getTrace() {\r
         return fTrace;\r
     }\r
 \r
+    /**\r
+     * Get the entry Type of this entry. Uses the inner Type enum.\r
+     *\r
+     * @return The entry type\r
+     */\r
     public Type getType() {\r
         return fType;\r
     }\r
 \r
+    /**\r
+     * Get the integer ID associated with this entry.\r
+     *\r
+     * @return The ID\r
+     */\r
     public int getId() {\r
         return fId;\r
     }\r
 \r
+    /**\r
+     * Assign the target event list to this view.\r
+     *\r
+     * @param eventList\r
+     *            The list of time events\r
+     */\r
     public void setEventList(List<ITimeEvent> eventList) {\r
         fEventList = eventList;\r
         if (eventList != null && eventList.size() > 0) {\r
@@ -118,6 +179,12 @@ public class ResourcesEntry implements ITimeGraphEntry {
         }\r
     }\r
 \r
+    /**\r
+     * Assign the zoomed event list to this view.\r
+     *\r
+     * @param eventList\r
+     *            The list of "zoomed" time events\r
+     */\r
     public void setZoomedEventList(List<ITimeEvent> eventList) {\r
         fZoomedEventList = eventList;\r
     }\r
index a7e65678ad9ea18c66fd9c7b3fdc7eef0959bb3e..a2714f71a3f3f50464ff8f5acac0a7841736cc26 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************\r
  * Copyright (c) 2012 Ericsson\r
- * \r
+ *\r
  * All rights reserved. This program and the accompanying materials are\r
  * made available under the terms of the Eclipse Public License v1.0 which\r
  * accompanies this distribution, and is available at\r
  * http://www.eclipse.org/legal/epl-v10.html\r
- * \r
+ *\r
  * Contributors:\r
  *   Patrick Tasse - Initial API and implementation\r
  *******************************************************************************/\r
@@ -15,26 +15,64 @@ package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesEntry.Type;\r
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;\r
 \r
+/**\r
+ * Time Event implementation specific to the Resource View\r
+ *\r
+ * @author Patrick Tasse\r
+ */\r
 public class ResourcesEvent extends TimeEvent {\r
 \r
-    private Type fType;\r
+    private final Type fType;\r
     private int fValue;\r
 \r
-    public ResourcesEvent(ResourcesEntry entry, long time, long duration, int value) {\r
+    /**\r
+     * Standard constructor\r
+     *\r
+     * @param entry\r
+     *            The entry that this event affects\r
+     * @param time\r
+     *            The start time of the event\r
+     * @param duration\r
+     *            The duration of the event\r
+     * @param value\r
+     *            The value type associated to this event\r
+     */\r
+    public ResourcesEvent(ResourcesEntry entry, long time, long duration,\r
+            int value) {\r
         super(entry, time, duration);\r
         fType = entry.getType();\r
         fValue = value;\r
     }\r
 \r
+    /**\r
+     * Base constructor, with no value assigned\r
+     *\r
+     * @param entry\r
+     *            The entry that this event affects\r
+     * @param time\r
+     *            The start time of the event\r
+     * @param duration\r
+     *            The duration of the event\r
+     */\r
     public ResourcesEvent(ResourcesEntry entry, long time, long duration) {\r
         super(entry, time, duration);\r
         fType = Type.NULL;\r
     }\r
 \r
+    /**\r
+     * Retrieve the value associated with this event\r
+     *\r
+     * @return The integer value\r
+     */\r
     public int getValue() {\r
         return fValue;\r
     }\r
 \r
+    /**\r
+     * Retrieve the type of this entry. Uses the ResourcesEntry.Type interface.\r
+     *\r
+     * @return The entry type\r
+     */\r
     public Type getType() {\r
         return fType;\r
     }\r
index d972a9d3f362c10613f0263b49efd86cc4ec0d3c..d53de1f102934622f5ae38b6292427422558e364 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************\r
  * Copyright (c) 2012 Ericsson\r
- * \r
+ *\r
  * All rights reserved. This program and the accompanying materials are\r
  * made available under the terms of the Eclipse Public License v1.0 which\r
  * accompanies this distribution, and is available at\r
  * http://www.eclipse.org/legal/epl-v10.html\r
- * \r
+ *\r
  * Contributors:\r
  *   Patrick Tasse - Initial API and implementation\r
  *******************************************************************************/\r
@@ -30,6 +30,12 @@ import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphPresentationProv
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;\r
 import org.eclipse.swt.graphics.RGB;\r
 \r
+/**\r
+ * Presentation provider for the Resource view, based on the generic TMF\r
+ * presentation provider.\r
+ *\r
+ * @author Patrick Tasse\r
+ */\r
 public class ResourcesPresentationProvider extends TimeGraphPresentationProvider {\r
 \r
     private enum State {\r
@@ -50,7 +56,7 @@ public class ResourcesPresentationProvider extends TimeGraphPresentationProvider
         }\r
     }\r
 \r
-    @Override \r
+    @Override\r
     public String getStateTypeName() {\r
         return Messages.ResourcesView_stateTypeName;\r
     }\r
@@ -131,7 +137,7 @@ public class ResourcesPresentationProvider extends TimeGraphPresentationProvider
 \r
     @Override\r
     public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event) {\r
-        \r
+\r
         Map<String, String> retMap = new HashMap<String, String>();\r
         if (event instanceof ResourcesEvent) {\r
 \r
@@ -139,14 +145,14 @@ public class ResourcesPresentationProvider extends TimeGraphPresentationProvider
 \r
             // Check for IRQ or Soft_IRQ type\r
             if (resourcesEvent.getType().equals(Type.IRQ) || resourcesEvent.getType().equals(Type.SOFT_IRQ)) {\r
-                \r
+\r
                 // Get CPU of IRQ or SoftIRQ and provide it for the tooltip display\r
                 int cpu = resourcesEvent.getValue();\r
                 if (cpu >= 0) {\r
                     retMap.put(Messages.ResourcesView_attributeCpuName, String.valueOf(cpu));\r
                 }\r
-            } \r
-            \r
+            }\r
+\r
             // Check for type CPU\r
             if (resourcesEvent.getType().equals(Type.CPU)) {\r
                 int status = resourcesEvent.getValue();\r
index 6c596ad7ad572f1a5129909be5f661f92f5ddc81..8645913d4ec8a853a09886d3717df8b0fe178230 100644 (file)
@@ -1,11 +1,11 @@
 /*******************************************************************************\r
  * Copyright (c) 2012 Ericsson\r
- * \r
+ *\r
  * All rights reserved. This program and the accompanying materials are\r
  * made available under the terms of the Eclipse Public License v1.0 which\r
  * accompanies this distribution, and is available at\r
  * http://www.eclipse.org/legal/epl-v10.html\r
- * \r
+ *\r
  * Contributors:\r
  *   Patrick Tasse - Initial API and implementation\r
  *******************************************************************************/\r
@@ -58,20 +58,21 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;\r
 import org.eclipse.ui.IActionBars;\r
 \r
+/**\r
+ * Main implementation for the LTTng 2.0 kernel Resource view\r
+ *\r
+ * @author Patrick Tasse\r
+ */\r
 public class ResourcesView extends TmfView {\r
 \r
     // ------------------------------------------------------------------------\r
     // Constants\r
     // ------------------------------------------------------------------------\r
 \r
-    /**\r
-     * View ID.\r
-     */\r
+    /** View ID. */\r
     public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.ui.views.resources"; //$NON-NLS-1$\r
 \r
-    /**\r
-     * Initial time range\r
-     */\r
+    /** Initial time range */\r
     private static final long INITIAL_WINDOW_OFFSET = (1L * 100  * 1000 * 1000); // .1sec\r
 \r
     // ------------------------------------------------------------------------\r
@@ -97,7 +98,7 @@ public class ResourcesView extends TmfView {
     private long fEndTime;\r
 \r
     // The display width\r
-    private int fDisplayWidth;\r
+    private final int fDisplayWidth;\r
 \r
     // The next resource action\r
     private Action fNextResourceAction;\r
@@ -114,15 +115,15 @@ public class ResourcesView extends TmfView {
 \r
     private class TraceEntry implements ITimeGraphEntry {\r
         // The Trace\r
-        private CtfKernelTrace fTrace;\r
+        private final CtfKernelTrace fTrace;\r
         // The start time\r
-        private long fTraceStartTime;\r
+        private final long fTraceStartTime;\r
         // The end time\r
-        private long fTraceEndTime;        \r
+        private final long fTraceEndTime;\r
         // The children of the entry\r
-        private ArrayList<ResourcesEntry> fChildren;\r
+        private final ArrayList<ResourcesEntry> fChildren;\r
         // The name of entry\r
-        private String fName;\r
+        private final String fName;\r
 \r
         public TraceEntry(CtfKernelTrace trace, String name, long startTime, long endTime) {\r
             fTrace = trace;\r
@@ -197,7 +198,7 @@ public class ResourcesView extends TmfView {
             fChildren.add(index, entry);\r
         }\r
     }\r
-    \r
+\r
     private static class TraceEntryComparator implements Comparator<ITimeGraphEntry> {\r
         @Override\r
         public int compare(ITimeGraphEntry o1, ITimeGraphEntry o2) {\r
@@ -210,9 +211,9 @@ public class ResourcesView extends TmfView {
     }\r
 \r
     private class ZoomThread extends Thread {\r
-        private long fZoomStartTime;\r
-        private long fZoomEndTime;\r
-        private IProgressMonitor fMonitor;\r
+        private final long fZoomStartTime;\r
+        private final long fZoomEndTime;\r
+        private final IProgressMonitor fMonitor;\r
 \r
         public ZoomThread(long startTime, long endTime) {\r
             super("ResourcesView zoom"); //$NON-NLS-1$\r
@@ -241,7 +242,7 @@ public class ResourcesView extends TmfView {
                         entry.setZoomedEventList(null);\r
                     } else {\r
                         List<ITimeEvent> zoomedEventList = getEventList(entry, fZoomStartTime, fZoomEndTime, resolution, true, fMonitor);\r
-                        if (zoomedEventList != null) { \r
+                        if (zoomedEventList != null) {\r
                             entry.setZoomedEventList(zoomedEventList);\r
                         }\r
                     }\r
@@ -259,6 +260,9 @@ public class ResourcesView extends TmfView {
     // Constructors\r
     // ------------------------------------------------------------------------\r
 \r
+    /**\r
+     * Default constructor\r
+     */\r
     public ResourcesView() {\r
         super(ID);\r
         fDisplayWidth = Display.getDefault().getBounds().width;\r
@@ -326,6 +330,12 @@ public class ResourcesView extends TmfView {
     // Signal handlers\r
     // ------------------------------------------------------------------------\r
 \r
+    /**\r
+     * Handler for the ExperimentSelected signal\r
+     *\r
+     * @param signal\r
+     *            The incoming signal\r
+     */\r
     @TmfSignalHandler\r
     public void experimentSelected(final TmfExperimentSelectedSignal<? extends TmfEvent> signal) {\r
         if (signal.getExperiment().equals(fSelectedExperiment)) {\r
@@ -341,6 +351,12 @@ public class ResourcesView extends TmfView {
         thread.start();\r
     }\r
 \r
+    /**\r
+     * Handler for the TimeSynch signal\r
+     *\r
+     * @param signal\r
+     *            The incoming signal\r
+     */\r
     @TmfSignalHandler\r
     public void synchToTime(final TmfTimeSynchSignal signal) {\r
         if (signal.getSource() == this || fSelectedExperiment == null) {\r
@@ -359,6 +375,12 @@ public class ResourcesView extends TmfView {
         });\r
     }\r
 \r
+    /**\r
+     * Handler for the RangeSynch signal\r
+     *\r
+     * @param signal\r
+     *            The incoming signal\r
+     */\r
     @TmfSignalHandler\r
     public void synchToRange(final TmfRangeSynchSignal signal) {\r
         if (signal.getSource() == this || fSelectedExperiment == null) {\r
@@ -380,6 +402,12 @@ public class ResourcesView extends TmfView {
         });\r
     }\r
 \r
+    /**\r
+     * Handler for the StatesystemBuildCompleted signal\r
+     *\r
+     * @param signal\r
+     *            The incoming signal\r
+     */\r
     @TmfSignalHandler\r
     public void stateSystemBuildCompleted (final TmfStateSystemBuildCompleted signal) {\r
         final TmfExperiment<?> selectedExperiment = fSelectedExperiment;\r
This page took 0.043995 seconds and 5 git commands to generate.