diff options
Diffstat (limited to 'lttng')
6 files changed, 75 insertions, 26 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfFixedArray.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfFixedArray.java index b55be6dcc1..ef1b7ac2ff 100755 --- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfFixedArray.java +++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfFixedArray.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Ericsson + * Copyright (c) 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 @@ -28,6 +28,9 @@ import java.util.RandomAccess; * </ul></p> * <p>Those functions allow to use the FixedArray as the key of a {@link java.util.HashMap}.</p> * + * @version 1.0 + * @author Francois Godin + * * @param <T> Type of the array content. */ public final class TmfFixedArray<T> extends AbstractList<T> implements RandomAccess, Cloneable { diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfSortedArrayList.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfSortedArrayList.java index fa52bdb531..56a623d287 100644 --- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfSortedArrayList.java +++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/util/TmfSortedArrayList.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Ericsson + * Copyright (c) 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 @@ -15,13 +15,20 @@ package org.eclipse.linuxtools.tmf.core.util; import java.util.ArrayList; /** - * <b><u>TmfSortedArrayList</u></b> - * <p> + * Implementation of a sorted array list. + * + * @version 1.0 + * @Francois Chouinard */ public class TmfSortedArrayList<T> extends ArrayList<T> { private static final long serialVersionUID = 1L; + /** + * Inserts a new value in the list according to its sorted position. + * + * @param value A value to insert + */ @SuppressWarnings("unchecked") public void insertSorted(T value) { add(value); diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java index 217dc217c7..ae9f940aa1 100644 --- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java +++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java @@ -85,8 +85,6 @@ import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider; import org.eclipse.ui.wizards.datatransfer.ImportOperation; /** - * <b><u>ImportTraceWizardPage</u></b> - * <p> * A variant of the standard resource import wizard with the following changes: * <ul> * <li>A folder/file combined checkbox tree viewer to select traces diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/TmfView.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/TmfView.java index 5d51787bc4..c203565a59 100644 --- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/TmfView.java +++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/TmfView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 Ericsson + * 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 @@ -18,9 +18,13 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager; import org.eclipse.ui.part.ViewPart; /** - * <b><u>TmfView</u></b> - * <p> - * TODO: Implement me. Please. + * Basic abstract TMF view class implementation. + * + * It registers any sub class to the signal manager for receiving and sending + * TMF signals. + * + * @version 1.0 + * @author Francois Chouinard */ public abstract class TmfView extends ViewPart implements ITmfComponent { @@ -30,12 +34,21 @@ public abstract class TmfView extends ViewPart implements ITmfComponent { // Constructor // ------------------------------------------------------------------------ + /** + * Constructor. Creates a TMF view and registers to the signal manager. + * + * @param viewName A view name + */ public TmfView(String viewName) { super(); fName = viewName; TmfSignalManager.register(this); } + /** + * Disposes this view and deregisters itself from the signal manager + * @see org.eclipse.ui.part.WorkbenchPart#dispose() + */ @Override public void dispose() { TmfSignalManager.deregister(this); @@ -46,11 +59,19 @@ public abstract class TmfView extends ViewPart implements ITmfComponent { // ITmfComponent // ------------------------------------------------------------------------ + /* + * (non-Javadoc) + * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#getName() + */ @Override public String getName() { return fName; } + /* + * (non-Javadoc) + * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#broadcast(org.eclipse.linuxtools.tmf.core.signal.TmfSignal) + */ @Override public void broadcast(TmfSignal signal) { TmfSignalManager.dispatchSignal(signal); diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/TracingPerspectiveFactory.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/TracingPerspectiveFactory.java index 2a4a18bc11..3190991377 100644 --- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/TracingPerspectiveFactory.java +++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/TracingPerspectiveFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2011 Ericsson + * Copyright (c) 2010, 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 @@ -20,9 +20,11 @@ import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IPerspectiveFactory; /** - * <b><u>TracingPerspectiveFactory</u></b> - * <p> - * TODO: Implement me. Please. + * The tracing perspective definition. + * + * @version 1.0 + * @author Francois Chouinard + * */ public class TracingPerspectiveFactory implements IPerspectiveFactory { @@ -30,7 +32,9 @@ public class TracingPerspectiveFactory implements IPerspectiveFactory { // Constants // ------------------------------------------------------------------------ - // Perspective ID + /** + * The Perspective ID + */ public static final String ID = "org.eclipse.linuxtools.tmf.ui.perspective.tracing"; //$NON-NLS-1$ // Standard TMF views @@ -43,6 +47,7 @@ public class TracingPerspectiveFactory implements IPerspectiveFactory { private static final String PROPERTIES_VIEW_ID = IPageLayout.ID_PROP_SHEET; private static final String BOOKMARKS_VIEW_ID = IPageLayout.ID_BOOKMARKS; + // ------------------------------------------------------------------------ // IPerspectiveFactory // ------------------------------------------------------------------------ @@ -63,11 +68,6 @@ public class TracingPerspectiveFactory implements IPerspectiveFactory { "topLeftFolder", IPageLayout.LEFT, 0.15f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$ topLeftFolder.addView(PROJECT_VIEW_ID); -// // Create the bottom left folder -// @SuppressWarnings("unused") -// IFolderLayout bottomLeftFolder = layout.createFolder( -// "bottomLeftFolder", IPageLayout.BOTTOM, 0.50f, "topLeftFolder"); //$NON-NLS-1$//$NON-NLS-2$ - // Create the top right folder IFolderLayout topRightFolder = layout.createFolder( "topRightFolder", IPageLayout.TOP, 0.40f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$ diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/rawviewer/TmfRawEventViewer.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/rawviewer/TmfRawEventViewer.java index 90b9bbd162..e6ff77486d 100644 --- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/rawviewer/TmfRawEventViewer.java +++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/rawviewer/TmfRawEventViewer.java @@ -1,5 +1,5 @@ /*******************************************************************************
- * Copyright (c) 2010 Ericsson
+ * Copyright (c) 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
@@ -50,8 +50,6 @@ import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.Slider;
/**
- * <b><u>TmfRawEventViewer</u></b>
- * <p>
* TmfRawEventViewer allows for the display of the raw data for an arbitrarily
* large number of TMF events.
*
@@ -59,6 +57,9 @@ import org.eclipse.swt.widgets.Slider; * of visible lines in the StyledText control is set to fill the viewer display area.
* An underlying data model is used to store a cache of event raw text line data.
* The slider is ratio-based.
+ *
+ * @version 1.0
+ * @author Patrick Tasse
*/
public class TmfRawEventViewer extends Composite implements ControlListener, SelectionListener,
KeyListener, CaretListener, MouseMoveListener, MouseTrackListener, MouseWheelListener {
@@ -124,8 +125,9 @@ public class TmfRawEventViewer extends Composite implements ControlListener, Sel // ------------------------------------------------------------------------
/**
- * @param parent
- * @param style
+ * Constructor
+ * @param parent The parent composite
+ * @param style The style bits
*/
public TmfRawEventViewer(Composite parent, int style) {
super(parent, style & (~SWT.H_SCROLL) & (~SWT.V_SCROLL));
@@ -241,6 +243,10 @@ public class TmfRawEventViewer extends Composite implements ControlListener, Sel fStyledText.setMenu(menu);
}
+ /**
+ * Sets the trace and updates the content
+ * @param trace The trace to set
+ */
public void setTrace(ITmfTrace<?> trace) {
fTrace = trace;
fTopLineIndex = 0;
@@ -248,6 +254,9 @@ public class TmfRawEventViewer extends Composite implements ControlListener, Sel refreshEventCount();
}
+ /**
+ * Refreshes the event count, updates the slider thumb and loads display
+ */
public void refreshEventCount() {
if (fTrace != null) {
if (fTrace.getNbEvents() > 0) {
@@ -270,6 +279,10 @@ public class TmfRawEventViewer extends Composite implements ControlListener, Sel }
}
+ /**
+ * Selects the event of given rank and makes it visible.
+ * @param rank The rank of event
+ */
public void selectAndReveal(long rank) {
if (fTrace == null || !isVisible()) {
return;
@@ -293,13 +306,20 @@ public class TmfRawEventViewer extends Composite implements ControlListener, Sel refreshLineBackgrounds();
}
}
-
+ /**
+ * Add a selection listener
+ * @param listener A listener to add
+ */
public void addSelectionListener(Listener listener) {
checkWidget();
if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
addListener (SWT.Selection, listener);
}
+ /**
+ * Remove selection listener
+ * @param listener A listener to remove
+ */
public void removeSelectionListener(Listener listener) {
checkWidget();
if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
|