edu.rice.cs.hpc.viewer.scope.ScopeViewActions Class Reference

Class to manage the actions of the tree view such as zooms, flattening, resize the columns, etc. More...

Inheritance diagram for edu.rice.cs.hpc.viewer.scope.ScopeViewActions:
Inheritance graph
[legend]
Collaboration diagram for edu.rice.cs.hpc.viewer.scope.ScopeViewActions:
Collaboration graph
[legend]

List of all members.

Classes

class  HotCallPath
 Class to store the information on the tree item path. More...
interface  IActionType
class  RestoreMessageThread
 Class to restoring the background of the message bar by waiting for 5 seconds TODO: we need to parameterize the timing for the wait. More...

Public Types

enum  ActionType { ZoomIn, ZoomOut }

Public Member Functions

 ScopeViewActions (Shell shell, IWorkbenchWindow window, Composite parent, CoolBar coolbar)
 Constructor: create actions and the GUI (which is a coolbar).
void updateContent (Experiment exp, RootScope scope)
 The tree has been updated or has new content.
void setTreeViewer (ScopeTreeViewer tree)
 Update the content of tree viewer.
void showInfoMessage (String sMsg)
void showErrorMessage (String strMsg)
 Show an error message on the message bar (closed to the toolbar) and wait for 5 seconds before removing the message.
void showHotCallPath ()
 show the hot path below the selected node in the tree
Scope getSelectedNode ()
 Retrieve the selected node.
void zoomIn ()
 Zoom-in the children.
void zoomOut ()
 Zoom-out the node.
ScopeZoom getScopeZoom ()
 retrieve the class scope zoom of this object
void addExtNewMetric ()
 create a new metric based on a free expression
void resizeColumns ()
 Resize the columns.
String getContent (TreeItem[]items, String sSeparator)
 Retrieve the content of the table into a string.
String getContent (TreePath[]elements, String sSeparator)
 Function to copy all visible nodes into a buffer string.
boolean shouldZoomInBeEnabled (Scope node)
 Check if zoom-in button should be enabled.
boolean shouldZoomOutBeEnabled ()
 In case there is no selected node, we determine the zoom-out button can be enabled only and only if we have at least one item in the stack.
void checkNodeButtons ()
 Check if zooms and hot-path button need to be disabled or not This is required to solve bug no 132: https://outreach.scidac.gov/tracker/index.php?func=detail&aid=132&group_id=22&atid=169.
void disableButtons ()
 Disable buttons.
abstract void checkStates (Scope nodeSelected)
 An abstract method to be implemented: check the state of buttons for the selected node Each action (either caller view, calling context view or flat view) may have different implementation for this verification.
abstract void checkStates ()
void setColumnStatus (boolean[]status)

Static Public Attributes

static double fTHRESHOLD = 0.6

Protected Member Functions

abstract Composite createGUI (Composite parent, CoolBar coolbar)
 Each class has its own typical GUI creation.
void addTreeColumn (TreeColumn colMetric)
 add a new column for metric
abstract void registerAction (IActionType type)

Protected Attributes

ScopeTreeViewer treeViewer
RootScope myRootScope
ScopeZoom objZoom = null
IWorkbenchWindow objWindow
IScopeActionsGUI objActionsGUI
Composite parent
Shell objShell

Private Member Functions

HotCallPath getHotCallPath (TreePath pathItem, TreeItem item, Scope scope, BaseMetric metric, int iLevel)
 find the hot call path
Scope getInputNode ()
 Get the current input node.
void getContent (Scope objScope, String sSeparator, StringBuffer sbText)
 private function to copy a scope node into a buffer string

Detailed Description

Class to manage the actions of the tree view such as zooms, flattening, resize the columns, etc.

This class will add additional toolbar on the top of the tree. Therefore, it is necessary to instantiate this class before the creation of the tree, then call the method updateContent() to associate the action with the tree (once the tree is created). This looks somewhat stupid, but this is the fastest thing in my mind :-(

Author:
laksono

Definition at line 37 of file ScopeViewActions.java.


Member Enumeration Documentation

Enumerator:
ZoomIn 
ZoomOut 

Definition at line 46 of file ScopeViewActions.java.


Constructor & Destructor Documentation

edu.rice.cs.hpc.viewer.scope.ScopeViewActions.ScopeViewActions ( Shell  shell,
IWorkbenchWindow  window,
Composite  parent,
CoolBar  coolbar 
)

Constructor: create actions and the GUI (which is a coolbar).

Parameters:
viewSite the site of the view (used for retrieving shell, display, ...)
parent composite

Definition at line 55 of file ScopeViewActions.java.

References edu.rice.cs.hpc.viewer.scope.ScopeViewActions.createGUI(), edu.rice.cs.hpc.viewer.scope.ScopeActions.objActionsGUI, edu.rice.cs.hpc.viewer.scope.ScopeViewActions.objWindow, edu.rice.cs.hpc.viewer.scope.ScopeViewActions.objZoom, and edu.rice.cs.hpc.viewer.scope.ScopeViewActions.treeViewer.


Member Function Documentation

void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.addExtNewMetric (  ) 
void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.addTreeColumn ( TreeColumn  colMetric  )  [protected]
void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.checkNodeButtons (  )  [virtual]
abstract void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.checkStates (  )  [pure virtual]
abstract void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.checkStates ( Scope  nodeSelected  )  [pure virtual]

An abstract method to be implemented: check the state of buttons for the selected node Each action (either caller view, calling context view or flat view) may have different implementation for this verification.

Parameters:
nodeSelected 

Implemented in edu.rice.cs.hpc.viewer.scope.BaseScopeViewActions, and edu.rice.cs.hpc.viewer.scope.flat.FlatScopeViewActions.

Referenced by edu.rice.cs.hpc.viewer.scope.AbstractBaseScopeView.createPartControl().

abstract Composite edu.rice.cs.hpc.viewer.scope.ScopeViewActions.createGUI ( Composite  parent,
CoolBar  coolbar 
) [protected, pure virtual]
void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.disableButtons (  ) 
String edu.rice.cs.hpc.viewer.scope.ScopeViewActions.getContent ( TreePath[]  elements,
String  sSeparator 
)

Function to copy all visible nodes into a buffer string.

Parameters:
elements 
sSeparator 
Returns:

Definition at line 482 of file ScopeViewActions.java.

References edu.rice.cs.hpc.viewer.scope.ScopeViewActions.getContent().

void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.getContent ( Scope  objScope,
String  sSeparator,
StringBuffer  sbText 
) [private]
String edu.rice.cs.hpc.viewer.scope.ScopeViewActions.getContent ( TreeItem[]  items,
String  sSeparator 
)

Retrieve the content of the table into a string.

Parameters:
items (list of items to be exported)
colMetrics (hidden column not included)
sSeparator (separator)
Returns:
String: content of the table

Definition at line 427 of file ScopeViewActions.java.

References edu.rice.cs.hpc.viewer.scope.ScopeTreeViewer.getTextBasedOnColumnStatus(), and edu.rice.cs.hpc.viewer.scope.ScopeViewActions.treeViewer.

Referenced by edu.rice.cs.hpc.viewer.scope.AbstractBaseScopeView.copyToClipboard(), edu.rice.cs.hpc.viewer.scope.ScopeViewActionsGUI.exportCSV(), and edu.rice.cs.hpc.viewer.scope.ScopeViewActions.getContent().

HotCallPath edu.rice.cs.hpc.viewer.scope.ScopeViewActions.getHotCallPath ( TreePath  pathItem,
TreeItem  item,
Scope  scope,
BaseMetric  metric,
int  iLevel 
) [private]
Scope edu.rice.cs.hpc.viewer.scope.ScopeViewActions.getInputNode (  )  [private]
ScopeZoom edu.rice.cs.hpc.viewer.scope.ScopeViewActions.getScopeZoom (  ) 

retrieve the class scope zoom of this object

Returns:

Definition at line 332 of file ScopeViewActions.java.

References edu.rice.cs.hpc.viewer.scope.ScopeViewActions.objZoom.

Scope edu.rice.cs.hpc.viewer.scope.ScopeViewActions.getSelectedNode (  ) 
abstract void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.registerAction ( IActionType  type  )  [protected, pure virtual]
void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.resizeColumns (  )  [virtual]
void edu.rice.cs.hpc.viewer.scope.ScopeActions.setColumnStatus ( boolean[]  status  )  [inherited]
void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.setTreeViewer ( ScopeTreeViewer  tree  )  [virtual]
boolean edu.rice.cs.hpc.viewer.scope.ScopeViewActions.shouldZoomInBeEnabled ( Scope  node  ) 

Check if zoom-in button should be enabled.

Parameters:
node 
Returns:

Definition at line 506 of file ScopeViewActions.java.

References edu.rice.cs.hpc.viewer.scope.ScopeZoom.canZoomIn(), and edu.rice.cs.hpc.viewer.scope.ScopeViewActions.objZoom.

Referenced by edu.rice.cs.hpc.viewer.scope.AbstractBaseScopeView.fillContextMenu().

boolean edu.rice.cs.hpc.viewer.scope.ScopeViewActions.shouldZoomOutBeEnabled (  ) 

In case there is no selected node, we determine the zoom-out button can be enabled only and only if we have at least one item in the stack.

Returns:

Definition at line 515 of file ScopeViewActions.java.

References edu.rice.cs.hpc.viewer.scope.ScopeZoom.canZoomOut(), and edu.rice.cs.hpc.viewer.scope.ScopeViewActions.objZoom.

Referenced by edu.rice.cs.hpc.viewer.scope.AbstractBaseScopeView.fillContextMenu().

void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.showErrorMessage ( String  strMsg  ) 
void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.showHotCallPath (  ) 
void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.showInfoMessage ( String  sMsg  ) 
void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.updateContent ( Experiment  exp,
RootScope  scope 
) [virtual]
void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.zoomIn (  ) 
void edu.rice.cs.hpc.viewer.scope.ScopeViewActions.zoomOut (  ) 

Member Data Documentation

double edu.rice.cs.hpc.viewer.scope.ScopeActions.fTHRESHOLD = 0.6 [static, inherited]

Definition at line 22 of file ScopeActions.java.

Composite edu.rice.cs.hpc.viewer.scope.ScopeActions.parent [protected, inherited]

Definition at line 24 of file ScopeActions.java.


The documentation for this class was generated from the following file:

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1