/*******************************************************************************
- * 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
* </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 {
/*******************************************************************************
- * 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
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);
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
/*******************************************************************************
- * 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
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 {
// 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);
// 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);
/*******************************************************************************
- * 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
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 {
// Constants
// ------------------------------------------------------------------------
- // Perspective ID
+ /**
+ * The Perspective ID
+ */
public static final String ID = "org.eclipse.linuxtools.tmf.ui.perspective.tracing"; //$NON-NLS-1$
// Standard TMF views
private static final String PROPERTIES_VIEW_ID = IPageLayout.ID_PROP_SHEET;
private static final String BOOKMARKS_VIEW_ID = IPageLayout.ID_BOOKMARKS;
+
// ------------------------------------------------------------------------
// 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$
/*******************************************************************************\r
- * Copyright (c) 2010 Ericsson\r
+ * Copyright (c) 2010, 2012 Ericsson\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
import org.eclipse.swt.widgets.Slider;\r
\r
/**\r
- * <b><u>TmfRawEventViewer</u></b>\r
- * <p>\r
* TmfRawEventViewer allows for the display of the raw data for an arbitrarily\r
* large number of TMF events.\r
* \r
* of visible lines in the StyledText control is set to fill the viewer display area.\r
* An underlying data model is used to store a cache of event raw text line data.\r
* The slider is ratio-based.\r
+ * \r
+ * @version 1.0\r
+ * @author Patrick Tasse\r
*/\r
public class TmfRawEventViewer extends Composite implements ControlListener, SelectionListener,\r
KeyListener, CaretListener, MouseMoveListener, MouseTrackListener, MouseWheelListener {\r
// ------------------------------------------------------------------------\r
\r
/**\r
- * @param parent\r
- * @param style\r
+ * Constructor\r
+ * @param parent The parent composite\r
+ * @param style The style bits\r
*/\r
public TmfRawEventViewer(Composite parent, int style) {\r
super(parent, style & (~SWT.H_SCROLL) & (~SWT.V_SCROLL));\r
fStyledText.setMenu(menu);\r
}\r
\r
+ /**\r
+ * Sets the trace and updates the content\r
+ * @param trace The trace to set\r
+ */\r
public void setTrace(ITmfTrace<?> trace) {\r
fTrace = trace;\r
fTopLineIndex = 0;\r
refreshEventCount();\r
}\r
\r
+ /**\r
+ * Refreshes the event count, updates the slider thumb and loads display\r
+ */\r
public void refreshEventCount() {\r
if (fTrace != null) {\r
if (fTrace.getNbEvents() > 0) {\r
}\r
}\r
\r
+ /**\r
+ * Selects the event of given rank and makes it visible.\r
+ * @param rank The rank of event\r
+ */\r
public void selectAndReveal(long rank) {\r
if (fTrace == null || !isVisible()) {\r
return;\r
refreshLineBackgrounds();\r
}\r
}\r
- \r
+ /**\r
+ * Add a selection listener\r
+ * @param listener A listener to add\r
+ */\r
public void addSelectionListener(Listener listener) {\r
checkWidget();\r
if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);\r
addListener (SWT.Selection, listener);\r
}\r
\r
+ /**\r
+ * Remove selection listener\r
+ * @param listener A listener to remove\r
+ */\r
public void removeSelectionListener(Listener listener) {\r
checkWidget();\r
if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);\r