Fixed JavaDoc in TMF UI plugin
authorBernd Hufmann <bhufmann@gmail.com>
Tue, 12 Jun 2012 02:22:51 +0000 (22:22 -0400)
committerBernd Hufmann <bhufmann@gmail.com>
Tue, 12 Jun 2012 02:23:38 +0000 (22:23 -0400)
54 files changed:
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/ITmfProjectModelElement.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfExperimentElement.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfExperimentFolder.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfNavigatorContentProvider.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfNavigatorLabelProvider.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfProjectElement.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfProjectModelElement.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfProjectRegistry.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfTraceElement.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfTraceFolder.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfTraceType.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TraceFolderContentProvider.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TraceFolderLabelProvider.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/CopyExperimentDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/CopyTraceDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizard.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/Messages.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/NewExperimentDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/NewTmfProjectMainWizardPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/NewTmfProjectWizard.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/RenameExperimentDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/RenameTraceDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/SelectTracesWizard.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/SelectTracesWizardPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/FullTraceHistogram.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/Histogram.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramCurrentTimeControl.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramDataModel.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramRequest.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramScaledData.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramTextControl.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramTimeRangeControl.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramUtils.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramView.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramZoom.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/IHistogramDataModel.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/IHistogramModelListener.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/Messages.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/TimeRangeHistogram.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/ITmfExtraEventInfo.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/Messages.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/TmfStatisticsView.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/model/AbsTmfStatisticsTree.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/model/ITmfColumnDataProvider.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/model/ITmfStatisticsColumnData.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/model/Messages.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/model/TmfBaseColumnData.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/model/TmfBaseColumnDataProvider.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/model/TmfBaseStatisticsTree.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/model/TmfStatistics.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/model/TmfStatisticsTreeNode.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/model/TmfStatisticsTreeRootFactory.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statistics/model/TmfTreeContentProvider.java

index 957f49089cc93b7b05041ea31ac738b84524b873..d8338e5b0a3c93936646b4c1330c799cc8695cb8 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2011 Ericsson
+ * Copyright (c) 2010, 2011, 202 Ericsson
  * 
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -19,31 +19,69 @@ import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.IPath;
 
 /**
- * <b><u>ITmfProjectModelElement</u></b>
- * <p>
- * TODO: Make ITmfProjectModelElement extend IAdaptable
+ * The TMF project model interface.
+ * 
+ * The TMF tracing project is integrated in the Common Navigator framework. 
+ * Each tracing tree element has to implement this interface to be visible in the
+ * Project Explorer. 
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public interface ITmfProjectModelElement {
-
+    
+    /**
+     * Returns the name of the project model element.
+     * @return the name of the project element.
+     */
     public String getName();
-
+    /**
+     * Returns the resource associated with the project model element.
+     * @return the model resource.
+     */
     public IResource getResource();
-    
+    /**
+     * Returns the path of the project model resource.
+     * @return the resource path.
+     */
     public IPath getPath();
-
+    /**
+     * Returns the URI (location) of the resource. 
+     * @return the resource URI.
+     */
     public URI getLocation();
-
+    /**
+     * Returns the project model element.
+     * @return the project model element.
+     */
     public TmfProjectElement getProject();
-
+    /**
+     * Returns the parent of this model element.
+     * @return the parent of this model element.
+     */
     public ITmfProjectModelElement getParent();
-
+    /**
+     * Returns whether this model element has children or not.
+     * @return <code>true</code> if this model has children else <code>false</code>
+     */
     public boolean hasChildren();
-
+    /**
+     * Returns a list of children model elements.
+     * @return a list of children model elements.
+     */
     public List<ITmfProjectModelElement> getChildren();
-
+    /**
+     * Method to add a child to the model element.
+     * @param child A child element to add.
+     */
     public void addChild(ITmfProjectModelElement child);
-
+    /**
+     * Method to remove a child from the model element. 
+     * @param child A child element to remove
+     */
     public void removeChild(ITmfProjectModelElement child);
-
+    /**
+     * Method to request to refresh the project.
+     */
     public void refresh();
 }
index cd26bdca221288b94e5c48fa8834aa4730a7adfd..f57192a6667b4de8db49eaa6e5419f11d3f7d4c0 100644 (file)
@@ -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
@@ -22,8 +22,11 @@ import org.eclipse.ui.views.properties.IPropertySource2;
 import org.eclipse.ui.views.properties.TextPropertyDescriptor;
 
 /**
- * <b><u>TmfExperimentElement</u></b>
+ * Implementation of TMF Experiment Model Element.
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard
+ * 
  */
 public class TmfExperimentElement extends TmfProjectModelElement implements IPropertySource2 {
 
@@ -54,7 +57,12 @@ public class TmfExperimentElement extends TmfProjectModelElement implements IPro
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
-
+    /**
+     * Constructor 
+     * @param name The name of the experiment
+     * @param folder The folder reference
+     * @param parent The experiment folder reference.
+     */
     public TmfExperimentElement(String name, IFolder folder, TmfExperimentFolder parent) {
         super(name, folder, parent);
         parent.addChild(this);
@@ -64,11 +72,19 @@ public class TmfExperimentElement extends TmfProjectModelElement implements IPro
     // TmfProjectModelElement
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#getResource()
+     */
     @Override
     public IFolder getResource() {
         return (IFolder) fResource;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getProject()
+     */
     @Override
     public TmfProjectElement getProject() {
         return (TmfProjectElement) getParent().getParent();
@@ -77,7 +93,10 @@ public class TmfExperimentElement extends TmfProjectModelElement implements IPro
     // ------------------------------------------------------------------------
     // Operations
     // ------------------------------------------------------------------------
-
+    /**
+     * Returns a list of TmfTraceElements contained in this experiment.
+     * @return a list of TmfTraceElements
+     */
     public List<TmfTraceElement> getTraces() {
         List<ITmfProjectModelElement> children = getChildren();
         List<TmfTraceElement> traces = new ArrayList<TmfTraceElement>();
@@ -93,16 +112,28 @@ public class TmfExperimentElement extends TmfProjectModelElement implements IPro
     // IPropertySource2
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
+     */
     @Override
     public Object getEditableValue() {
         return null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
+     */
     @Override
     public IPropertyDescriptor[] getPropertyDescriptors() {
         return (sfDescriptors != null) ? Arrays.copyOf(sfDescriptors, sfDescriptors.length) : null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
+     */
     @Override
     public Object getPropertyValue(Object id) {
 
@@ -117,20 +148,36 @@ public class TmfExperimentElement extends TmfProjectModelElement implements IPro
 
         return null;
     }
-
+    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
+     */
     @Override
     public void resetPropertyValue(Object id) {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
+     */
     @Override
     public void setPropertyValue(Object id, Object value) {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertyResettable(java.lang.Object)
+     */
     @Override
     public boolean isPropertyResettable(Object id) {
         return false;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertySet(java.lang.Object)
+     */
     @Override
     public boolean isPropertySet(Object id) {
         return false;
index 115f4d16b2dc7ab23046ea97189976d525e0140e..52a83b54ff1869450131d9797c62e64a92b486d9 100644 (file)
@@ -20,15 +20,20 @@ import org.eclipse.ui.views.properties.IPropertySource2;
 import org.eclipse.ui.views.properties.TextPropertyDescriptor;
 
 /**
- * <b><u>TmfExperimentFolder</u></b>
+ * Implementation of the model element for the experiment folder.
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard
+ * 
  */
 public class TmfExperimentFolder extends TmfProjectModelElement implements IPropertySource2 {
 
     // ------------------------------------------------------------------------
     // Constants
     // ------------------------------------------------------------------------
-
+    /**
+     * The name of the experiment folder.
+     */
     public static final String EXPER_FOLDER_NAME = "Experiments"; //$NON-NLS-1$
 
     // Property View stuff
@@ -53,6 +58,13 @@ public class TmfExperimentFolder extends TmfProjectModelElement implements IProp
     // Constructors
     // ------------------------------------------------------------------------
 
+    /**
+     * Constructor. 
+     * Creates a TmfExperimentFolder model element.
+     * @param name The name of the folder
+     * @param folder The folder reference
+     * @param parent The parent (project element)
+     */
     public TmfExperimentFolder(String name, IFolder folder, TmfProjectElement parent) {
         super(name, folder, parent);
         parent.addChild(this);
@@ -61,24 +73,62 @@ public class TmfExperimentFolder extends TmfProjectModelElement implements IProp
     // ------------------------------------------------------------------------
     // TmfProjectModelElement
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#getResource()
+     */
     @Override
     public IFolder getResource() {
         return (IFolder) fResource;
     }
-
+    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getProject()
+     */
     @Override
     public TmfProjectElement getProject() {
         return (TmfProjectElement) getParent();
     }
-
+    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#refresh()
+     */
     @Override
     public void refresh() {
         TmfProjectElement project = (TmfProjectElement) getParent();
         project.refresh();
     }
 
-    // ------------------------------------------------------------------------}
-    // IPropertySource2\r    // ------------------------------------------------------------------------\r\r    @Override\r    public Object getEditableValue() {\r        return null;\r    }\r\r    @Override\r    public IPropertyDescriptor[] getPropertyDescriptors() {\r        return (sfDescriptors != null) ? Arrays.copyOf(sfDescriptors, sfDescriptors.length) : null;\r    }\r\r    @Override\r    public Object getPropertyValue(Object id) {\r\r        if (sfName.equals(id))\r            return getName();\r\r        if (sfPath.equals(id))\r            return getPath().toString();\r\r        if (sfLocation.equals(id))\r            return getLocation().toString();\r\r        return null;\r    }\r\r    @Override\r    public void resetPropertyValue(Object id) {\r    }\r\r    @Override\r    public void setPropertyValue(Object id, Object value) {\r    }\r\r    @Override\r    public boolean isPropertyResettable(Object id) {\r        return false;\r    }\r\r    @Override\r    public boolean isPropertySet(Object id) {\r        return false;\r    }
+    // ------------------------------------------------------------------------
+    // IPropertySource2\r    // ------------------------------------------------------------------------\r
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
+     */\r    @Override\r    public Object getEditableValue() {\r        return null;\r    }\r
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
+     */\r    @Override\r    public IPropertyDescriptor[] getPropertyDescriptors() {\r        return (sfDescriptors != null) ? Arrays.copyOf(sfDescriptors, sfDescriptors.length) : null;\r    }\r    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
+     */\r    @Override\r    public Object getPropertyValue(Object id) {\r\r        if (sfName.equals(id))\r            return getName();\r\r        if (sfPath.equals(id))\r            return getPath().toString();\r\r        if (sfLocation.equals(id))\r            return getLocation().toString();\r\r        return null;\r    }\r    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
+     */\r    @Override\r    public void resetPropertyValue(Object id) {\r    }\r
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
+     */\r    @Override\r    public void setPropertyValue(Object id, Object value) {\r    }\r
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertyResettable(java.lang.Object)
+     */\r    @Override\r    public boolean isPropertyResettable(Object id) {\r        return false;\r    }\r
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertySet(java.lang.Object)
+     */\r    @Override\r    public boolean isPropertySet(Object id) {\r        return false;\r    }
 
 }\r\r
\ No newline at end of file
index 8d02c9a6983bc46751b0fd06b0f6cc83b221605e..ebf65691c23ad63884fbc8fe5dec4821f3f266fc 100644 (file)
@@ -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
@@ -31,25 +31,38 @@ import org.eclipse.ui.navigator.PipelinedShapeModification;
 import org.eclipse.ui.navigator.PipelinedViewerUpdate;
 
 /**
- * <b><u>TmfNavigatorContentProvider</u></b>
+ * The TMF project content provider for the tree viewer in the project explorer view. 
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class TmfNavigatorContentProvider implements ICommonContentProvider, IPipelinedTreeContentProvider {
 
     // ------------------------------------------------------------------------
     // ICommonContentProvider
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
+     */
     @Override
     public Object[] getElements(Object inputElement) {
         return null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+     */
     @Override
     public Object getParent(Object element) {
         return null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+     */
     @Override
     public boolean hasChildren(Object element) {
         if (element instanceof IProject) {
@@ -71,22 +84,42 @@ public class TmfNavigatorContentProvider implements ICommonContentProvider, IPip
         return false;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+     */
     @Override
     public void dispose() {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+     */
     @Override
     public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
     }
-
+    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
+     */
     @Override
     public void restoreState(IMemento aMemento) {
     }
-
+    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
+     */
     @Override
     public void saveState(IMemento aMemento) {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.ICommonContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
+     */
     @Override
     public void init(ICommonContentExtensionSite aConfig) {
     }
@@ -94,7 +127,10 @@ public class TmfNavigatorContentProvider implements ICommonContentProvider, IPip
     // ------------------------------------------------------------------------
     // ICommonContentProvider - getChildren()
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+     */
     @Override
     public synchronized Object[] getChildren(Object parentElement) {
 
@@ -121,6 +157,9 @@ public class TmfNavigatorContentProvider implements ICommonContentProvider, IPip
         return new Object[0];
     }
 
+    // ------------------------------------------------------------------------
+    // Helper method
+    // ------------------------------------------------------------------------
     private Object[] getProjectChildren(IProject project) {
         // The children structure
         List<Object> children = new ArrayList<Object>();
@@ -302,12 +341,20 @@ public class TmfNavigatorContentProvider implements ICommonContentProvider, IPip
     // IPipelinedTreeContentProvider
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedChildren(java.lang.Object, java.util.Set)
+     */
     @Override
     @SuppressWarnings({ "rawtypes", "unchecked" })
     public void getPipelinedChildren(Object parent, Set currentChildren) {
         customizeTmfElements(getChildren(parent), currentChildren);
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedElements(java.lang.Object, java.util.Set)
+     */
     @Override
     @SuppressWarnings({ "rawtypes", "unchecked" })
     public void getPipelinedElements(Object input, Set currentElements) {
@@ -340,29 +387,48 @@ public class TmfNavigatorContentProvider implements ICommonContentProvider, IPip
         }
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedParent(java.lang.Object, java.lang.Object)
+     */
     @Override
     public Object getPipelinedParent(Object anObject, Object aSuggestedParent) {
         return aSuggestedParent;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptAdd(org.eclipse.ui.navigator.PipelinedShapeModification)
+     */
     @Override
     public PipelinedShapeModification interceptAdd(PipelinedShapeModification anAddModification) {
         return anAddModification;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptRemove(org.eclipse.ui.navigator.PipelinedShapeModification)
+     */
     @Override
     public PipelinedShapeModification interceptRemove(PipelinedShapeModification aRemoveModification) {
         return null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptRefresh(org.eclipse.ui.navigator.PipelinedViewerUpdate)
+     */
     @Override
     public boolean interceptRefresh(PipelinedViewerUpdate aRefreshSynchronization) {
         return false;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptUpdate(org.eclipse.ui.navigator.PipelinedViewerUpdate)
+     */
     @Override
     public boolean interceptUpdate(PipelinedViewerUpdate anUpdateSynchronization) {
         return false;
     }
-
 }
index 60222c08189143d125529df9351cbeedd7421a32..2782e3dd5189e71219a64b0cea6d43ec46289d4f 100644 (file)
@@ -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
@@ -29,8 +29,10 @@ import org.eclipse.ui.navigator.ICommonLabelProvider;
 import org.osgi.framework.Bundle;
 
 /**
- * <b><u>TmfNavigatorLabelProvider</u></b>
+ * The TMF project label provider for the tree viewer in the project explorer view. 
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class TmfNavigatorLabelProvider implements ICommonLabelProvider {
 
@@ -56,6 +58,11 @@ public class TmfNavigatorLabelProvider implements ICommonLabelProvider {
     // Constructors
     // ------------------------------------------------------------------------
 
+    /**
+     * Constructor. 
+     * 
+     * Creates the TMF navigator content provider.
+     */
     public TmfNavigatorLabelProvider() {
         Bundle bundle = Activator.getDefault().getBundle();
         fDefaultTraceIcon = loadIcon(bundle, fTraceIconFile);
@@ -78,7 +85,10 @@ public class TmfNavigatorLabelProvider implements ICommonLabelProvider {
     // ------------------------------------------------------------------------
     // ICommonLabelProvider
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+     */
     @Override
     public Image getImage(Object element) {
 
@@ -109,6 +119,10 @@ public class TmfNavigatorLabelProvider implements ICommonLabelProvider {
         return null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+     */
     @Override
     public String getText(Object element) {
 
@@ -135,36 +149,68 @@ public class TmfNavigatorLabelProvider implements ICommonLabelProvider {
         return null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
+     */
     @Override
     public void addListener(ILabelProviderListener listener) {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
+     */
     @Override
     public void dispose() {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
+     */
     @Override
     public boolean isLabelProperty(Object element, String property) {
         return false;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
+     */
     @Override
     public void removeListener(ILabelProviderListener listener) {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
+     */
     @Override
     public void restoreState(IMemento aMemento) {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
+     */
     @Override
     public void saveState(IMemento aMemento) {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.IDescriptionProvider#getDescription(java.lang.Object)
+     */
     @Override
     public String getDescription(Object anElement) {
         return getText(anElement);
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.navigator.ICommonLabelProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
+     */
     @Override
     public void init(ICommonContentExtensionSite aConfig) {
     }
index 9d7dfb480a4e6d01c2b9859c4a31bea8c2b33565..652fab786e81e611a47db6854e751f710f0502e1 100644 (file)
@@ -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
@@ -25,8 +25,10 @@ import org.eclipse.ui.navigator.CommonNavigator;
 import org.eclipse.ui.navigator.CommonViewer;
 
 /**
- * <b><u>TmfProjectElement</u></b>
- * <p>
+ * The implementation of TMF project model element. 
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class TmfProjectElement extends TmfProjectModelElement {
 
@@ -34,13 +36,20 @@ public class TmfProjectElement extends TmfProjectModelElement {
     // Attributes
     // ------------------------------------------------------------------------
 
-    TmfTraceFolder fTraceFolder = null;
-    TmfExperimentFolder fExperimentFolder = null;
+    private TmfTraceFolder fTraceFolder = null;
+    private TmfExperimentFolder fExperimentFolder = null;
 
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
-
+    /**
+     * Constructor.
+     * 
+     * Creates the TMF project model element. 
+     * @param name The name of the project.
+     * @param project The project reference.
+     * @param parent The parent element
+     */
     public TmfProjectElement(String name, IProject project, ITmfProjectModelElement parent) {
         super(name, project, parent);
     }
@@ -49,11 +58,19 @@ public class TmfProjectElement extends TmfProjectModelElement {
     // TmfProjectModelElement
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#getResource()
+     */
     @Override
     public IProject getResource() {
         return (IProject) fResource;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#addChild(org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement)
+     */
     @Override
     public void addChild(ITmfProjectModelElement child) {
         super.addChild(child);
@@ -70,11 +87,18 @@ public class TmfProjectElement extends TmfProjectModelElement {
     // ------------------------------------------------------------------------
     // Accessors
     // ------------------------------------------------------------------------
-
+    /**
+     * Returns the containing trace folder element. 
+     * @return the TMF trace folder element.
+     */
     public TmfTraceFolder getTracesFolder() {
         return fTraceFolder;
     }
 
+    /**
+     * Returns the containing experiment folder element.
+     * @return the TMF experiment folder element.
+     */
     public TmfExperimentFolder getExperimentsFolder() {
         return fExperimentFolder;
     }
@@ -83,6 +107,10 @@ public class TmfProjectElement extends TmfProjectModelElement {
     // TmfProjectElement
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#refresh()
+     */
     @Override
     public void refresh() {
         Display.getDefault().asyncExec(new Runnable(){
@@ -104,6 +132,10 @@ public class TmfProjectElement extends TmfProjectModelElement {
             }});
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
+     */
     @Override
     public void resourceChanged(IResourceChangeEvent event) {
         if (event.getType() == IResourceChangeEvent.POST_CHANGE) {
@@ -111,9 +143,12 @@ public class TmfProjectElement extends TmfProjectModelElement {
         }
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getProject()
+     */
     @Override
     public TmfProjectElement getProject() {
         return this;
     }
-
 }
index ab626f95b4f04c57bc8ff24454515b8efb92f056..8d04041f13f3ce41219b3c80a1663504d44a8efd 100644 (file)
@@ -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
@@ -8,6 +8,7 @@
  * 
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
+ *   Bernd Hufmann - Added supplementary files/folder handling
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.ui.project.model;
@@ -29,8 +30,11 @@ import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
 
 /**
- * <b><u>TmfProjectModelElement</u></b>
+ * The implementation of the base TMF project model element. It provides default implementation 
+ * of the <code>ITmfProjectModelElement</code> interface. 
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public abstract class TmfProjectModelElement implements ITmfProjectModelElement, IResourceChangeListener {
 
@@ -39,16 +43,35 @@ public abstract class TmfProjectModelElement implements ITmfProjectModelElement,
     // ------------------------------------------------------------------------
 
     private final String fName;
+    /**
+     * The project model element resource.
+     */
     protected final IResource fResource;
+    /**
+     * The project model resource location (URI)
+     */
     protected final URI fLocation;
+    /**
+     * The project model path of a resource.
+     */
     protected final IPath fPath;
     private final ITmfProjectModelElement fParent;
+    /**
+     * The list of children elements.
+     */
     protected final List<ITmfProjectModelElement> fChildren;
 
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
-
+    /**
+     * Constructor.
+     * 
+     * Creates a base project model element.
+     * @param name The name of the element.
+     * @param resource The element resource.
+     * @param parent The parent model element.
+     */
     protected TmfProjectModelElement(String name, IResource resource, ITmfProjectModelElement parent) {
         fName = name;
         fResource = resource;
@@ -62,53 +85,83 @@ public abstract class TmfProjectModelElement implements ITmfProjectModelElement,
     // ------------------------------------------------------------------------
     // ITmfProjectModelElement
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getName()
+     */
     @Override
     public String getName() {
         return fName;
     }
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getResource()
+     */
     @Override
     public IResource getResource() {
         return fResource;
     }
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getPath()
+     */
     @Override
     public IPath getPath() {
         return fPath;
     }
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getLocation()
+     */
     @Override
     public URI getLocation() {
         return fLocation;
     }
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getParent()
+     */
     @Override
     public ITmfProjectModelElement getParent() {
         return fParent;
     }
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#hasChildren()
+     */
     @Override
     public boolean hasChildren() {
         return fChildren.size() > 0;
     }
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getChildren()
+     */
     @Override
     public List<ITmfProjectModelElement> getChildren() {
         return fChildren;
     }
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#addChild(org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement)
+     */
     @Override
     public void addChild(ITmfProjectModelElement child) {
         fChildren.add(child);
     }
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#removeChild(org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement)
+     */
     @Override
     public void removeChild(ITmfProjectModelElement child) {
         fChildren.remove(child);
         refresh();
     }
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#refresh()
+     */
     @Override
     public void refresh() {
         // Do nothing by default: sub-classes override this on an "as-needed"
@@ -118,7 +171,10 @@ public abstract class TmfProjectModelElement implements ITmfProjectModelElement,
     // ------------------------------------------------------------------------
     // IResourceChangeListener
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
+     */
     @Override
     public void resourceChanged(IResourceChangeEvent event) {
         // Do nothing by default: sub-classes override this on an "as-needed"
@@ -128,7 +184,10 @@ public abstract class TmfProjectModelElement implements ITmfProjectModelElement,
     // ------------------------------------------------------------------------
     // Object
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
     @Override
     public int hashCode() {
         final int prime = 31;
@@ -138,7 +197,10 @@ public abstract class TmfProjectModelElement implements ITmfProjectModelElement,
         result = prime * result + ((fPath == null) ? 0 : fPath.hashCode());
         return result;
     }
-
+    /*
+     * (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
     @Override
     public boolean equals(Object other) {
         if (this == other)
@@ -150,7 +212,6 @@ public abstract class TmfProjectModelElement implements ITmfProjectModelElement,
         TmfProjectModelElement element = (TmfProjectModelElement) other;
         return element.fName.equals(fName) && element.fLocation.equals(fLocation);
     }
-
     
     /**
      * Returns the trace specific supplementary directory under the project's supplementary folder.
index e041bd3844ac7ad3db6ef394cac5d2f37b700b46..a1aebbf02bd84febf5c4c5c7259e360c1aa52319 100644 (file)
@@ -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
@@ -18,8 +18,10 @@ import java.util.Map;
 import org.eclipse.core.resources.IProject;
 
 /**
- * <b><u>TmfProjectRegistry</u></b>
+ * Factory class storing TMF tracing projects and creating TMF project model elements.
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class TmfProjectRegistry {
 
index 70fcbc4be89f6223fc2c4d9beed8412780badb16..e868b74580f607a1d11928ffdb34481e58cd76d3 100644 (file)
@@ -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
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
+ *   Bernd Hufmann - Added supplementary files handling
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.ui.project.model;
@@ -39,8 +40,12 @@ import org.eclipse.ui.views.properties.IPropertySource2;
 import org.eclipse.ui.views.properties.TextPropertyDescriptor;
 
 /**
- * <b><u>TmfTraceElement</u></b>
- * <p>
+ * Implementation of trace model element representing a trace. It provides methods to instantiate
+ * <code>ITmfTrace</code> and <code>ITmfEvent</code> as well as editor ID from the trace type
+ * extension definition.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class TmfTraceElement extends TmfProjectModelElement implements IActionFilter, IPropertySource2 {
 
@@ -49,7 +54,13 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
     // ------------------------------------------------------------------------
 
     // Other attributes
+    /**
+     * Bundle attribute name
+     */
     public static final String BUNDLE = "bundle"; //$NON-NLS-1$
+    /**
+     * IsLinked attribute name.
+     */
     public static final String IS_LINKED = "isLinked"; //$NON-NLS-1$
 
     // Property View stuff
@@ -92,7 +103,9 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
     private static final Map<String, IConfigurationElement> sfTraceTypeAttributes = new HashMap<String, IConfigurationElement>();
     private static final Map<String, IConfigurationElement> sfTraceCategories = new HashMap<String, IConfigurationElement>();
 
-    // Initialize statically at startup
+    /**
+     *  Initialize statically at startup by getting extensions from the platform extension registry.
+     */
     public static void init() {
         IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(TmfTraceType.TMF_TRACE_TYPE_ID);
         for (IConfigurationElement ce : config) {
@@ -110,11 +123,23 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
-
+    /**
+     * Constructor. 
+     * Creates trace model element under the trace folder.
+     * @param name The name of trace
+     * @param trace The trace resource.
+     * @param parent The parent element (trace folder)
+     */
     public TmfTraceElement(String name, IResource trace, TmfTraceFolder parent) {
         this(name, trace, (TmfProjectModelElement) parent);
     }
-
+    /**
+     * Constructor. 
+     * Creates trace model element under the experiment folder.
+     * @param name The name of trace
+     * @param trace The trace resource.
+     * @param parent The parent element (experiment folder)
+     */
     public TmfTraceElement(String name, IResource trace, TmfExperimentElement parent) {
         this(name, trace, (TmfProjectModelElement) parent);
     }
@@ -128,11 +153,18 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
     // ------------------------------------------------------------------------
     // Operations
     // ------------------------------------------------------------------------
-
+    /**
+     * Returns the trace type ID.
+     * @return trace type ID.
+     */
     public String getTraceType() {
         return fTraceTypeId;
     }
 
+    /**
+     * Refreshes the trace type filed by reading the trace type persistent property of the resource 
+     * referenece.
+     */
     public void refreshTraceType() {
         try {
             fTraceTypeId = getResource().getPersistentProperty(TmfCommonConstants.TRACETYPE);
@@ -141,6 +173,11 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
         }
     }
 
+    /**
+     * Instantiate a <code>ITmfTrace</code> object based on the trace type and the corresponding extension. 
+     * 
+     * @return the <code>ITmfTrace</code> or <code>null</code> for an error
+     */
     public ITmfTrace<?> instantiateTrace() {
         try {
 
@@ -172,6 +209,11 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
         return null;
     }
 
+    /**
+     * Instantiate a <code>ITmfEvent</code> object based on the trace type and the corresponding extension. 
+     * 
+     * @return the <code>ITmfEvent</code> or <code>null</code> for an error
+     */
     public ITmfEvent instantiateEvent() {
         try {
             if (fTraceTypeId != null) {
@@ -199,6 +241,10 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
         return null;
     }
 
+    /**
+     * Returns the optional editor ID from the trace type extension.
+     * @return the editor ID or <code>null</code> if not defined.
+     */
     public String getEditorId() {
         if (fTraceTypeId != null) {
             if (fTraceTypeId.startsWith(CustomTxtTrace.class.getCanonicalName())) {
@@ -392,7 +438,10 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
     // ------------------------------------------------------------------------
     // TmfTraceElement
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getProject()
+     */
     @Override
     public TmfProjectElement getProject() {
         if (getParent() instanceof TmfTraceFolder) {
@@ -413,16 +462,28 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
     // IPropertySource2
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
+     */
     @Override
     public Object getEditableValue() {
         return null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
+     */
     @Override
     public IPropertyDescriptor[] getPropertyDescriptors() {
         return (sfDescriptors != null) ? Arrays.copyOf(sfDescriptors, sfDescriptors.length) : null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
+     */
     @Override
     public Object getPropertyValue(Object id) {
 
@@ -463,19 +524,35 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
         return "[no category]"; //$NON-NLS-1$
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
+     */
     @Override
     public void resetPropertyValue(Object id) {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
+     */
     @Override
     public void setPropertyValue(Object id, Object value) {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertyResettable(java.lang.Object)
+     */
     @Override
     public boolean isPropertyResettable(Object id) {
         return false;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertySet(java.lang.Object)
+     */
     @Override
     public boolean isPropertySet(Object id) {
         return false;
index e9154c4213e8c81fa6e33ed920debf99e2937e76..feb18396118d9935fd9b8deb366a5c8851f64634 100644 (file)
@@ -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
@@ -22,15 +22,19 @@ import org.eclipse.ui.views.properties.IPropertySource2;
 import org.eclipse.ui.views.properties.TextPropertyDescriptor;
 
 /**
- * <b><u>TmfTraceFolder</u></b>
+ * Implementation of trace folder model element representing the trace folder in the project.
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class TmfTraceFolder extends TmfProjectModelElement implements IPropertySource2 {
 
     // ------------------------------------------------------------------------
     // Constants
     // ------------------------------------------------------------------------
-
+    /**
+     * The name of the trace folder 
+     */
     public static final String TRACE_FOLDER_NAME = "Traces"; //$NON-NLS-1$
 
     // Property View stuff
@@ -56,7 +60,13 @@ public class TmfTraceFolder extends TmfProjectModelElement implements IPropertyS
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
-
+    /**
+     * Constructor. 
+     * Creates trace folder model element under the project.
+     * @param name The name of trace folder.
+     * @param trace The folder resource.
+     * @param parent The parent element (project).
+     */
     public TmfTraceFolder(String name, IFolder resource, TmfProjectElement parent) {
         super(name, resource, parent);
         parent.addChild(this);
@@ -65,17 +75,29 @@ public class TmfTraceFolder extends TmfProjectModelElement implements IPropertyS
     // ------------------------------------------------------------------------
     // TmfProjectModelElement
     // ------------------------------------------------------------------------
-
+    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#getResource()
+     */
     @Override
     public IFolder getResource() {
         return (IFolder) fResource;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getProject()
+     */
     @Override
     public TmfProjectElement getProject() {
         return (TmfProjectElement) getParent();
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#refresh()
+     */
     @Override
     public void refresh() {
         TmfProjectElement project = (TmfProjectElement) getParent();
@@ -85,7 +107,10 @@ public class TmfTraceFolder extends TmfProjectModelElement implements IPropertyS
     // ------------------------------------------------------------------------
     // Operations
     // ------------------------------------------------------------------------
-
+    /**
+     * Returns a list of trace model elements under the traces folder.
+     * @return list of trace model elements
+     */
     public List<TmfTraceElement> getTraces() {
         List<ITmfProjectModelElement> children = getChildren();
         List<TmfTraceElement> traces = new ArrayList<TmfTraceElement>();
@@ -101,16 +126,28 @@ public class TmfTraceFolder extends TmfProjectModelElement implements IPropertyS
     // IPropertySource2
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
+     */
     @Override
     public Object getEditableValue() {
         return null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
+     */
     @Override
     public IPropertyDescriptor[] getPropertyDescriptors() {
         return (sfDescriptors != null) ? Arrays.copyOf(sfDescriptors, sfDescriptors.length) : null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
+     */
     @Override
     public Object getPropertyValue(Object id) {
 
@@ -126,19 +163,35 @@ public class TmfTraceFolder extends TmfProjectModelElement implements IPropertyS
         return null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
+     */
     @Override
     public void resetPropertyValue(Object id) {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
+     */
     @Override
     public void setPropertyValue(Object id, Object value) {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertyResettable(java.lang.Object)
+     */
     @Override
     public boolean isPropertyResettable(Object id) {
         return false;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertySet(java.lang.Object)
+     */
     @Override
     public boolean isPropertySet(Object id) {
         return false;
index 38f0d78f8a74f8261b4c668e67e6df824fd7729b..667496c23e7d86c4f58f4acc135bcd05a94a5017 100644 (file)
@@ -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
@@ -18,26 +18,71 @@ import java.util.List;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.Platform;
 
+/**
+ * Utility class for accessing TMF trace type extensions from the platform's extensions registry.
+ * 
+ * @version 1.0
+ * @author Patrick Tasse
+ *
+ */
 public class TmfTraceType {
 
-    // Extension point ID
+    /**
+     *  Extension point ID
+     */
     public static final String TMF_TRACE_TYPE_ID = "org.eclipse.linuxtools.tmf.ui.tracetype"; //$NON-NLS-1$
 
-    // Extension point elements
+    /**
+     *  Extension point element 'Category'
+     */
     public static final String CATEGORY_ELEM = "category"; //$NON-NLS-1$
+    /**
+     *  Extension point element 'Type'
+     */
     public static final String TYPE_ELEM = "type"; //$NON-NLS-1$
+    /**
+     * Extension point element 'Default editor' 
+     */
     public static final String DEFAULT_EDITOR_ELEM = "defaultEditor"; //$NON-NLS-1$
+    /**
+     * Extension point element 'Events table type'
+     */
     public static final String EVENTS_TABLE_TYPE_ELEM = "eventsTableType"; //$NON-NLS-1$
 
-    // Extension point attributes
+    /**
+     *  Extension point attribute 'ID'
+     */
     public static final String ID_ATTR = "id"; //$NON-NLS-1$
+    /**
+     * Extension point attribute 'name'
+     */
     public static final String NAME_ATTR = "name"; //$NON-NLS-1$
+    /**
+     * Extension point attribute 'category'
+     */
     public static final String CATEGORY_ATTR = "category"; //$NON-NLS-1$
+    /**
+     * Extension point attribute 'trace_type'
+     */
     public static final String TRACE_TYPE_ATTR = "trace_type"; //$NON-NLS-1$
+    /**
+     * Extension point attribute 'event_type'
+     */
     public static final String EVENT_TYPE_ATTR = "event_type"; //$NON-NLS-1$
+    /**
+     * Extension point attribute 'icon'
+     */
     public static final String ICON_ATTR = "icon"; //$NON-NLS-1$
+    /**
+     * Extension point attribute 'class'
+     */
     public static final String CLASS_ATTR = "class"; //$NON-NLS-1$
 
+    /**
+     * Retrieves the category name from the platform extension registry based on the category ID
+     * @param categoryId The category ID
+     * @return the category name or empty string if not found
+     */
     public static String getCategoryName(String categoryId) {
         IConfigurationElement[] elements = Platform.getExtensionRegistry()
                 .getConfigurationElementsFor(TMF_TRACE_TYPE_ID);
@@ -49,6 +94,12 @@ public class TmfTraceType {
         return ""; //$NON-NLS-1$
     }
 
+    /**
+     * Retrieves all configuration elements from the platform extension registry 
+     * for the trace type extension.
+     * 
+     * @return an array of trace type configuration elements 
+     */
     public static IConfigurationElement[] getTypeElements() {
         IConfigurationElement[] elements = Platform.getExtensionRegistry()
                 .getConfigurationElementsFor(TMF_TRACE_TYPE_ID);
index 962f629ba851eb2675dd79c7eb02bc69ae3ca060..4dfe63b2c16417f8a8fd9c081033a96b56d05eb8 100644 (file)
@@ -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
@@ -19,12 +19,19 @@ import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.Viewer;
 
 /**
- * <b><u>TraceFolderContentProvider</u></b>
+ * Content provider implementation for trace folders for tree viewers that display
+ * the content of a trace folder.
  * <p>
- * TODO: Implement me. Please.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard 
  */
 public class TraceFolderContentProvider implements IStructuredContentProvider {
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+     */
     @Override
     public Object[] getElements(Object inputElement) {
         if (inputElement instanceof TmfTraceFolder) {
@@ -43,10 +50,18 @@ public class TraceFolderContentProvider implements IStructuredContentProvider {
         return null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+     */
     @Override
     public void dispose() {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+     */
     @Override
     public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
     }
index 7361fd729e558e7261bf42edbf15e2cce78de430..04ca2aeffd7f3d97944efcaf19f0a7e473d56e92 100644 (file)
@@ -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
@@ -17,16 +17,28 @@ import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.swt.graphics.Image;
 
 /**
- * <b><u>TraceFolderLabelProvider</u></b>
+ * Label provider implementation for trace folders for tree viewers that display
+ * the content of a trace folder.
  * <p>
+ * 
+ * @version 1.0
+ * @author Francois Chouinard 
  */
 public class TraceFolderLabelProvider extends LabelProvider implements ITableLabelProvider {
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+     */
     @Override
     public Image getColumnImage(Object element, int columnIndex) {
         return null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+     */
     @Override
     public String getColumnText(Object element, int columnIndex) {
         if (element instanceof TmfTraceElement) {
index 4db3bf2cb58a6abd96726b9258d941434c380a3d..1dd6aee84af5e1884455c37ad3b0b84c7c2371f0 100644 (file)
@@ -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
@@ -49,8 +49,10 @@ import org.eclipse.ui.actions.WorkspaceModifyOperation;
 import org.eclipse.ui.dialogs.SelectionStatusDialog;
 
 /**
- * <b><u>CopyExperimentDialog</u></b>
+ * Implementation of the copy experiement dialog box.
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class CopyExperimentDialog extends SelectionStatusDialog {
 
@@ -67,6 +69,11 @@ public class CopyExperimentDialog extends SelectionStatusDialog {
     // Constructor
     // ------------------------------------------------------------------------
 
+    /**
+     * Constructor
+     * @param shell The parent shell
+     * @param experiment The TMF experiment model element
+     */
     public CopyExperimentDialog(Shell shell, TmfExperimentElement experiment) {
         super(shell);
         fExperiment = experiment;
@@ -80,7 +87,11 @@ public class CopyExperimentDialog extends SelectionStatusDialog {
     // ------------------------------------------------------------------------
     // Dialog
     // ------------------------------------------------------------------------
-
+    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+     */
     @Override
     protected Control createDialogArea(Composite parent) {
         Composite composite = (Composite) super.createDialogArea(parent);
@@ -160,17 +171,28 @@ public class CopyExperimentDialog extends SelectionStatusDialog {
     // ------------------------------------------------------------------------
     // SelectionStatusDialog
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
+     */
     @Override
     protected void computeResult() {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#create()
+     */
     @Override
     public void create() {
         super.create();
         getButton(IDialogConstants.OK_ID).setEnabled(false);
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#okPressed()
+     */
     @Override
     protected void okPressed() {
         IFolder folder = copyExperiment(fNewExperimentName.getText());
index 133c788b4f5c0e576b4649ac6cc894b6513bcd13..2c92cd74402c98c6f714bbfe8ccc0e9541c4f21f 100644 (file)
@@ -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
@@ -49,8 +49,10 @@ import org.eclipse.ui.actions.WorkspaceModifyOperation;
 import org.eclipse.ui.dialogs.SelectionStatusDialog;
 
 /**
- * <b><u>CopyExperimentDialog</u></b>
+ * Implementation of the copy trace dialog box.
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class CopyTraceDialog extends SelectionStatusDialog {
 
@@ -66,7 +68,11 @@ public class CopyTraceDialog extends SelectionStatusDialog {
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
-
+    /**
+     * Constructor.
+     * @param shell The parent shell
+     * @param trace The trace model element.
+     */
     public CopyTraceDialog(Shell shell, TmfTraceElement trace) {
         super(shell);
         fTrace = trace;
@@ -80,7 +86,10 @@ public class CopyTraceDialog extends SelectionStatusDialog {
     // ------------------------------------------------------------------------
     // Dialog
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+     */
     @Override
     protected Control createDialogArea(Composite parent) {
         Composite composite = (Composite) super.createDialogArea(parent);
@@ -163,16 +172,28 @@ public class CopyTraceDialog extends SelectionStatusDialog {
     // SelectionStatusDialog
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
+     */
     @Override
     protected void computeResult() {
     }
-
+    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#create()
+     */
     @Override
     public void create() {
         super.create();
         getButton(IDialogConstants.OK_ID).setEnabled(false);
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#okPressed()
+     */
     @Override
     protected void okPressed() {
         IResource trace = copyTrace(fNewTraceName.getText());
index f8624d5745d1b3a65ee687dfe8d823631393fb74..f3416fe40723b51efc037d839383db257c0d7cb5 100644 (file)
@@ -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
@@ -24,8 +24,10 @@ import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.ide.IDE;
 
 /**
- * <b><u>ImportTraceWizard</u></b>
+ * The import trace wizard implementation.
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class ImportTraceWizard extends Wizard implements IImportWizard {
 
@@ -48,7 +50,9 @@ public class ImportTraceWizard extends Wizard implements IImportWizard {
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
-
+    /**
+     * Default constructor
+     */
     public ImportTraceWizard() {
         IDialogSettings workbenchSettings = Activator.getDefault().getDialogSettings();
         IDialogSettings section = workbenchSettings.getSection(IMPORT_WIZARD);
@@ -62,6 +66,10 @@ public class ImportTraceWizard extends Wizard implements IImportWizard {
     // Wizard
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+     */
     @Override
     public void init(IWorkbench workbench, IStructuredSelection selection) {
         fWorkbench = workbench;
@@ -77,13 +85,21 @@ public class ImportTraceWizard extends Wizard implements IImportWizard {
         setNeedsProgressMonitor(true);
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.wizard.Wizard#addPages()
+     */
     @Override
     public void addPages() {
         super.addPages();
         fTraceImportWizardPage = new ImportTraceWizardPage(fWorkbench, fSelection);
         addPage(fTraceImportWizardPage);
     }
-
+    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+     */
     @Override
     public boolean performFinish() {
         return fTraceImportWizardPage.finish();
index 1b141c60f060c88c142e92206beddb9ab652d1b7..217dc217c7611003a55e4c78d0a50a36cf2159d9 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2010, 2011 Ericsson
+ * Copyright (c) 2009, 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
@@ -96,7 +96,9 @@ import org.eclipse.ui.wizards.datatransfer.ImportOperation;
  * For our purpose, a trace can either be a single file or a whole directory sub-tree, whichever is reached first from
  * the root directory.
  * <p>
- * TODO: Consider adding Filter/Select/Deselect buttons
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class ImportTraceWizardPage extends WizardResourceImportPage implements Listener {
 
@@ -129,10 +131,22 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
     // Constructors
     // ------------------------------------------------------------------------
 
+    /**
+     * Constructor.
+     * Creates the trace wizard page.
+     * 
+     * @param name The name of the page.
+     * @param selection The current selection
+     */
     protected ImportTraceWizardPage(String name, IStructuredSelection selection) {
         super(name, selection);
     }
 
+    /**
+     * Constructor
+     * @param workbench The workbench reference.
+     * @param selection The current selection
+     */
     public ImportTraceWizardPage(IWorkbench workbench, IStructuredSelection selection) {
         this(IMPORT_WIZARD_PAGE, selection);
         setTitle(Messages.ImportTraceWizard_FileSystemTitle);
@@ -167,7 +181,10 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
     // ------------------------------------------------------------------------
     // WizardResourceImportPage
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.WizardResourceImportPage#createControl(org.eclipse.swt.widgets.Composite)
+     */
     @Override
     public void createControl(Composite parent) {
         super.createControl(parent);
@@ -178,6 +195,10 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
         }
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.WizardResourceImportPage#createSourceGroup(org.eclipse.swt.widgets.Composite)
+     */
     @Override
     protected void createSourceGroup(Composite parent) {
         createDirectorySelectionGroup(parent);
@@ -186,6 +207,10 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
         validateSourceGroup();
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.WizardResourceImportPage#createFileSelectionGroup(org.eclipse.swt.widgets.Composite)
+     */
     @Override
     protected void createFileSelectionGroup(Composite parent) {
 
@@ -229,11 +254,19 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
         });
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.WizardResourceImportPage#getFolderProvider()
+     */
     @Override
     protected ITreeContentProvider getFolderProvider() {
         return null;
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.WizardResourceImportPage#getFileProvider()
+     */
     @Override
     protected ITreeContentProvider getFileProvider() {
         return new WorkbenchContentProvider() {
@@ -276,7 +309,11 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
             }
         }
     }
-
+    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.WizardResourceImportPage#getSelectedResources()
+     */
     @Override
     protected List<FileSystemElement> getSelectedResources() {
         List<FileSystemElement> resources = new ArrayList<FileSystemElement>();
@@ -293,10 +330,20 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
     // Directory Selection Group (forked WizardFileSystemResourceImportPage1)
     // ------------------------------------------------------------------------
 
+    /**
+     * The directory name field
+     */
     protected Combo directoryNameField;
+    /**
+     * The directory browse button.
+     */
     protected Button directoryBrowseButton;
     private boolean entryChanged = false;
 
+    /**
+     * creates the directory selection group.
+     * @param parent the parent composite
+     */
     protected void createDirectorySelectionGroup(Composite parent) {
 
         Composite directoryContainerGroup = new Composite(parent, SWT.NONE);
@@ -370,6 +417,10 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
     // Browse for the source directory
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.WizardResourceImportPage#handleEvent(org.eclipse.swt.widgets.Event)
+     */
     @Override
     public void handleEvent(Event event) {
         if (event.widget == directoryBrowseButton) {
@@ -378,6 +429,9 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
         super.handleEvent(event);
     }
 
+    /**
+     * Handle the button pressed event
+     */
     protected void handleSourceDirectoryBrowseButtonPressed() {
         String currentSource = directoryNameField.getText();
         DirectoryDialog dialog = new DirectoryDialog(directoryNameField.getShell(), SWT.SAVE | SWT.SHEET);
@@ -603,6 +657,10 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
     private Button overwriteExistingResourcesCheckbox;
     private Button createLinksInWorkspaceButton;
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.WizardDataTransferPage#createOptionsGroupButtons(org.eclipse.swt.widgets.Group)
+     */
     @Override
     protected void createOptionsGroupButtons(Group optionsGroup) {
 
@@ -632,6 +690,10 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
     // Determine if the finish button can be enabled
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.WizardDataTransferPage#validateSourceGroup()
+     */
     @Override
     public boolean validateSourceGroup() {
 
@@ -733,6 +795,10 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
     // Import the trace(s)
     // ------------------------------------------------------------------------
 
+    /**
+     * Finish the import.
+     * @return <code>true</code> if successful else false
+     */
     public boolean finish() {
         // Ensure source is valid
         File sourceDir = new File(getSourceDirectoryName());
index 215bc8b35864a2d645f75e444223d5c2ef1e98b5..a0cae2cf039f23b5a86521a120a2966b124a85ab 100644 (file)
@@ -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
@@ -14,13 +14,18 @@ package org.eclipse.linuxtools.tmf.ui.project.wizards;
 
 import org.eclipse.osgi.util.NLS;
 
+/**
+ * Message string for TMF model handling.
+ * @version 1.0
+ * @author Francois Chouinard
+ *
+ */
 public class Messages extends NLS {
 
     private static final String BUNDLE_NAME = "org.eclipse.linuxtools.tmf.ui.project.wizards.messages"; //$NON-NLS-1$
 
     public static String NewProjectWizard_DialogHeader;
     public static String NewProjectWizard_DialogMessage;
-    
     public static String ImportTraceWizard_DialogTitle;
     public static String ImportTraceWizard_FileSystemTitle;
     public static String ImportTraceWizard_ImportTrace;
index 6d1819e1399bfdff755652b5ae233522554c041e..f75132796b96a3d79e13d92f95138ea828bbe9cd 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2011 Ericsson
+ * 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
@@ -48,8 +48,11 @@ import org.eclipse.ui.actions.WorkspaceModifyOperation;
 import org.eclipse.ui.dialogs.SelectionStatusDialog;
 
 /**
- * <b><u>NewExperimentHandler</u></b>
+ * Implementation of new experiment dialog that creates the experiment element.
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard
+
  */
 public class NewExperimentDialog extends SelectionStatusDialog {
 
@@ -64,7 +67,11 @@ public class NewExperimentDialog extends SelectionStatusDialog {
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
-
+    /**
+     * Constructor
+     * @param shell The parent shell
+     * @param experimentFolder The parent experiment folder element
+     */
     public NewExperimentDialog(Shell shell, TmfExperimentFolder experimentFolder) {
         super(shell);
         fExperimentFolder = experimentFolder.getResource();
@@ -76,7 +83,10 @@ public class NewExperimentDialog extends SelectionStatusDialog {
     // ------------------------------------------------------------------------
     // Dialog
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+     */
     @Override
     protected Control createDialogArea(Composite parent) {
         Composite composite = (Composite) super.createDialogArea(parent);
@@ -142,17 +152,28 @@ public class NewExperimentDialog extends SelectionStatusDialog {
     // ------------------------------------------------------------------------
     // SelectionStatusDialog
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
+     */
     @Override
     protected void computeResult() {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#create()
+     */
     @Override
     public void create() {
         super.create();
         getButton(IDialogConstants.OK_ID).setEnabled(false);
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#okPressed()
+     */
     @Override
     protected void okPressed() {
         IFolder folder = createNewExperiment(fExperimentName.getText());
index 6e71cf8db19cc8a4b19c96e4b82efc6f4c5b096e..e266865da457306e4f665b29742473b5baa1ddf6 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Ericsson
+ * 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
@@ -15,10 +15,11 @@ package org.eclipse.linuxtools.tmf.ui.project.wizards;
 import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
 
 /**
- * <b><u>NewProjectMainWizardPage</u></b>
+ * The wizard page for creation of a new TMF tracing project.
  * <p>
- *
- * TODO: Implement me. Please.
+ * @version 1.0
+ * @author Francois Chouinard
+
  */
 public class NewTmfProjectMainWizardPage extends WizardNewProjectCreationPage {
 
index 4a46cb3cbc862fd2bbb156bb9ffe3532ae7f8c4f..f4eefa0d5cba514cc5de24ce6a2348e1c3a9c948 100644 (file)
@@ -37,31 +37,49 @@ import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
 
 /**
- * <b><u>NewTmfProjectWizard</u></b>
+ * Wizard implementation for creating a TMF tracing project.
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class NewTmfProjectWizard extends Wizard implements INewWizard, IExecutableExtension {
 
     private final String fTtitle;
     private final String fDescription;
 
+    /**
+     * Wizard main page
+     */
     protected NewTmfProjectMainWizardPage fMainPage;
+    /**
+     * The Project name
+     */
     protected String fProjectName;
+    /**
+     * The project location
+     */
     protected URI fProjectLocation;
+    /**
+     * The configuration element.
+     */
     protected IConfigurationElement fConfigElement;
 
+    /**
+     * The project reference
+     */
     protected IProject fProject;
 
     /**
-     * 
+     * Default constructor
      */
     public NewTmfProjectWizard() {
         this(Messages.NewProjectWizard_DialogHeader, Messages.NewProjectWizard_DialogMessage);
     }
 
     /**
-     * @param title
-     * @param desc
+     * Constructor
+     * @param title The tile string
+     * @param desc The description string
      */
     public NewTmfProjectWizard(String title, String desc) {
         super();
@@ -110,12 +128,6 @@ public class NewTmfProjectWizard extends Wizard implements INewWizard, IExecutab
         return true;
     }
 
-    /**
-     * @param projectName
-     * @param projectLocation
-     * @param monitor
-     * @return
-     */
     private IProject createProject(String projectName, URI projectLocation, IProgressMonitor monitor) {
 
         IWorkspace workspace = ResourcesPlugin.getWorkspace();
@@ -173,6 +185,10 @@ public class NewTmfProjectWizard extends Wizard implements INewWizard, IExecutab
     // IExecutableExtension
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+     */
     @Override
     public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
         fConfigElement = config;
index ff639aa7aa9d6399d08e074bd581c87733739c2b..64cdeff85a6c7c2fb7927011b9e85b3b6942d023 100644 (file)
@@ -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
@@ -49,8 +49,10 @@ import org.eclipse.ui.actions.WorkspaceModifyOperation;
 import org.eclipse.ui.dialogs.SelectionStatusDialog;
 
 /**
- * <b><u>RenameExperimentDialog</u></b>
- * <p>
+ * Implementation of a dialog box to rename an experiment.
+ * <p> 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class RenameExperimentDialog extends SelectionStatusDialog {
 
@@ -67,6 +69,11 @@ public class RenameExperimentDialog extends SelectionStatusDialog {
     // Constructor
     // ------------------------------------------------------------------------
 
+    /**
+     * Constructor
+     * @param shell The parent shell
+     * @param experiment The experiment element rename
+     */
     public RenameExperimentDialog(Shell shell, TmfExperimentElement experiment) {
         super(shell);
         fExperiment = experiment;
@@ -80,7 +87,10 @@ public class RenameExperimentDialog extends SelectionStatusDialog {
     // ------------------------------------------------------------------------
     // Dialog
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+     */
     @Override
     protected Control createDialogArea(Composite parent) {
         Composite composite = (Composite) super.createDialogArea(parent);
@@ -160,17 +170,28 @@ public class RenameExperimentDialog extends SelectionStatusDialog {
     // ------------------------------------------------------------------------
     // SelectionStatusDialog
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
+     */
     @Override
     protected void computeResult() {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#create()
+     */
     @Override
     public void create() {
         super.create();
         getButton(IDialogConstants.OK_ID).setEnabled(false);
     }
-
+    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#okPressed()
+     */
     @Override
     protected void okPressed() {
         IFolder folder = renameExperiment(fNewExperimentName.getText());
index fae0aea1ec5cf3a056e0b7fcdd88c19e8d5fc7af..9b81c19de50cba97c3b609f511a54dd3e340ff57 100644 (file)
@@ -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
@@ -49,8 +49,10 @@ import org.eclipse.ui.actions.WorkspaceModifyOperation;
 import org.eclipse.ui.dialogs.SelectionStatusDialog;
 
 /**
- * <b><u>RenameTraceDialog</u></b>
- * <p>
+ * Implementation of a dialog box to rename a trace.
+ * <p> 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class RenameTraceDialog extends SelectionStatusDialog {
 
@@ -67,7 +69,11 @@ public class RenameTraceDialog extends SelectionStatusDialog {
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
-
+    /**
+     * Constructor
+     * @param shell The parent shell
+     * @param trace The trace element to rename
+     */
     public RenameTraceDialog(Shell shell, TmfTraceElement trace) {
         super(shell);
         fTrace = trace;
@@ -81,7 +87,10 @@ public class RenameTraceDialog extends SelectionStatusDialog {
     // ------------------------------------------------------------------------
     // Dialog
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+     */
     @Override
     protected Control createDialogArea(Composite parent) {
         Composite composite = (Composite) super.createDialogArea(parent);
@@ -133,6 +142,10 @@ public class RenameTraceDialog extends SelectionStatusDialog {
         });
     }
 
+    /**
+     * Returns the new trace name
+     * @return the new trace name
+     */
     public String getNewTraceName() {
         return fNewTraceName;
     }
@@ -167,17 +180,26 @@ public class RenameTraceDialog extends SelectionStatusDialog {
     // ------------------------------------------------------------------------
     // SelectionStatusDialog
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
+     */
     @Override
     protected void computeResult() {
     }
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#create()
+     */
     @Override
     public void create() {
         super.create();
         getButton(IDialogConstants.OK_ID).setEnabled(false);
     }
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#okPressed()
+     */
     @Override
     protected void okPressed() {
         IResource trace = renameTrace(fNewTraceNameText.getText());
index 2fbf3a8c957edcb4d880add447ea99bf8e9990d9..65b6942c054a99afa453ae021592b5da97a620db 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2010, 2011 Ericsson
+ * Copyright (c) 2009, 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,8 +20,10 @@ import org.eclipse.ui.IImportWizard;
 import org.eclipse.ui.IWorkbench;
 
 /**
- * <b><u>SelectTracesWizard</u></b>
+ * Wizard implementation to select traces for an experiment. 
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard 
  */
 public class SelectTracesWizard extends Wizard implements IImportWizard {
 
@@ -36,7 +38,11 @@ public class SelectTracesWizard extends Wizard implements IImportWizard {
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
-
+    /**
+     * Constructor
+     * @param project The project model element
+     * @param experiment The experiemnt model element
+     */
     public SelectTracesWizard(TmfProjectElement project, TmfExperimentElement experiment) {
         fProject = project;
         fExperiment = experiment;
@@ -46,11 +52,19 @@ public class SelectTracesWizard extends Wizard implements IImportWizard {
     // Wizard
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+     */
     @Override
     public void init(IWorkbench workbench, IStructuredSelection selection) {
         setWindowTitle(Messages.SelectTracesWizard_WindowTitle);
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.wizard.Wizard#addPages()
+     */
     @Override
     public void addPages() {
         super.addPages();
@@ -58,6 +72,10 @@ public class SelectTracesWizard extends Wizard implements IImportWizard {
         addPage(fSelectTraceWizardPage);
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+     */
     @Override
     public boolean performFinish() {
         return fSelectTraceWizardPage.performFinish();
index 92415c4542c445753ea6e34178786c219dfc59ca..4e70547fc1c4a1128c69bd277fc651828041387e 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2010, 2011 Ericsson
+ * Copyright (c) 2009, 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
@@ -45,8 +45,11 @@ import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableColumn;
 
 /**
- * <b><u>SelectTracesWizardPage</u></b>
+ * Implementation of a wizard page for selecting trace for an experiment.
  * <p>
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class SelectTracesWizardPage extends WizardPage {
 
@@ -62,7 +65,11 @@ public class SelectTracesWizardPage extends WizardPage {
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
-
+    /**
+     * Constructor
+     * @param project The project model element.
+     * @param experiment The experiment model experiment.
+     */
     protected SelectTracesWizardPage(TmfProjectElement project, TmfExperimentElement experiment) {
         super(""); //$NON-NLS-1$
         setTitle(Messages.SelectTracesWizardPage_WindowTitle);
@@ -74,7 +81,10 @@ public class SelectTracesWizardPage extends WizardPage {
     // ------------------------------------------------------------------------
     // Dialog
     // ------------------------------------------------------------------------
-
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+     */
     @Override
     public void createControl(Composite parent) {
         Composite container = new Composite(parent, SWT.NULL);
@@ -127,6 +137,10 @@ public class SelectTracesWizardPage extends WizardPage {
         }
     }
 
+    /**
+     * Method to finalize the select operation.
+     * @return <code>true</code> if successful else <code>false</code>
+     */
     public boolean performFinish() {
 
         IFolder experiment = fExperiment.getResource();
index f95d39d4565f5451be1845c0b5378496b4cde834..f5328486bc390229b8e0f1d31d7f11434d6a338f 100644 (file)
@@ -9,7 +9,6 @@
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *   Bernd Hufmann - Changed to updated histogram data model
- *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.ui.views.histogram;
@@ -25,11 +24,12 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
 
 /**
- * <b><u>FullTraceHistogram</u></b>
- * <p>
  * A histogram that displays the full trace.
  * <p>
  * It also features a selected range window that can be dragged and zoomed.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class FullTraceHistogram extends Histogram implements MouseMoveListener {
 
@@ -53,6 +53,12 @@ public class FullTraceHistogram extends Histogram implements MouseMoveListener {
     // Construction
     // ------------------------------------------------------------------------
 
+    /**
+     * Standard Constructor.
+     * 
+     * @param view A reference to the parent histogram view 
+     * @param parent A reference to the parent composite
+     */
     public FullTraceHistogram(HistogramView view, Composite parent) {
         super(view, parent);
         fZoom = new HistogramZoom(this, fCanvas, getStartTime(), getTimeLimit());
@@ -69,10 +75,22 @@ public class FullTraceHistogram extends Histogram implements MouseMoveListener {
     // Operations
     // ------------------------------------------------------------------------
 
+    /**
+     * Sets the time range of the full histogram.  
+     * 
+     * @param startTime A start time
+     * @param endTime A end time
+     */
     public void setFullRange(long startTime, long endTime) {
         fZoom.setFullRange(startTime, endTime);
     }
 
+    /**
+     * Sets the selected time range.
+     * 
+     * @param startTime A start time
+     * @param duration A window duration
+     */
     public void setTimeRange(long startTime, long duration) {
         fRangeStartTime = startTime;
         fRangeDuration = duration;
index fd53cdcfbbbc6ebca5c865bff9377b2d7937f27d..17efdea65009c00a2608b3f31e98d5621bbded2e 100644 (file)
@@ -38,9 +38,9 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Text;
 
 /**
- * <b><u>Histogram</u></b>
- * <p>
- * Re-usable histogram widget with the following features:
+ * Re-usable histogram widget.
+ * 
+ * It has the following features:
  * <ul>
  * <li>Y-axis labels displaying min/max count values
  * <li>X-axis labels displaying time range
@@ -70,6 +70,9 @@ import org.eclipse.swt.widgets.Text;
  * <li>end of the time range
  * <li>number of events in that time range
  * </ul>
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public abstract class Histogram implements ControlListener, PaintListener, KeyListener, MouseListener, MouseTrackListener, IHistogramModelListener {
 
@@ -84,8 +87,14 @@ public abstract class Histogram implements ControlListener, PaintListener, KeyLi
     private final Color fHistoBarColor = new Color(Display.getDefault(), 74, 112, 139);
 
     // Timestamp scale (nanosecond)
+    /**
+     * The time scale of the histogram (nano seconds)
+     */
     public static final byte TIME_SCALE = -9;
 
+    /**
+     * The histogram bar width (number of pixels).
+     */
     public static final int HISTOGRAM_BAR_WIDTH = 1;
 
     // ------------------------------------------------------------------------
@@ -93,6 +102,9 @@ public abstract class Histogram implements ControlListener, PaintListener, KeyLi
     // ------------------------------------------------------------------------
 
     // Owner view
+    /**
+     * The parent TMF view.
+     */
     protected TmfView fParentView;
 
     // Histogram text fields
@@ -101,11 +113,17 @@ public abstract class Histogram implements ControlListener, PaintListener, KeyLi
     private Text fTimeRangeStartText;
     private Text fTimeRangeEndText;
 
-    // Histogram drawing area
+    /**
+     *  Histogram drawing area
+     */
     protected Canvas fCanvas;
-
-    // Data model
+    /**
+     *  The histogram data model.
+     */
     protected final HistogramDataModel fDataModel;
+    /**
+     * The histogram data model scaled to current resolution and screen width. 
+     */
     protected HistogramScaledData fScaledData;
 
     protected long fCurrentEventTime = 0;
@@ -114,6 +132,12 @@ public abstract class Histogram implements ControlListener, PaintListener, KeyLi
     // Construction
     // ------------------------------------------------------------------------
 
+    /**
+     * Standard constructor.
+     * 
+     * @param view A reference to the parent TMF view.
+     * @param parent A parent composite
+     */
     public Histogram(final TmfView view, final Composite parent) {
         fParentView = view;
 
@@ -129,6 +153,9 @@ public abstract class Histogram implements ControlListener, PaintListener, KeyLi
         fCanvas.addMouseTrackListener(this);
     }
 
+    /**
+     * Dispose resources and deregisters listeners.
+     */
     public void dispose() {
         fHistoBarColor.dispose();
         fDataModel.removeHistogramListener(this);
@@ -240,18 +267,34 @@ public abstract class Histogram implements ControlListener, PaintListener, KeyLi
     // Accessors
     // ------------------------------------------------------------------------
 
+    /**
+     * Returns the start time (equal first bucket time).
+     * @return the start time.
+     */
     public long getStartTime() {
         return fDataModel.getFirstBucketTime();
     }
 
+    /**
+     * Returns the end time.
+     * @return the end time.
+     */
     public long getEndTime() {
         return fDataModel.getEndTime();
     }
 
+    /**
+     * Returns the time limit (end of last bucket)
+     * @return the time limit.
+     */
     public long getTimeLimit() {
         return fDataModel.getTimeLimit();
     }
 
+    /** 
+     * Returns a data model reference. 
+     * @return data model.
+     */
     public HistogramDataModel getDataModel() {
         return fDataModel;
     }
@@ -259,6 +302,11 @@ public abstract class Histogram implements ControlListener, PaintListener, KeyLi
     // ------------------------------------------------------------------------
     // Operations
     // ------------------------------------------------------------------------
+    /**
+     * Updates the time range. 
+     * @param startTime A start time
+     * @param endTime A end time.
+     */
     public abstract void updateTimeRange(long startTime, long endTime);
 
     /**
@@ -412,7 +460,9 @@ public abstract class Histogram implements ControlListener, PaintListener, KeyLi
     // ------------------------------------------------------------------------
     // PaintListener
     // ------------------------------------------------------------------------
-
+    /**
+     * Image key string for the canvas.
+     */
     protected final String IMAGE_KEY = "double-buffer-image"; //$NON-NLS-1$
 
     @Override
index 0a1dd9bbb7f788967bdb78f4a77319f1be9d375a..79a502633fd116f544ee9339792b530537499414 100644 (file)
@@ -16,9 +16,10 @@ package org.eclipse.linuxtools.tmf.ui.views.histogram;
 import org.eclipse.swt.widgets.Composite;
 
 /**
- * <b><u>HistogramCurrentTimeControl</u></b>
- * <p>
  * This control provides a group containing a text control.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class HistogramCurrentTimeControl extends HistogramTextControl {
 
@@ -26,10 +27,28 @@ public class HistogramCurrentTimeControl extends HistogramTextControl {
     // Construction
     // ------------------------------------------------------------------------
 
+    /**
+     * Constructor with default group and text value.
+     * 
+     * @param parentView A parent histogram view
+     * @param parent A parent composite to draw in
+     * @param textStyle A test style 
+     * @param groupStyle A group style
+     */
     public HistogramCurrentTimeControl(HistogramView parentView, Composite parent, int textStyle, int groupStyle) {
         this(parentView, parent, textStyle, groupStyle, "", HistogramUtils.nanosecondsToString(0L)); //$NON-NLS-1$
     }
 
+    /**
+     * 
+     * Constructor
+     * @param parentView A parent histogram view
+     * @param parent A parent composite to draw in
+     * @param textStyle A test style 
+     * @param groupStyle A group style
+     * @param groupValue A group value
+     * @param textValue A text value
+     */
     public HistogramCurrentTimeControl(HistogramView parentView, Composite parent, int textStyle, int groupStyle, String groupValue, String textValue) {
         super(parentView, parent, textStyle, groupStyle, groupValue, textValue);
     }
index c9db53399ae54de9b8711f0b0a2bef9eba81840a..0e10f587397ad17e80b69368bd818528e3aa2518 100644 (file)
@@ -20,9 +20,9 @@ import java.util.Arrays;
 import org.eclipse.core.runtime.ListenerList;
 
 /**
- * <b><u>HistogramDataModel</u></b>
- * <p>
- * Histogram-independent data model with the following characteristics:
+ * Histogram-independent data model.
+ * 
+ * It has the following characteristics:
  * <ul>
  * <li>The <i>basetime</i> is the timestamp of the first event
  * <li>There is a fixed number (<i>n</i>) of buckets of uniform duration
@@ -57,10 +57,9 @@ import org.eclipse.core.runtime.ListenerList;
  * respect to to the number of pixels in the actual histogram, we should achieve
  * a nice result when visualizing the histogram.
  * <p>
- * TODO: Add filter support for more refined event counting (e.g. by trace,
- * event type, etc.)
- * <p>
- * TODO: Cut-off eccentric values? TODO: Support for going back in time?
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class HistogramDataModel implements IHistogramDataModel {
 
@@ -68,9 +67,14 @@ public class HistogramDataModel implements IHistogramDataModel {
     // Constants
     // ------------------------------------------------------------------------
 
-    // The default number of buckets
+    /**
+     *  The default number of buckets
+     */
     public static final int DEFAULT_NUMBER_OF_BUCKETS = 16 * 1000;
 
+    /**
+     * Number of events after which listeners will be notified.  
+     */
     public static final int REFRESH_FREQUENCY = DEFAULT_NUMBER_OF_BUCKETS;
 
     // ------------------------------------------------------------------------
@@ -98,10 +102,17 @@ public class HistogramDataModel implements IHistogramDataModel {
     // Constructors
     // ------------------------------------------------------------------------
 
+    /**
+     * Default constructor with default number of buckets.
+     */
     public HistogramDataModel() {
         this(DEFAULT_NUMBER_OF_BUCKETS);
     }
 
+    /**
+     * Constructor with non-default number of buckets.
+     * @param nbBuckets A number of buckets.
+     */
     public HistogramDataModel(int nbBuckets) {
         fNbBuckets = nbBuckets;
         fBuckets = new long[nbBuckets];
@@ -109,6 +120,10 @@ public class HistogramDataModel implements IHistogramDataModel {
         clear();
     }
 
+    /**
+     * Copy constructor.
+     * @param other A model to copy.
+     */
     public HistogramDataModel(HistogramDataModel other) {
         fNbBuckets = other.fNbBuckets;
         fBuckets = Arrays.copyOf(other.fBuckets, fNbBuckets);
@@ -131,34 +146,66 @@ public class HistogramDataModel implements IHistogramDataModel {
     // Accessors
     // ------------------------------------------------------------------------
 
+    /**
+     * Returns the number of events in the data model.
+     * @return number of events.
+     */
     public long getNbEvents() {
         return fNbEvents;
     }
 
+    /**
+     * Returns the number of buckets in the model.
+     * @return number of buckets.
+     */
     public int getNbBuckets() {
         return fNbBuckets;
     }
 
+   /**
+    * Returns the current bucket duration.
+    * @return bucket duration
+    */
     public long getBucketDuration() {
         return fBucketDuration;
     }
 
+    /**
+     * Returns the time value of the first bucket in the model.
+     * @return time of first bucket.
+     */
     public long getFirstBucketTime() {
         return fFirstBucketTime;
     }
 
+    /**
+     * Returns the time of the first event in the model.
+     * @return time of first event.
+     */
     public long getStartTime() {
         return fFirstEventTime;
     }
 
+    /**
+     * Returns the time of the last event in the model.
+     * @return the time of last event.
+     */
     public long getEndTime() {
         return fLastEventTime;
     }
 
+    /**
+     * Returns the time of the current event in the model. 
+     * @return the time of the current event.
+     */
     public long getCurrentEventTime() {
         return fCurrentEventTime;
     }
 
+    /**
+     * Returns the time limit with is: start time + nbBuckets * bucketDuration
+     * @return the time limit.
+     */
     public long getTimeLimit() {
         return fTimeLimit;
     }
@@ -167,18 +214,28 @@ public class HistogramDataModel implements IHistogramDataModel {
     // Listener handling
     // ------------------------------------------------------------------------
 
+    /**
+     * Add a listener to the model to be informed about model changes.
+     * @param listener A listener to add.
+     */
     public void addHistogramListener(IHistogramModelListener listener) {
         fModelListeners.add(listener);
     }
 
+    /**
+     * Remove a given model listener.
+     * @param listener A listener to remove.
+     */
     public void removeHistogramListener(IHistogramModelListener listener) {
         fModelListeners.remove(listener);
     }
 
+    // Notify listeners (always) 
     private void fireModelUpdateNotification() {
         fireModelUpdateNotification(0);
     }
 
+    // Notify listener on boundary
     private void fireModelUpdateNotification(long count) {
         if ((count % REFRESH_FREQUENCY) == 0) {
             Object[] listeners = fModelListeners.getListeners();
@@ -193,6 +250,10 @@ public class HistogramDataModel implements IHistogramDataModel {
     // Operations
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.views.distribution.model.IBaseDistributionModel#complete()
+     */
     @Override
     public void complete() {
         fireModelUpdateNotification();
@@ -200,6 +261,7 @@ public class HistogramDataModel implements IHistogramDataModel {
 
     /**
      * Clear the histogram model.
+     * @see org.eclipse.linuxtools.tmf.ui.views.distribution.model.IBaseDistributionModel#clear()
      */
     @Override
     public void clear() {
@@ -215,18 +277,18 @@ public class HistogramDataModel implements IHistogramDataModel {
     }
 
     /**
-     * Sets the current event time
+     * Sets the current event time (no notification of listeners) 
      *
-     * @param timestamp
+     * @param timestamp A time stamp to set.
      */
     public void setCurrentEvent(long timestamp) {
         fCurrentEventTime = timestamp;
     }
 
     /**
-     * Sets the current event time
+     * Sets the current event time with notification of listeners 
      *
-     * @param timestamp
+     * @param timestamp A time stamp to set.
      */
     public void setCurrentEventNotifyListeners(long timestamp) {
         fCurrentEventTime = timestamp;
@@ -236,7 +298,9 @@ public class HistogramDataModel implements IHistogramDataModel {
     /**
      * Add event to the correct bucket, compacting the if needed.
      *
-     * @param timestamp the timestamp of the event to count
+     * @param eventCount The current event Count (for notification purposes)
+     * @param timestamp The timestamp of the event to count
+     *  
      */
     @Override
     public void countEvent(long eventCount, long timestamp) {
@@ -301,11 +365,12 @@ public class HistogramDataModel implements IHistogramDataModel {
     /**
      * Scale the model data to the width, height and bar width requested.
      *
-     * @param width
-     * @param height
-     * @param barWidth
-     * @return the result array of size [width] and where the highest value
-     *         doesn't exceed [height]
+     * @param width A width of the histogram canvas
+     * @param height A height of the histogram canvas
+     * @param barWidth A width (in pixel) of a histogram bar
+     * @return the result array of size [width] and where the highest value doesn't exceed [height]
+     *         
+     * @see org.eclipse.linuxtools.tmf.ui.views.histogram.IHistogramDataModel#scaleTo(int, int, int)
      */
     @Override
     public HistogramScaledData scaleTo(int width, int height, int barWidth) {
index 4de693cb489a0c46d383f772b7a7f1870dc4308e..763191663166891e5e5685ab3c9e657cfe8546e4 100644 (file)
@@ -22,7 +22,10 @@ import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 
 /**
- * <b><u>HistogramRequest</u></b>
+ * Class to request events for given time range from a trace to fill a HistogramDataModel and HistogramView.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  * <p>
  */
 public class HistogramRequest extends TmfEventRequest<ITmfEvent> {
@@ -31,12 +34,25 @@ public class HistogramRequest extends TmfEventRequest<ITmfEvent> {
     // Attributes
     // ------------------------------------------------------------------------
 
+    /**
+     * The histogram data model to fill.
+     */
     protected final HistogramDataModel fHistogram;
 
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
 
+    /**
+     * Constructor
+     * @param histogram The histogram data model
+     * @param range The time range to request data 
+     * @param rank The index of the first event to retrieve
+     * @param nbEvents The number of events requested
+     * @param blockSize the number of events per block
+     * @param priority the requested execution priority
+     * 
+     */
     public HistogramRequest(HistogramDataModel histogram, TmfTimeRange range, int rank, int nbEvents, int blockSize, ITmfDataRequest.ExecutionType execType) {
         super(ITmfEvent.class, range, rank, nbEvents, (blockSize > 0) ? blockSize : ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, execType);
         fHistogram = histogram;
@@ -45,7 +61,13 @@ public class HistogramRequest extends TmfEventRequest<ITmfEvent> {
     // ------------------------------------------------------------------------
     // TmfEventRequest
     // ------------------------------------------------------------------------
-
+    
+    /**
+     * Handle the event from the trace by updating the histogram data model.
+     * 
+     * @param event a event from the trace
+     * @see org.eclipse.linuxtools.tmf.core.request.TmfDataRequest#handleData(org.eclipse.linuxtools.tmf.core.event.ITmfEvent)
+     */
     @Override
     public void handleData(ITmfEvent event) {
         super.handleData(event);
@@ -55,15 +77,14 @@ public class HistogramRequest extends TmfEventRequest<ITmfEvent> {
         }
     }
 
+    /**
+     * Complete the request. It also notifies the histogram model about the completion.
+     * 
+     * @see org.eclipse.linuxtools.tmf.core.request.TmfDataRequest#handleCompleted()
+     */
     @Override
     public void handleCompleted() {
         fHistogram.complete();
         super.handleCompleted();
     }
-
-    @Override
-    public void handleCancel() {
-        super.handleCancel();
-    }
-
 }
index 648d7c8e382990da9391693eb07b7ecd7fdde65d..3d7b36b922d3d3b950bf03ed849604f96dd0dc1a 100644 (file)
@@ -17,9 +17,10 @@ package org.eclipse.linuxtools.tmf.ui.views.histogram;
 import java.util.Arrays;
 
 /**
- * <b><u>HistogramScaledData</u></b>
- * <p>
  * Convenience class/struct for scaled histogram data.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class HistogramScaledData {
 
@@ -27,28 +28,69 @@ public class HistogramScaledData {
     // Constants
     // ------------------------------------------------------------------------
 
+    /**
+     * Indicator value that bucket is out of range (not filled).
+     */
     public static final int OUT_OF_RANGE_BUCKET = -1;
 
     // ------------------------------------------------------------------------
     // Attributes
     // ------------------------------------------------------------------------
-
+    /**
+     * Width of histogram canvas (number of pixels).
+     */
     public int fWidth;
+    /**
+     * Height of histogram canvas (number of pixels).
+     */
     public int fHeight;
+    /**
+     * Width of one histogram bar (number of pixels). 
+     */
     public int fBarWidth;
+    /**
+     * Array of scaled values
+     */
     public int[] fData;
+    /**
+     * The bucket duration of a scaled data bucket.
+     */
     public long fBucketDuration;
+    /**
+     * The maximum number of events of all buckets. 
+     */
     public long fMaxValue;
+    /**
+     * The index of the current bucket.
+     */
     public int fCurrentBucket;
+    /**
+     * The index of the last bucket. 
+     */
     public int fLastBucket;
+    /**
+     * The scaling factor used to fill the scaled data.
+     */
     public double fScalingFactor;
+    /**
+     * Time of first bucket.
+     */
     public long fFirstBucketTime;
+    /**
+     * The time of the first event.
+     */
     public long fFirstEventTime;
 
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
 
+    /**
+     * Constructor.
+     * @param width the canvas width
+     * @param height the canvas height
+     * @param barWidth the required bar width
+     */
     public HistogramScaledData(int width, int height, int barWidth) {
         fWidth = width;
         fHeight = height;
@@ -63,6 +105,10 @@ public class HistogramScaledData {
         fFirstBucketTime = 0;
     }
 
+    /**
+     * Copy constructor
+     * @param other another scaled data.
+     */
     public HistogramScaledData(HistogramScaledData other) {
         fWidth = other.fWidth;
         fHeight = other.fHeight;
@@ -80,24 +126,45 @@ public class HistogramScaledData {
     // Setter and Getter
     // ------------------------------------------------------------------------
 
+    /**
+     * Returns the time of the first bucket of the scaled data.
+     * @return the time of the first bucket.
+     */
     public long getFirstBucketTime() {
         return fFirstBucketTime;
     }
 
+    /**
+     * Set the first event time. 
+     * @param firstEventTime
+     */
     public void setFirstBucketTime(long firstEventTime) {
         fFirstBucketTime = firstEventTime;
     }
     
+    /**
+     * Returns the time of the last bucket.
+     * @return last bucket time
+     */
     public long getLastBucketTime() {
         return getBucketStartTime(fLastBucket);
     }
     
+    /**
+     * Returns the time of the bucket start time for given index.
+     * @param index A bucket index.
+     * @return the time of the bucket start time
+     */
     public long getBucketStartTime(int index) {
         return fFirstBucketTime + index * fBucketDuration;
     }
     
+    /**
+     * Returns the time of the bucket end time for given index.
+     * @param index A bucket index.
+     * @return the time of the bucket end time
+     */
     public long getBucketEndTime(int index) {
         return getBucketStartTime(index) + fBucketDuration;
     }
-
 }
\ No newline at end of file
index 104bd0074a67a71057a8c2ad423e74bff4a03f6b..6fd482ff94661dc33ff437548974b9290a2aa87b 100644 (file)
@@ -29,9 +29,10 @@ import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Text;
 
 /**
- * <b><u>HistogramTextControl</u></b>
- * <p>
  * This control provides a group containing a text control.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public abstract class HistogramTextControl implements FocusListener, KeyListener {
 
@@ -39,11 +40,17 @@ public abstract class HistogramTextControl implements FocusListener, KeyListener
     // Attributes
     // ------------------------------------------------------------------------
 
+    /**
+     * The parent histogram view.
+     */
     protected final HistogramView fParentView;
     private final Composite fParent;
 
     // Controls
     private final Group fGroup;
+    /**
+     * The text value field.
+     */
     protected final Text fTextValue;
     private long fValue;
 
@@ -51,10 +58,29 @@ public abstract class HistogramTextControl implements FocusListener, KeyListener
     // Constructors
     // ------------------------------------------------------------------------
 
+    /**
+     * Constructor default values
+     *
+     * @param parentView The parent histogram view.
+     * @param parent The parent composite
+     * @param textStyle The text style bits.
+     * @param groupStyle The group style bits.
+     * 
+     */
     public HistogramTextControl(HistogramView parentView, Composite parent, int textStyle, int groupStyle) {
         this(parentView, parent, textStyle, groupStyle, "", HistogramUtils.nanosecondsToString(0L)); //$NON-NLS-1$
     }
 
+   /**
+    * Constructor with given group and text values.
+    * 
+    * @param parentView The parent histogram view.
+    * @param parent The parent composite
+    * @param textStyle The text style bits.
+    * @param groupStyle The group style bits.
+    * @param groupValue A group value
+    * @param textValue A text value
+    */
     public HistogramTextControl(HistogramView parentView, Composite parent, int textStyle, int groupStyle, String groupValue, String textValue) {
 
         fParentView = parentView;
@@ -117,7 +143,10 @@ public abstract class HistogramTextControl implements FocusListener, KeyListener
     // Accessors
     // ------------------------------------------------------------------------
 
-    // State
+    /**
+     * Returns if widget isDisposed or not
+     * @return <code>true</code> if widget is disposed else <code>false</code>  
+     */
     public boolean isDisposed() {
         return fGroup.isDisposed();
     }
@@ -126,19 +155,32 @@ public abstract class HistogramTextControl implements FocusListener, KeyListener
     // Operations
     // ------------------------------------------------------------------------
 
+    /**
+     * Updates the text value.
+     */
     protected abstract void updateValue();
 
-    // LayoutData
+    /**
+     * Set the Grid Layout Data for the group.
+     * @param layoutData A GridData to set.
+     */
     public void setLayoutData(GridData layoutData) {
         fGroup.setLayoutData(layoutData);
     }
 
-    // Time value
+    /**
+     * Sets the value converted to nano-seconds in the text field.
+     * @param timeString the time string (input)
+     */
     public void setValue(String timeString) {
         long timeValue = HistogramUtils.stringToNanoseconds(timeString);
         setValue(timeValue);
     }
 
+    /**
+     * The time value in nano-seconds to set in the text field. 
+     * @param time the time to set
+     */
     public void setValue(final long time) {
         // If this is the UI thread, process now
         Display display = Display.getCurrent();
@@ -160,7 +202,11 @@ public abstract class HistogramTextControl implements FocusListener, KeyListener
             });
         }
     }
-
+    
+    /**
+     * Returns the time value.
+     * @return time value.
+     */
     public long getValue() {
         return fValue;
     }
@@ -169,10 +215,18 @@ public abstract class HistogramTextControl implements FocusListener, KeyListener
     // FocusListener
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
+     */
     @Override
     public void focusGained(FocusEvent event) {
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
+     */
     @Override
     public void focusLost(FocusEvent event) {
         updateValue();
@@ -182,6 +236,10 @@ public abstract class HistogramTextControl implements FocusListener, KeyListener
     // KeyListener
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.swt.events.KeyListener#keyPressed(org.eclipse.swt.events.KeyEvent)
+     */
     @Override
     public void keyPressed(KeyEvent event) {
         switch (event.keyCode) {
@@ -193,6 +251,10 @@ public abstract class HistogramTextControl implements FocusListener, KeyListener
         }
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.swt.events.KeyListener#keyReleased(org.eclipse.swt.events.KeyEvent)
+     */
     @Override
     public void keyReleased(KeyEvent e) {
     }
index 2d221921a780e6a3fbd81dc1a0ce461b3e6309b6..2b436bbefdec6a18bd44f00921c109ebbd8f398e 100644 (file)
@@ -16,20 +16,37 @@ package org.eclipse.linuxtools.tmf.ui.views.histogram;
 import org.eclipse.swt.widgets.Composite;
 
 /**
- * <b><u>HistogramTimeRangeControl</u></b>
- * <p>
  * This control provides a group containing a text control.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class HistogramTimeRangeControl extends HistogramTextControl {
 
     // ------------------------------------------------------------------------
     // Construction
     // ------------------------------------------------------------------------
-
+    /**
+     * Constructor default values
+     * @param parentView The parent histogram view.
+     * @param parent The parent composite
+     * @param textStyle The text style bits.
+     * @param groupStyle The group style bits.
+     */
     public HistogramTimeRangeControl(HistogramView parentView, Composite parent, int textStyle, int groupStyle) {
         this(parentView, parent, textStyle, groupStyle, "", HistogramUtils.nanosecondsToString(0L)); //$NON-NLS-1$
     }
 
+    /**
+     * Constructor with given group and text values.
+     * 
+     * @param parentView The parent histogram view.
+     * @param parent The parent composite
+     * @param textStyle The text style bits.
+     * @param groupStyle The group style bits.
+     * @param groupValue A group value
+     * @param textValue A text value
+     */
     public HistogramTimeRangeControl(HistogramView parentView, Composite parent, int textStyle, int groupStyle, String groupValue, String textValue) {
         super(parentView, parent, textStyle, groupStyle, groupValue, textValue);
     }
@@ -38,6 +55,10 @@ public class HistogramTimeRangeControl extends HistogramTextControl {
     // Operations
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramTextControl#updateValue()
+     */
     @Override
     protected void updateValue() {
         String stringValue = fTextValue.getText();
index 552dab3f450120330262fecd981be8c52c5244f7..bf203842a5516319e843470909273fa1d66414b0 100644 (file)
@@ -18,9 +18,10 @@ import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.widgets.Composite;
 
 /**
- * <b><u>HistogramUtils</u></b>
- * <p>
  * Bunch of conversion utilities.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  * <p>
  */
 public abstract class HistogramUtils {
index 7221b2c31b36b1fc588213fabf331e0f6a361618..d5dcae72326f8607874df8e6a8e805bc02df1d59 100644 (file)
@@ -58,10 +58,14 @@ public class HistogramView extends TmfView {
     // Constants
     // ------------------------------------------------------------------------
 
-    // The view ID as defined in plugin.xml
+    /**
+     *  The view ID as defined in plugin.xml
+     */
     public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.histogram"; //$NON-NLS-1$
 
-    // The initial window span (in nanoseconds)
+    /**
+     *  The initial window span (in nanoseconds)
+     */
     public static final long INITIAL_WINDOW_SPAN = (1L * 100 * 1000 * 1000); // .1sec
 
     // Time scale
@@ -101,6 +105,9 @@ public class HistogramView extends TmfView {
     // Constructor
     // ------------------------------------------------------------------------
 
+    /**
+     * Default constructor
+     */
     public HistogramView() {
         super(ID);
     }
@@ -258,6 +265,11 @@ public class HistogramView extends TmfView {
     // Accessors
     // ------------------------------------------------------------------------
 
+    /**
+     * Returns the time range of the current selected window (base on default time scale).
+     * 
+     * @return the time range of current selected window.
+     */
     public TmfTimeRange getTimeRange() {
         return new TmfTimeRange(new TmfTimestamp(fWindowStartTime, TIME_SCALE), new TmfTimestamp(fWindowEndTime,
                 TIME_SCALE));
@@ -267,6 +279,10 @@ public class HistogramView extends TmfView {
     // Operations
     // ------------------------------------------------------------------------
 
+    /**
+     * Broadcast TmfSignal about new current time value.
+     * @param newTime the new current time.
+     */
     public void updateCurrentEventTime(long newTime) {
         if (fCurrentExperiment != null) {
             TmfTimeRange timeRange = new TmfTimeRange(new TmfTimestamp(newTime, TIME_SCALE), TmfTimestamp.BIG_CRUNCH);
@@ -283,6 +299,11 @@ public class HistogramView extends TmfView {
         }
     }
 
+    /**
+     * Broadcast TmfSignal about new selected time range.
+     * @param startTime the new start time
+     * @param endTime the new end time
+     */
     public void updateTimeRange(long startTime, long endTime) {
         if (fCurrentExperiment != null) {
             // Build the new time range; keep the current time
@@ -298,6 +319,10 @@ public class HistogramView extends TmfView {
         }
     }
 
+    /**
+     * Broadcast TmfSignal about new selected time range.
+     * @param newDuration new duration (relative to current start time)
+     */
     public synchronized void updateTimeRange(long newDuration) {
         if (fCurrentExperiment != null) {
             long delta = newDuration - fWindowSpan;
@@ -326,6 +351,11 @@ public class HistogramView extends TmfView {
     // Signal handlers
     // ------------------------------------------------------------------------
 
+    /**
+     * Handles experiment selected signal. Loads histogram if new experiment time range is not
+     * equal <code>TmfTimeRange.NULL_RANGE</code>
+     * @param signal the experiment selected signal
+     */
     @TmfSignalHandler
     @SuppressWarnings("unchecked")
     public void experimentSelected(TmfExperimentSelectedSignal<ITmfEvent> signal) {
@@ -339,6 +369,13 @@ public class HistogramView extends TmfView {
         fParent.redraw();
     }
 
+    /**
+     * Handles experiment range updated signal. Extends histogram according to the new time range. If a 
+     * HistogramRequest is already ongoing, it will be cancelled and a new request with the new range
+     * will be issued.
+     * 
+     * @param signal the experiment range updated signal
+     */
     @TmfSignalHandler
     public void experimentRangeUpdated(TmfExperimentRangeUpdatedSignal signal) {
 
@@ -366,6 +403,10 @@ public class HistogramView extends TmfView {
         sendFullRangeRequest(fullRange);
     }
 
+    /**
+     * Handles the experiment updated signal. Used to update time limits (start and end time)
+     * @param signal the experiment updated signal
+     */
     @TmfSignalHandler
     public void experimentUpdated(TmfExperimentUpdatedSignal signal) {
         if (signal.getExperiment() != fCurrentExperiment) {
@@ -379,6 +420,12 @@ public class HistogramView extends TmfView {
         fTimeRangeHistogram.setFullRange(fExperimentStartTime, fExperimentEndTime);
     }
 
+    /**
+     * Handles the current time updated signal. Sets the current time in the time range
+     * histogram as well as the full histogram.
+     * 
+     * @param signal the signal to process
+     */
     @TmfSignalHandler
     public void currentTimeUpdated(TmfTimeSynchSignal signal) {
         // Because this can't happen :-)
@@ -394,6 +441,10 @@ public class HistogramView extends TmfView {
         fCurrentEventTimeControl.setValue(fCurrentTimestamp);
     }
 
+    /**
+     * Updates the current time range in the time range histogram and full range histogram.
+     * @param signal the signal to process
+     */
     @TmfSignalHandler
     public void timeRangeUpdated(TmfRangeSynchSignal signal) {
         // Because this can't happen :-)
index 3b9b06055760200e20e12f163cf324cfb1caac14..b42c807ccb00644f1c0536c104fbd5c7c66bec2a 100644 (file)
@@ -18,7 +18,10 @@ import org.eclipse.swt.events.MouseWheelListener;
 import org.eclipse.swt.widgets.Canvas;
 
 /**
- * <b><u>HistogramZoom</u></b>
+ * Class to handle zooming within histogram windows..
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  * <p>
  */
 public class HistogramZoom implements MouseWheelListener {
@@ -66,14 +69,26 @@ public class HistogramZoom implements MouseWheelListener {
     // Accessors
     // ------------------------------------------------------------------------
 
+    /**
+     * Get start time of the zoom window.
+     * @return the start time.
+     */
     public synchronized long getStartTime() {
         return fRangeStartTime;
     }
 
+    /**
+     * Get the end time of the zoom window.
+     * @return the end time
+     */
     public synchronized long getEndTime() {
         return fRangeStartTime + fRangeDuration;
     }
 
+    /**
+     * Get the duration of the zoom window.
+     * @return the duration of the zoom window.
+     */
     public synchronized long getDuration() {
         return fRangeDuration;
     }
@@ -82,6 +97,9 @@ public class HistogramZoom implements MouseWheelListener {
     // Operations
     // ------------------------------------------------------------------------
 
+    /**
+     * Stops the zooming (multiple consecutive execution)
+     */
     public synchronized void stop() {
         if (fScrollCounter != null) {
             fScrollCounter.interrupt();
@@ -89,11 +107,22 @@ public class HistogramZoom implements MouseWheelListener {
         }
     }
 
+    /**
+     * The the full time range of the histogram
+     *   
+     * @param startTime the start time the histogram
+     * @param endTime the end time of the histogram
+     */
     public synchronized void setFullRange(long startTime, long endTime) {
         fAbsoluteStartTime = startTime;
         fAbsoluteEndTime = endTime;
     }
 
+    /**
+     * Sets the new zoom window
+     * @param startTime the start time
+     * @param duration the duration
+     */
     public synchronized void setNewRange(long startTime, long duration) {
         if (startTime < fAbsoluteStartTime)
             startTime = fAbsoluteStartTime;
@@ -186,6 +215,10 @@ public class HistogramZoom implements MouseWheelListener {
         // Constructors
         // --------------------------------------------------------------------
 
+        /** 
+         * Constructor of inner class to handle consecutive scrolls of mouse wheel.
+         * @param zoom the histogram zoom reference
+         */
         public MouseScrollCounter(HistogramZoom zoom) {
             fZoom = zoom;
             fLastPoolTime = System.currentTimeMillis();
@@ -194,7 +227,11 @@ public class HistogramZoom implements MouseWheelListener {
         // --------------------------------------------------------------------
         // Operation
         // --------------------------------------------------------------------
-
+        
+        /**
+         * Increments the number of scroll clicks.
+         * @param nbScrolls the number to add to the current value
+         */
         public void incrementMouseScroll(int nbScrolls) {
             fLastPoolTime = System.currentTimeMillis();
             nbScrollClick += nbScrolls;
index 3e793d5394fc612943e2bfefba33ad850c5a6e05..a0177e843926e77a09c7aae3fb156633f6ea9ab5 100644 (file)
@@ -16,27 +16,27 @@ package org.eclipse.linuxtools.tmf.ui.views.histogram;
 import org.eclipse.linuxtools.tmf.ui.views.distribution.model.IBaseDistributionModel;
 
 /**
- * <b><u>IHistogramDataModel</u></b>
- * <p>
+ * Histogram data model interface.
+ * 
+ * @version 1.0
+ * @author Bernd Hufmann
  */
-
 public interface IHistogramDataModel extends IBaseDistributionModel {
     /**
      * Add event to the correct bucket, compacting the if needed.
      * 
-     * @param eventCount the event to count
+     * @param eventCount the event to count 
      * @param timestamp the timestamp of the event to count
      */
     public void countEvent(long eventCount, long timestamp);
-    
     /**
      * Scale the model data to the width, height and bar width requested.
-     * 
-     * @param width
-     * @param height
-     * @param barWidth
-     * @return the result array of size [width] and where the highest value
-     *         doesn't exceed [height] considering the bar width [barWidth]
+     *
+     * @param width A width of the histogram canvas
+     * @param height A height of the histogram canvas
+     * @param barWidth A width (in pixel) of a histogram bar
+     * @return the result array of size [width] and where the highest value doesn't exceed [height]
+     *         while considering the bar width [barWidth]
      */
     public HistogramScaledData scaleTo(int width, int height, int barWidth);
 
index 2dfd3f21d4b2a6b6080218a8f78c9d35a392b28c..658b7bbb600c6e3e66175d37000e2b825b5a49fd 100644 (file)
 package org.eclipse.linuxtools.tmf.ui.views.histogram;
 
 /**
- * <b><u>IHistogramModelListener</u></b>
- * <p>
+ * Listener interface for receiving histogram data model notifications.
+ * 
+ * @version 1.0
+ * @author Bernd Hufmann
  */
 public interface IHistogramModelListener {
     /**
-     * Method to notify listeners about model updates 
+     * Method to implement to receive notification about model updates. 
      */
     public void modelUpdated();
 }
index 0b067a6d0f1e167eab1c29cc666e9e579bb696ab..1a0b6283332b8f4bdd30822c0808c742fe877cd1 100644 (file)
@@ -17,8 +17,10 @@ package org.eclipse.linuxtools.tmf.ui.views.histogram;
 import org.eclipse.osgi.util.NLS;
 
 /**
- * <b><u>Messages</u></b>
+ * Messages file for the histogram widgets.
  * <p>
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class Messages extends NLS {
 
@@ -28,7 +30,13 @@ public class Messages extends NLS {
 
        private static final String BUNDLE_NAME = "org.eclipse.linuxtools.tmf.ui.views.histogram.messages"; //$NON-NLS-1$
     
+       /**
+        * The label for the current event time
+        */
        public static String HistogramView_currentEventLabel;
+       /**
+        * The label for the window span.
+        */
     public static String HistogramView_windowSpanLabel;
     
     // ------------------------------------------------------------------------
index bf8e2030fb6f66815071b6fc5487aefe562f8bef..9d65dcf810b327b0b99e8bc35187aa3001f372d2 100644 (file)
@@ -17,13 +17,15 @@ package org.eclipse.linuxtools.tmf.ui.views.histogram;
 import org.eclipse.swt.widgets.Composite;
 
 /**
- * <b><u>TimeRangeHistogram</u></b>
  * <p>
  * A basic histogram with the following additional features:
  * <ul>
  * <li>zoom in: mouse wheel up (or forward)
  * <li>zoom out: mouse wheel down (or backward)
  * </ul>
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class TimeRangeHistogram extends Histogram {
 
@@ -31,12 +33,16 @@ public class TimeRangeHistogram extends Histogram {
     // Attributes
     // ------------------------------------------------------------------------
 
-    HistogramZoom fZoom = null;
+    private HistogramZoom fZoom = null;
 
     // ------------------------------------------------------------------------
     // Constructor
     // ------------------------------------------------------------------------
-
+    /**
+     * Constructor 
+     * @param view The parent histogram view
+     * @param parent The parent composite
+     */
     public TimeRangeHistogram(HistogramView view, Composite parent) {
         super(view, parent);
         fZoom = new HistogramZoom(this, fCanvas, getStartTime(), getTimeLimit());
@@ -46,11 +52,19 @@ public class TimeRangeHistogram extends Histogram {
     // Operations
     // ------------------------------------------------------------------------
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.views.histogram.Histogram#updateTimeRange(long, long)
+     */
     @Override
     public void updateTimeRange(long startTime, long endTime) {
         ((HistogramView) fParentView).updateTimeRange(startTime, endTime);
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.ui.views.histogram.Histogram#clear()
+     */
     @Override
     public synchronized void clear() {
         if (fZoom != null)
@@ -58,10 +72,20 @@ public class TimeRangeHistogram extends Histogram {
         super.clear();
     }
 
+    /**
+     * Sets the time range of the histogram
+     * @param startTime The start time 
+     * @param duration The duration of the time range
+     */
     public synchronized void setTimeRange(long startTime, long duration) {
         fZoom.setNewRange(startTime, duration);
     }
 
+    /**
+     * Sets the full time range of the whole trace.
+     * @param startTime The start time 
+     * @param endTime The end time
+     */
     public void setFullRange(long startTime, long endTime) {
         long currentFirstEvent = getStartTime();
         fZoom.setFullRange((currentFirstEvent == 0) ? startTime : currentFirstEvent, endTime);
index 68c30e0dc115e55f01bd1eeb76f7946a3c0036ba..ed77056a42692498bc365a629f17e744b1330f7b 100755 (executable)
@@ -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,7 +15,14 @@ package org.eclipse.linuxtools.tmf.ui.views.statistics;
 
 /**
  * This class provides an extension for updating data model and to pass along more information beside events
+ * 
+ * @version 1.0
+ * @author Mathieu Denis
  */
 public interface ITmfExtraEventInfo {
+    /**
+     * Returns the trace name.
+     * @return the name of the trace.
+     */
     public String getTraceName();
 }
index 7708fd63bc259641062556629d8531ecfb9bd19b..0f4995c31bf1fa30177c0d0bff0b00c14cc3884e 100755 (executable)
@@ -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
@@ -14,12 +14,34 @@ package org.eclipse.linuxtools.tmf.ui.views.statistics;
 
 import org.eclipse.osgi.util.NLS;
 
+/**
+ * Messages file for statistics view strings.
+ * 
+ * @version 1.0
+ * @author Mathieu Denis
+ *
+ */
 public class Messages extends NLS {
     private static final String BUNDLE_NAME = "org.eclipse.linuxtools.tmf.ui.views.statistics.messages"; //$NON-NLS-1$
+    /**
+     * Level column name
+     */
     public static String TmfStatisticsView_LevelColumn;
+    /**
+     * Level column tool tip.
+     */
     public static String TmfStatisticsView_LevelColumnTip;
+    /**
+     * Number of events column name.
+     */
     public static String TmfStatisticsView_NbEventsColumn;
+    /**
+     * Number of events column tool tip.
+     */
     public static String TmfStatisticsView_NbEventsTip;
+    /**
+     * String for unknown trace name.
+     */
     public static String TmfStatisticsView_UnknownTraceName;
     static {
         // initialize resource bundle
index 4d39a429fb8a00cc76b00e3802f52262a0dd0fd3..e127e6bd891117e1f5a4e486a047c74a2171b4df 100755 (executable)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011 Ericsson
+ * Copyright (c) 2011, 20112 Ericsson
  * 
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -7,8 +7,12 @@
  * http://www.eclipse.org/legal/epl-v10.html
  * 
  * Contributors:
- *   Mathieu Denis      (mathieu.denis@polymtl.ca)  - Generalized version based on LTTng
+ *   Mathieu Denis  (mathieu.denis@polymtl.ca)  - Generalized version based on LTTng
  *   Bernd Hufmann - Updated to use trace reference in TmfEvent and streaming
+ *   
+ *   @version 1.0
+ *   @author Mathieu Denis
+ *
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.ui.views.statistics;
@@ -53,13 +57,13 @@ import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
 
 /**
- * <b><u>TmfStatisticsView</u></b>
- * <p>
  * The generic Statistics View displays statistics for any kind of traces.
  * 
  * It is implemented according to the MVC pattern. - The model is a TmfStatisticsTreeNode built by the State Manager. - The view is built with a
  * TreeViewer. - The controller that keeps model and view synchronized is an observer of the model.
  * </p>
+ * 
+ * 
  */
 public class TmfStatisticsView extends TmfView {
     /**
index 76f754f8dee93de394a85cb0ff7d38baecc38924..75e5e3528d44b4b0c8775b184cb92fe2897bab83 100755 (executable)
@@ -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
@@ -7,7 +7,8 @@
  * http://www.eclipse.org/legal/epl-v10.html
  * 
  * Contributors:
- *   Mathieu Denis      (mathieu.denis@polymtl.ca)  - Implementation and Initial API
+ *   Mathieu Denis      (mathieu.denis@polymtl.ca) - Implementation and Initial API
+ *   
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.ui.views.statistics.model;
@@ -27,6 +28,9 @@ import org.eclipse.linuxtools.tmf.ui.views.statistics.ITmfExtraEventInfo;
  * It allow to implement a tree structure while avoiding the need to run through
  * the tree each time you need to add a node at a given place.
  * </p>
+ * 
+ *  @version 1.0
+ *  @author Mathieu Denis
  */
 public abstract class AbsTmfStatisticsTree {
 
index abd9e79adc8c303ac757b99cf181b0515c9866ca..8caa77e7afb64f36a4b58e6094edb0b7c68e5765 100755 (executable)
@@ -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,10 +15,10 @@ package org.eclipse.linuxtools.tmf.ui.views.statistics.model;
 import java.util.List;
 
 /**
- * <b><u>ITmfColumnDataProvider</u></b>
- * <p>
  * Basic methods that must be implemented in a column data provider.
  * </p>
+ * @version 1.0
+ * @author Mathieu Denis
  */
 public interface ITmfColumnDataProvider {
     /**
index 22b3f0917c4a933b8d022536da8f3a42a5a12dd8..59043d8d3ded1805045c912fdc42491f61f348d8 100644 (file)
@@ -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
@@ -17,7 +17,10 @@ import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.model.TmfBaseColumnData.ITmfColumnPercentageProvider;
 
 /**
- * Provide the basic interface to create a statistics column 
+ * Provide the basic interface to create a statistics column for the statistics table tree.
+ * 
+ *  @version 1.0
+ *  @author Mathieu Denis
  */
 public interface ITmfStatisticsColumnData {
 
index 43d1713b05b4e267c2811e69253f353d3322b038..4f9df85f6c621aa593c039df6fba1dc9aa0e84a5 100755 (executable)
@@ -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
@@ -14,10 +14,24 @@ package org.eclipse.linuxtools.tmf.ui.views.statistics.model;
 
 import org.eclipse.osgi.util.NLS;
 
+/**
+ * Message strings for the statistics framework.
+ * 
+ * @version 1.0
+ * @author Mathieu Denis
+ *
+ */
 public class Messages extends NLS {
     private static final String BUNDLE_NAME = "org.eclipse.linuxtools.tmf.ui.views.statistics.model.messages"; //$NON-NLS-1$
+    /**
+     * CPU statistic name.
+     */
     public static String TmfStatisticsData_CPUs;
+    /**
+     * Event type statistic name.
+     */
     public static String TmfStatisticsData_EventTypes;
+    
     static {
         // initialize resource bundle
         NLS.initializeMessages(BUNDLE_NAME, Messages.class);
index c3efedfc4c11973af1f0b9fc9b7426292d8623b3..bb2f2dc29346ee55c795c7489a91c25170878cc2 100755 (executable)
@@ -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
@@ -18,32 +18,50 @@ import org.eclipse.jface.viewers.ViewerComparator;
 
 /**
  * Contains all the information necessary to build a column of the table.
+ * @version 1.0 
+ * @author Mathieu Denis
  */
 public class TmfBaseColumnData implements ITmfStatisticsColumnData {
     
-    // Name of the column.
+    /**
+     * Name of the column.
+     */
     protected final String fHeader;
-    // Width of the column.
+    /**
+     * Width of the column.
+     */
     protected final int fWidth;
-    // Alignment of the column.
+    /**
+     * Alignment of the column.
+     */
     protected final int fAlignment;
-    // Tooltip of the column.
+    /**
+     * Tooltip of the column.
+     */
     protected final String fTooltip;
-    // Adapts a StatisticsTreeNode into the content of it's corresponding
-    // cell for that column.
+    /**
+     * Adapts a StatisticsTreeNode into the content of it's corresponding cell for that column.
+     */
     protected final ColumnLabelProvider fLabelProvider;
-    // Used to sort elements of this column. Can be null.
+    /**
+     * Used to sort elements of this column. Can be null.
+     */
     protected final ViewerComparator fComparator;
-    // Used to draw bar charts in this column. Can be null.
+    /**
+     * Used to draw bar charts in this column. Can be null.
+     */
     protected final ITmfColumnPercentageProvider fPercentageProvider;
     
-    // Used to draw bar charts in columns.
+    /**
+     * Used to draw bar charts in columns.
+     */
     public interface ITmfColumnPercentageProvider {
         public double getPercentage(TmfStatisticsTreeNode node);
     }
 
     /**
      * Constructor with parameters
+     * 
      * @param h header of the column. The name will be shown at the top of the column.
      * @param w width of the column.
      * @param a alignment of the text
index 97869998cc9f848246d167a6a636beca060f9b07..309cb167df8fb4b06538fc1f8997c1e10e8e173f 100755 (executable)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011 Ericsson
+ * Copyright (c) 2011, 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
@@ -29,7 +29,10 @@ import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.PlatformUI;
 
 /**
- * Create a basic list of columns with providers
+ * Create a basic list of columns with providers.
+ * 
+ * @version 1.0
+ * @author Mathieu Denis
  */
 public class TmfBaseColumnDataProvider implements ITmfColumnDataProvider {
 
@@ -37,7 +40,6 @@ public class TmfBaseColumnDataProvider implements ITmfColumnDataProvider {
      * Contains the list of the columns
      */
     protected List<TmfBaseColumnData> fColumnData = null;
-
     /**
      * Level column names
      */
@@ -46,7 +48,6 @@ public class TmfBaseColumnDataProvider implements ITmfColumnDataProvider {
      * Number of events column names
      */
     protected final static String EVENTS_COUNT_COLUMN = Messages.TmfStatisticsView_NbEventsColumn;
-
     /**
      * Level column tooltips
      */
@@ -55,12 +56,10 @@ public class TmfBaseColumnDataProvider implements ITmfColumnDataProvider {
      * Number of events column tooltips
      */
     protected final static String EVENTS_COUNT_COLUMN_TIP = Messages.TmfStatisticsView_NbEventsTip;
-
     /**
      * Level for which statistics should not be displayed.
      */
     protected Set<String> fFolderLevels = new HashSet<String>(Arrays.asList(new String[] { "Event Types" })); //$NON-NLS-1$
-
     /**
      * Create basic columns to represent the statistics data
      */
index 81c9d501afa841f1aa1f3e0ce3abefeabcfc8648..fd0b20a9482c871310b031431e27bd673f35ab2a 100755 (executable)
@@ -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
@@ -23,8 +23,11 @@ import org.eclipse.linuxtools.tmf.core.util.TmfFixedArray;
 import org.eclipse.linuxtools.tmf.ui.views.statistics.ITmfExtraEventInfo;
 
 /**
- * <h4>Store information about base statistics data</h4>
+ * Store information about base statistics data.
  * <p>This class provides a way to represent statistics data that is compatible to every kind of traces</p>
+ * 
+ * @version 1.0
+ * @author Mathieu Denis
  */
 public class TmfBaseStatisticsTree extends AbsTmfStatisticsTree {
 
@@ -44,8 +47,15 @@ public class TmfBaseStatisticsTree extends AbsTmfStatisticsTree {
      * </p>
      */
     protected static final String NODE = "z"; //$NON-NLS-1$
+    /**
+     * Root node key.
+     */
     protected static final String ROOT_NODE_KEY = mergeString(ROOT.get(0), NODE);
 
+    /**
+     * Default constructor. Creates base statistics tree for counting total
+     * number of events and number of events per event type.
+     */
     public TmfBaseStatisticsTree() {
         super();
         Map<String, Set<String>> keys = getKeys();
index 8d6ec5c10b5aaa16e6a24e81da130023dd12a3d1..6bac33eaec6f88f30baed76a5fe3385cf77bb787 100755 (executable)
@@ -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,6 +15,9 @@ package org.eclipse.linuxtools.tmf.ui.views.statistics.model;
 /**
  * <h4>Primitive container for Statistics data</h4>
  * <p>Contains information about statistics that can be retrieved with any kind of traces</p>
+ * 
+ * @version 1.0
+ * @author Mathieu Denis
  */
 public class TmfStatistics {
        /**
index cb7408336d86f7d8ab5f3810a5686fe2a2330edf..b81ee4d5275f211fae3d00a30ce7e9c1e94671f0 100755 (executable)
@@ -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
@@ -22,6 +22,9 @@ import org.eclipse.linuxtools.tmf.core.util.TmfFixedArray;
  * <h4>A tree where nodes can be accessed efficiently using paths.</h4>
  * 
  * <p>It works like file systems. Each node is identified by a key. A path is an array ({@link TmfFixedArray}) of String. The elements of the array represent the path from the root to this node.</p>
+ * 
+ * @version 1.0
+ * @author Mathieu Denis 
  */
 public class TmfStatisticsTreeNode {
        /**
index 24bdc65be9668c6fb6e381fc2c79581c22038265..02d8d745519379e047b0b39be2e3746dc1789c2a 100755 (executable)
@@ -15,6 +15,17 @@ package org.eclipse.linuxtools.tmf.ui.views.statistics.model;
 import java.util.HashMap;
 import java.util.Map;
 
+/**
+ * Factory class to create and store TMF statistic trees.
+ * 
+ * Based on a given tree node ID a TMF statistic tree is stored internally.
+ * A root node is created for each tree. Using the tree node ID the statistics 
+ * tree can be retrieved. 
+ * 
+ * @version 1.0
+ * @author Mathieu Denis
+ *
+ */
 public class TmfStatisticsTreeRootFactory {
 
     // -----------------------------------------------------------------------
index 39d36d0591ef5a3d6886067e0d9b72423f55409a..7174b3c9141dc96aa65151cf0b67aa461b98fee9 100755 (executable)
@@ -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
@@ -18,6 +18,8 @@ import org.eclipse.jface.viewers.Viewer;
 /**
  * Adapter TreeViewers can use to interact with StatisticsTreeNode objects.
  * 
+ * @version 1.0
+ * @author Mathieu Denis
  * @see org.eclipse.jface.viewers.ITreeContentProvider
  */
 public class TmfTreeContentProvider implements ITreeContentProvider {
This page took 0.08355 seconds and 5 git commands to generate.