TPTP 4.2.0 Platform Project
Internal API Specification

org.eclipse.hyades.trace.views.internal
Class MultiLevelStatisticView

java.lang.Object
  extended byorg.eclipse.hyades.trace.views.internal.StatisticView
      extended byorg.eclipse.hyades.trace.views.internal.MultiLevelStatisticView
All Implemented Interfaces:
org.eclipse.swt.events.ControlListener, java.util.EventListener, org.eclipse.hyades.trace.ui.IViewSelectionChangedListener, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.internal.SWTEventListener
Direct Known Subclasses:
MemoryStatisticView, MultiLevelStatisticMethodView

public abstract class MultiLevelStatisticView
extends StatisticView


Nested Class Summary
 class MultiLevelStatisticView.MultiLevelStatisticContentProvider
          Gives the table tree viewer the mlserage elements to display
 class MultiLevelStatisticView.MultiLevelStatisticLabelProvider
          provides the table tree viewer: text and images for each coverage element to display
 class MultiLevelStatisticView.MultiLevelStatisticSorter
          Add a sorter to the coverage view
 
Nested classes inherited from class org.eclipse.hyades.trace.views.internal.StatisticView
StatisticView.StatisticFilter, StatisticView.StatisticSorter
 
Field Summary
protected  ContextInfoContainer _contextInfo
           
static int CLASS_LEVEL
           
static int DEFAULT_LEVEL
           
static int PACKAGE_LEVEL
           
static java.lang.String PREFERENCE_KEY_PREFIX
           
 
Fields inherited from class org.eclipse.hyades.trace.views.internal.StatisticView
_activeInst, _activeSize, _chooseColumnAction, _chooseColumnsAction, _currentColumns, _dataPane, _deltaColumns, _deltaColumnsAction, _filterContainer, _firstTime, _initialized, _isShowPercent, _layout, _listOfColumExtension, _maxTime, _newSelection, _page, _refresh, _showPercent, _sortByColumnAction, _templateOfColumExtension, _toolkit, _totalCalls, _totalInst, _totalSize, _updateAction, _viewComp, _viewContainer, _viewer, _viewerFilter, _viewerSorter, fSeparator, tmpList
 
Constructor Summary
MultiLevelStatisticView(org.eclipse.swt.widgets.Composite parent, org.eclipse.hyades.trace.ui.TraceViewerPage page)
           
MultiLevelStatisticView(org.eclipse.swt.widgets.Composite parent, org.eclipse.hyades.trace.ui.TraceViewerPage page, boolean initializeContent)
           
 
Method Summary
protected  boolean canOpenSourceOnThisObject()
          Try to see if the selected object is candidate for openSource
protected  org.eclipse.swt.widgets.Composite createControl(org.eclipse.swt.widgets.Composite parent, java.util.ArrayList cols)
           
protected  org.eclipse.swt.widgets.Composite createTree(org.eclipse.swt.widgets.Composite parent, int options)
          Create the table tree widget
 void dispose()
           
abstract  java.lang.String getColumnsPreferencesKey()
           
 java.lang.String getColumnsTemplateExtensions(int strColumnNumbers, java.lang.String matchView, boolean nullViewValue)
           
abstract  org.eclipse.jface.viewers.IContentProvider getContentProvider()
           
protected  org.eclipse.hyades.models.hierarchy.extensions.SimpleSearchQuery getCurrentFilter()
           
 java.lang.String getDefaultColumnsTemplate()
           
protected abstract  java.lang.String getDefaultColumnsTemplateClassLevel()
           
protected abstract  java.lang.String getDefaultColumnsTemplatePackageLevel()
           
protected abstract  StatisticView.StatisticFilter getFilterInstance()
           
protected  java.lang.Object getItemModelData(org.eclipse.swt.widgets.TreeItem item)
           
protected  org.eclipse.swt.widgets.TreeItem getItemsRoot(org.eclipse.swt.widgets.Tree tree)
           
abstract  int getLevel()
           
abstract  org.eclipse.jface.viewers.LabelProvider getTableLabelProvider()
           
 org.eclipse.swt.widgets.Tree getTree()
          return the table widget
protected  org.eclipse.jface.viewers.TreeViewer getTreeViewer(org.eclipse.swt.widgets.Tree tree)
           
protected abstract  StatisticView.StatisticSorter getViewerSorterInstance()
           
protected abstract  java.lang.String getViewTypeStr()
           
protected  void handleSelectionEvent()
          The same element must be selected in all the statistics views
 void handleViewSelectionChangedEvent(org.eclipse.hyades.trace.ui.ViewSelectionChangedEvent event)
          if the selection event is sent by the active tree: discard the event else handle it
 boolean isEmpty()
           
abstract  boolean isEmptyUpdate()
           
 void menuAboutToShow(org.eclipse.jface.action.IMenuManager menu)
          Called when the context menu is about to open.
protected  void openSourceForSelection(org.eclipse.jface.viewers.ISelection selection)
           
 void redrawTable()
          Redraw the tree to display the three levels (package level, class level and method level)
protected  void resetChooseColumnsAction()
          reset the choose column Action
protected  void resetColumns(java.util.ArrayList list)
          dispose the active columns and create others
protected  void searchInClassLevel(org.eclipse.swt.widgets.Tree tree, org.eclipse.swt.widgets.TreeItem item, org.eclipse.hyades.models.trace.TRCClass cls, org.eclipse.hyades.models.trace.TRCMethod meth, org.eclipse.hyades.models.trace.TRCObject trcObj)
          search the element to select in the class level tree
protected  void searchInLevel(org.eclipse.swt.widgets.Tree tree, org.eclipse.swt.widgets.TreeItem item, org.eclipse.hyades.models.trace.TRCPackage pack, org.eclipse.hyades.models.trace.TRCClass cls, org.eclipse.hyades.models.trace.TRCMethod meth, org.eclipse.hyades.models.trace.TRCObject trcObj)
           
protected  void searchInMethodLevel(org.eclipse.swt.widgets.Tree tree, org.eclipse.swt.widgets.TreeItem item, org.eclipse.hyades.models.trace.TRCMethod meth)
          search the element to select in the method level tree
protected  void searchInObjectLevel(org.eclipse.swt.widgets.Tree tree, org.eclipse.swt.widgets.TreeItem item, org.eclipse.hyades.models.trace.TRCObject obj)
          search the element to select in the object level tree
protected  void searchInPackageLevel(org.eclipse.swt.widgets.Tree tree, org.eclipse.swt.widgets.TreeItem item, org.eclipse.hyades.models.trace.TRCPackage pack, org.eclipse.hyades.models.trace.TRCClass cls, org.eclipse.hyades.models.trace.TRCMethod meth, org.eclipse.hyades.models.trace.TRCObject trcObj)
          search the element to select in the package level table
protected  org.eclipse.swt.widgets.TreeItem searchItem(org.eclipse.swt.widgets.TreeItem[] items, java.lang.Object obj)
           
abstract  void setLevel(int i)
           
 void update()
           
 void updateButtons()
           
 void updateModelSelection()
          Update the "model selection" when an element is selected in the tree
protected  void updateStatusContext(org.eclipse.hyades.ui.provisional.context.IContextLanguage language)
           
 void widgetSelected(org.eclipse.swt.events.SelectionEvent arg0)
          handle the selection event on: - A column for sorting - An element of the tree tree or - on the "Case-sensitive" button
 
Methods inherited from class org.eclipse.hyades.trace.views.internal.StatisticView
buildPreferenceStoreSring, compareElements, contextChanged, controlMoved, controlResized, createContent, createTreeViewer, expandFirstElement, firstTimeUpdate, getChooseColumnsAction, getColumnDataList, getColumnDisplayInfo, getColumnInfo, getContext, getContextHelpId, getControl, getDataPane, getDeltaColumnsAction, getElementColumnImage, getElementColumnText, getLayout, getShowPercentAction, getSortByColumnAction, getToolkit, getTraceViewerPage, getTreeViewer, getUpdateAction, getViewComponent, getViewerFilter, getViewerSorter, handleDeltaChanged, handlePercentChanged, isShowPercent, notifyViewSelectionChanged, parseExtensions, postUpdateEvents, refresh, selectionChanged, setLinesVisible, setNewSelection, setRedrawTable, showingDeltaColumns, showNewSelection, showPercentUpdate, updateContext, updateTableGetColumnNumber, updateUI, widgetDefaultSelected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_contextInfo

protected ContextInfoContainer _contextInfo

PACKAGE_LEVEL

public static final int PACKAGE_LEVEL
See Also:
Constant Field Values

CLASS_LEVEL

public static final int CLASS_LEVEL
See Also:
Constant Field Values

DEFAULT_LEVEL

public static final int DEFAULT_LEVEL
See Also:
Constant Field Values

PREFERENCE_KEY_PREFIX

public static java.lang.String PREFERENCE_KEY_PREFIX
Constructor Detail

MultiLevelStatisticView

public MultiLevelStatisticView(org.eclipse.swt.widgets.Composite parent,
                               org.eclipse.hyades.trace.ui.TraceViewerPage page,
                               boolean initializeContent)

MultiLevelStatisticView

public MultiLevelStatisticView(org.eclipse.swt.widgets.Composite parent,
                               org.eclipse.hyades.trace.ui.TraceViewerPage page)
Method Detail

isEmpty

public boolean isEmpty()

isEmptyUpdate

public abstract boolean isEmptyUpdate()

getColumnsPreferencesKey

public abstract java.lang.String getColumnsPreferencesKey()
Specified by:
getColumnsPreferencesKey in class StatisticView

getDefaultColumnsTemplatePackageLevel

protected abstract java.lang.String getDefaultColumnsTemplatePackageLevel()

getDefaultColumnsTemplateClassLevel

protected abstract java.lang.String getDefaultColumnsTemplateClassLevel()

getFilterInstance

protected abstract StatisticView.StatisticFilter getFilterInstance()

getContentProvider

public abstract org.eclipse.jface.viewers.IContentProvider getContentProvider()
Specified by:
getContentProvider in class StatisticView

getTableLabelProvider

public abstract org.eclipse.jface.viewers.LabelProvider getTableLabelProvider()
Specified by:
getTableLabelProvider in class StatisticView

getViewerSorterInstance

protected abstract StatisticView.StatisticSorter getViewerSorterInstance()
Specified by:
getViewerSorterInstance in class StatisticView

getLevel

public abstract int getLevel()

setLevel

public abstract void setLevel(int i)

getViewTypeStr

protected abstract java.lang.String getViewTypeStr()
Specified by:
getViewTypeStr in class StatisticView

createTree

protected org.eclipse.swt.widgets.Composite createTree(org.eclipse.swt.widgets.Composite parent,
                                                       int options)
Create the table tree widget

Specified by:
createTree in class StatisticView

getTreeViewer

protected org.eclipse.jface.viewers.TreeViewer getTreeViewer(org.eclipse.swt.widgets.Tree tree)
Specified by:
getTreeViewer in class StatisticView

openSourceForSelection

protected void openSourceForSelection(org.eclipse.jface.viewers.ISelection selection)
Overrides:
openSourceForSelection in class StatisticView

getTree

public org.eclipse.swt.widgets.Tree getTree()
return the table widget

Specified by:
getTree in class StatisticView

canOpenSourceOnThisObject

protected boolean canOpenSourceOnThisObject()
Try to see if the selected object is candidate for openSource


getColumnsTemplateExtensions

public java.lang.String getColumnsTemplateExtensions(int strColumnNumbers,
                                                     java.lang.String matchView,
                                                     boolean nullViewValue)

getDefaultColumnsTemplate

public java.lang.String getDefaultColumnsTemplate()
Specified by:
getDefaultColumnsTemplate in class StatisticView

handleSelectionEvent

protected void handleSelectionEvent()
The same element must be selected in all the statistics views

Specified by:
handleSelectionEvent in class StatisticView

getItemsRoot

protected org.eclipse.swt.widgets.TreeItem getItemsRoot(org.eclipse.swt.widgets.Tree tree)

searchInPackageLevel

protected void searchInPackageLevel(org.eclipse.swt.widgets.Tree tree,
                                    org.eclipse.swt.widgets.TreeItem item,
                                    org.eclipse.hyades.models.trace.TRCPackage pack,
                                    org.eclipse.hyades.models.trace.TRCClass cls,
                                    org.eclipse.hyades.models.trace.TRCMethod meth,
                                    org.eclipse.hyades.models.trace.TRCObject trcObj)
search the element to select in the package level table


searchInClassLevel

protected void searchInClassLevel(org.eclipse.swt.widgets.Tree tree,
                                  org.eclipse.swt.widgets.TreeItem item,
                                  org.eclipse.hyades.models.trace.TRCClass cls,
                                  org.eclipse.hyades.models.trace.TRCMethod meth,
                                  org.eclipse.hyades.models.trace.TRCObject trcObj)
search the element to select in the class level tree


searchInMethodLevel

protected void searchInMethodLevel(org.eclipse.swt.widgets.Tree tree,
                                   org.eclipse.swt.widgets.TreeItem item,
                                   org.eclipse.hyades.models.trace.TRCMethod meth)
search the element to select in the method level tree


searchInObjectLevel

protected void searchInObjectLevel(org.eclipse.swt.widgets.Tree tree,
                                   org.eclipse.swt.widgets.TreeItem item,
                                   org.eclipse.hyades.models.trace.TRCObject obj)
search the element to select in the object level tree


searchInLevel

protected void searchInLevel(org.eclipse.swt.widgets.Tree tree,
                             org.eclipse.swt.widgets.TreeItem item,
                             org.eclipse.hyades.models.trace.TRCPackage pack,
                             org.eclipse.hyades.models.trace.TRCClass cls,
                             org.eclipse.hyades.models.trace.TRCMethod meth,
                             org.eclipse.hyades.models.trace.TRCObject trcObj)

getItemModelData

protected java.lang.Object getItemModelData(org.eclipse.swt.widgets.TreeItem item)

searchItem

protected org.eclipse.swt.widgets.TreeItem searchItem(org.eclipse.swt.widgets.TreeItem[] items,
                                                      java.lang.Object obj)

updateModelSelection

public void updateModelSelection()
Update the "model selection" when an element is selected in the tree

Specified by:
updateModelSelection in class StatisticView

handleViewSelectionChangedEvent

public void handleViewSelectionChangedEvent(org.eclipse.hyades.trace.ui.ViewSelectionChangedEvent event)
if the selection event is sent by the active tree: discard the event else handle it


menuAboutToShow

public void menuAboutToShow(org.eclipse.jface.action.IMenuManager menu)
Called when the context menu is about to open.

Overrides:
menuAboutToShow in class StatisticView
See Also:
IFillMenuTarget#fillContextMenu

redrawTable

public void redrawTable()
Redraw the tree to display the three levels (package level, class level and method level)


widgetSelected

public void widgetSelected(org.eclipse.swt.events.SelectionEvent arg0)
handle the selection event on: - A column for sorting - An element of the tree tree or - on the "Case-sensitive" button

Specified by:
widgetSelected in interface org.eclipse.swt.events.SelectionListener
Overrides:
widgetSelected in class StatisticView

resetColumns

protected void resetColumns(java.util.ArrayList list)
dispose the active columns and create others

Overrides:
resetColumns in class StatisticView

resetChooseColumnsAction

protected void resetChooseColumnsAction()
reset the choose column Action


dispose

public void dispose()
Overrides:
dispose in class StatisticView

updateButtons

public void updateButtons()
Specified by:
updateButtons in class StatisticView

update

public void update()
Overrides:
update in class StatisticView

getCurrentFilter

protected org.eclipse.hyades.models.hierarchy.extensions.SimpleSearchQuery getCurrentFilter()

createControl

protected org.eclipse.swt.widgets.Composite createControl(org.eclipse.swt.widgets.Composite parent,
                                                          java.util.ArrayList cols)
Overrides:
createControl in class StatisticView

updateStatusContext

protected void updateStatusContext(org.eclipse.hyades.ui.provisional.context.IContextLanguage language)

TPTP 4.2.0 Platform Project
Internal API Specification