Namespace: Consultingwerk.Studio.Refactor.CallgraphGui
Class 
CallgraphTreeViewControl Copy to Clipboard
Parent classes:
Inherits: Progress.Windows.UserControl

File:CallgraphTreeViewControl
Purpose:Visualizes the Callgraph in a tree view
Author(s):Sebastian Wandel / Consultingwerk Ltd.
Created:Thu Aug 06 09:24:39 CEST 2020



Top Method Summary
Options Name Purpose
+ ActivateCallNode (character, character, character, character) Activates a call-node going from a source-routine to a target-routine
+ ActivateNode (character) Activates the first UltraTreeNode that maps to a given guid from the callgraph
- ActivateNode (UltraTreeNode) Selects and activates a given node
- LOGICAL ActivateRoutineNode (character, character, character, UltraTreeNode) Selects and activates a routine node in the tree
- AddCall (TreeNodesCollection, character, character) Adds an UltraTreeNode for a call to a given Collection
- AddCall (UltraTreeNode, character, character, character) Adds a new call for an entry in an eCall.Blocks field
- AddTreeToNode (UltraTreeNode) Helper method that adds a new tree after a call-node
+ Bind (dataset) Binds to a given dataset
- LOGICAL CompareCharacterCell (UltraTreeNode, character, character) Compares a UltraTreeNodes cell of type string with a given character
- CreateBlock (TreeNodesCollection, character) Creates UltraTreeNodes for a Block with a given BlockGuid and its child-blocks in a given TreeNodesCollection
- CreateTree (dataset, TreeNodesCollection, character) Creates the tree view for a dataset
- Infragistics.Win.UltraWinTree.UltraTreeNode FindCall (character, character, UltraTreeNode) Helper method that finds and returns a call node for a given file and routine name
- org.prorefactor.core.JPNode FindNodeWithLineNum (JPNode, integer) Helper method that recursively searches for a JPNode at a given line number
- Infragistics.Win.UltraWinTree.UltraTreeNode FindRoutine (character, character, UltraTreeNode) Helper method that finds and returns a routine node for a given file and routine name
# Infragistics.Win.UltraWinTree.UltraTreeNode FindTreeNodeByTag (character, UltraTreeNode) Finds a tree node by its Tag
+ org.prorefactor.core.JPNode GetActiveNode () Returns the JPNode corresponding to the active TreeNode
+ CHARACTER GetActiveNodeFilename () Helper method that returns the filename of the active node
# CHARACTER GetNodeTagTempTableGuid (UltraTreeNode) Returns the guid of the temp-table-record this node corresponds to
# CHARACTER GetNodeTagTempTableName (UltraTreeNode) Returns the name of the temp-table this node corresponds to
- org.prorefactor.core.JPNode GetNodeWithNum (JPNode, integer) Returns the JPNode with a given node number
- System.Drawing.Image GetQualifications (UltraTreeNode) Helper method that returns the qualification-image for a given node
- CHARACTER GetType (character) Helper method that returns the type of an eRoutine record using its RoutineGuid
- LOGICAL HasNodeWithColumnValue (TreeNodesCollection, character, character) Checks whether a TreeNodesCollection contains a node with a given value in a given column
- LOGICAL HasNodeWithTag (TreeNodesCollection, character) Checks whether a TreeNodesCollection contains a node with a given guid
+ HideUncalledRoutines (logical, character) Hides/Shows routines nodes based on whether they are called from the parsed file or its called routines
+ IncludeBlocks (logical, character) Sets the DetailLevel and rebuilds the tree
# IncomingCallsDefaultActionHandler (Object, IncomingCallsDefaultActionEventArgs) Handler for the IncomingCallsDefaultActionEvent published by the IncomingCallsForm
+ InheritedDependencies (logical) Sets the local variable for the current button-state and refreshes the qualification images
- InitializeComponent () Initializes the visual design
+ LoadTree (dataset, character) Loads the TreeView for a new Callgraph
+ LocateInTreeView (character, integer) Locates a routine node in the tree that is in a given file and at a given line number
- MapQualifications (UltraTreeNode) Helper method that finds the target routines for all calls that do not have qualification-images yet
- RefreshQualifications () Refreshes the qualifications of routines and blocks with those inherited from other routines
+ RefreshTree () Refreshes the Tree
- SelectChild (UltraTreeNode, character, UltraTreeNode) Finds and selects a child-node of a given type based on a given target node.
# SetFileImages (UltraTreeNode) Sets the images for the file cells based on the filetype
- SetUnknownTypes (UltraTreeNode) Sets the type-cell for nodes where this is still unknown.
- ultraTree1_BeforeExpand (Object, CancelableNodeEventArgs) Event handler for the BeforeExpand event of the UltraTree
- ultraTree1_DoubleClick (Object, EventArgs) Event handler for the DoubleClick event in the ultra tree
+ ViewIncomingCalls () Displays a list of incloming calls for the currently selected routine node

Top Constructor Summary
Options Name Purpose
+ CallgraphTreeViewControl () Constructor of the CallgraphTreeViewControl class


Method Detail
Top

PUBLIC ActivateCallNode (character, character, character, character)

Purpose: Activates a call-node going from a source-routine to a target-routine
Notes:

Parameters:
pcSourceFile CHARACTER
File from which the call is made
pcSourceRoutineName CHARACTER
Routine that made the call
pcTargetFile CHARACTER
File to which the call is made
pcTargetRoutineName CHARACTER
Routine that is bein called
Top

PUBLIC ActivateNode (character)

Purpose: Activates the first UltraTreeNode that maps to a given guid from the callgraph
Notes:

Parameters:
pcGuid CHARACTER
Guid of a record from the dsCallgraph dataset
Top

PRIVATE ActivateNode (UltraTreeNode)

Purpose: Selects and activates a given node
Notes:

Parameters:
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
The Node to activate
Top

PRIVATE LOGICAL ActivateRoutineNode (character, character, character, UltraTreeNode)

Purpose: Selects and activates a routine node in the tree
Notes:

Parameters:
pcFile CHARACTER
Name of the file of the routine
pcName CHARACTER
Name of the routine
pcType CHARACTER
Type of the routine
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
The Node from which the search starts, ? for TopNode
Returns LOGICAL
TRUE if the routine could be activated, else false
Top

PRIVATE AddCall (TreeNodesCollection, character, character)

Purpose: Adds an UltraTreeNode for a call to a given Collection
Notes:

Parameters:
poNodes Infragistics.Win.UltraWinTree.TreeNodesCollection
The collection to add the node to
pcCallGuid CHARACTER
The guid of the call to add
pcProgramName CHARACTER
The content of the Prog cell of the new node
Top

PRIVATE AddCall (UltraTreeNode, character, character, character)

Purpose: Adds a new call for an entry in an eCall.Blocks field
Notes:

Parameters:
poRoutineNode Infragistics.Win.UltraWinTree.UltraTreeNode
The node for the routine to add the call under
pcCallGuid CHARACTER
The guid of the call to add
pcEntry CHARACTER
The current entry in eCall.Blocks
pcProgramName CHARACTER
The content of the Prog cell of the new node
Top

PRIVATE AddTreeToNode (UltraTreeNode)

Purpose: Helper method that adds a new tree after a call-node
Notes:

Parameters:
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
The call-node that will be the parent of the new tree
Top

PUBLIC Bind (dataset)

Purpose: Binds to a given dataset
Notes:

Parameters:
dsCallgraph DATASET dsCallgraph
The dataset to bind to
Top

PRIVATE LOGICAL CompareCharacterCell (UltraTreeNode, character, character)

Purpose: Compares a UltraTreeNodes cell of type string with a given character
Notes:

Parameters:
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
Node which is to be compared
pcCell CHARACTER
Key of the cell to compare
pcComp CHARACTER
The character to compare the cell with
Returns LOGICAL
TRUE/FALSE result of comparison between cell-value and pcComp, ? if pcCell, poNode or its cell are invalid
Top

PRIVATE CreateBlock (TreeNodesCollection, character)

Purpose: Creates UltraTreeNodes for a Block with a given BlockGuid and its child-blocks in a given TreeNodesCollection
Notes:

Parameters:
poNodes Infragistics.Win.UltraWinTree.TreeNodesCollection
The TreeNodesCollection to create the new block in
pcBlockGuid CHARACTER
The BlockGuid of the block
Top

PRIVATE CreateTree (dataset, TreeNodesCollection, character)

Purpose: Creates the tree view for a dataset
Notes: This method only adds the nodes of a given file.

Parameters:
dsCallgraph DATASET dsCallgraph
dsCallgraph Dataset from which the tree view nodes are created
poNodes Infragistics.Win.UltraWinTree.TreeNodesCollection
NodesCollection tor which the new tree is added
pcFilename CHARACTER
Name of the file that is added to the tree
Top

PRIVATE Infragistics.Win.UltraWinTree.UltraTreeNode FindCall (character, character, UltraTreeNode)

Purpose: Helper method that finds and returns a call node for a given file and routine name
Notes:

Parameters:
pcFile CHARACTER
Filename for sougth node
pcCalled CHARACTER
Name of called routine
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
The node from which the search starts, ? for TopNode
Returns Infragistics.Win.UltraWinTree.UltraTreeNode
UltraTreeNode for pcRoutine in pcFile or ? if none were found
Top

PRIVATE org.prorefactor.core.JPNode FindNodeWithLineNum (JPNode, integer)

Purpose: Helper method that recursively searches for a JPNode at a given line number
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The node from which the search starts.
piLine INTEGER
The line number for which a node is sougth.
Returns org.prorefactor.core.JPNode
The JPNode with line number piLine or ? if its not found
Top

PRIVATE Infragistics.Win.UltraWinTree.UltraTreeNode FindRoutine (character, character, UltraTreeNode)

Purpose: Helper method that finds and returns a routine node for a given file and routine name
Notes:

Parameters:
pcFile CHARACTER
Filename for sougth node
pcRoutine CHARACTER
Name of sougth routine node, empty or ? for main
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
The node from which the search starts, ? for TopNode
Returns Infragistics.Win.UltraWinTree.UltraTreeNode
UltraTreeNode for pcRoutine in pcFile or ? if none were found
Top

PROTECTED Infragistics.Win.UltraWinTree.UltraTreeNode FindTreeNodeByTag (character, UltraTreeNode)

Purpose: Finds a tree node by its Tag
Notes:

Parameters:
pcGuid CHARACTER
The Guid part of the Tag of the sought node
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
The node at which the search starts, ? for top-node
Returns Infragistics.Win.UltraWinTree.UltraTreeNode
The node with the given tag or ? if there is none
Top

PUBLIC org.prorefactor.core.JPNode GetActiveNode ()

Purpose: Returns the JPNode corresponding to the active TreeNode
Notes:

Returns org.prorefactor.core.JPNode
The active tree node
Top

PUBLIC CHARACTER GetActiveNodeFilename ()

Purpose: Helper method that returns the filename of the active node
Notes:

Returns CHARACTER
Filename of the active node or ? if no node is active
Top

PROTECTED CHARACTER GetNodeTagTempTableGuid (UltraTreeNode)

Purpose: Returns the guid of the temp-table-record this node corresponds to
Notes: Uses the nodes tag property

Parameters:
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
The node whose tag is read
Returns CHARACTER
The temp-table-records guids part of poNodes tag
Top

PROTECTED CHARACTER GetNodeTagTempTableName (UltraTreeNode)

Purpose: Returns the name of the temp-table this node corresponds to
Notes: Uses the nodes tag property

Parameters:
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
The node whose tag is read
Returns CHARACTER
The temp-table part of poNodes tag
Top

PRIVATE org.prorefactor.core.JPNode GetNodeWithNum (JPNode, integer)

Purpose: Returns the JPNode with a given node number
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode to start the search from
piNum INTEGER
The NodeNum of the sought JPNode
Returns org.prorefactor.core.JPNode
The found JPNode
Top

PRIVATE System.Drawing.Image GetQualifications (UltraTreeNode)

Purpose: Helper method that returns the qualification-image for a given node
Notes:

Parameters:
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
The node for which the qualification is sought.
Returns System.Drawing.Image
Image with the nodes qualification
Top

PRIVATE CHARACTER GetType (character)

Purpose: Helper method that returns the type of an eRoutine record using its RoutineGuid
Notes:

Parameters:
pcGuid CHARACTER
Guid of the eRoutine record
Returns CHARACTER
The routines type or ? if it was not found
Top

PRIVATE LOGICAL HasNodeWithColumnValue (TreeNodesCollection, character, character)

Purpose: Checks whether a TreeNodesCollection contains a node with a given value in a given column
Notes:

Parameters:
poNodes Infragistics.Win.UltraWinTree.TreeNodesCollection
The TreeNodesCollection to check
pcColumn CHARACTER
The column to check for
pcValue CHARACTER
The value to check the column for
Returns LOGICAL
Whether poNodes has a node that has pcValue in column pcColumn
Top

PRIVATE LOGICAL HasNodeWithTag (TreeNodesCollection, character)

Purpose: Checks whether a TreeNodesCollection contains a node with a given guid
Notes:

Parameters:
poNodes Infragistics.Win.UltraWinTree.TreeNodesCollection
The TreeNodesCollection to check
pcGuid CHARACTER
The guid to check for
Returns LOGICAL
Whether poNodes contains a node with guid pcGuid
Top

PUBLIC HideUncalledRoutines (logical, character)

Purpose: Hides/Shows routines nodes based on whether they are called from the parsed file or its called routines
Notes:

Parameters:
plHideUncalledRoutines LOGICAL
Determines whether routines are hidden (true) or shown (false)
pcFilename CHARACTER
Name of the current file
Top

PUBLIC IncludeBlocks (logical, character)

Purpose: Sets the DetailLevel and rebuilds the tree
Notes:

Parameters:
plIncludeBlocks LOGICAL
Whether blocks are being included in the callgraph
pcFilename CHARACTER
The name of the current file
Top

PROTECTED IncomingCallsDefaultActionHandler (Object, IncomingCallsDefaultActionEventArgs)

Purpose: Handler for the IncomingCallsDefaultActionEvent published by the IncomingCallsForm
Notes:

Parameters:
sender System.Object
Reference of the IncomingCallsForm
e Consultingwerk.Studio.Refactor.CallgraphGui.IncomingCallsDefaultActionEventArgs
Arguments with the necessary information
Top

PUBLIC InheritedDependencies (logical)

Purpose: Sets the local variable for the current button-state and refreshes the qualification images
Notes:

Parameters:
plButtonChecked LOGICAL
The current state of the "Inherited Dependencies" button
Top

PRIVATE InitializeComponent ()

Purpose: Initializes the visual design
Notes:

Top

PUBLIC LoadTree (dataset, character)

Purpose: Loads the TreeView for a new Callgraph
Notes:

Parameters:
dsCallgraph DATASET dsCallgraph
Dataset containing the Callgraph
pcFilename CHARACTER
Name of the current file
Top

PUBLIC LocateInTreeView (character, integer)

Purpose: Locates a routine node in the tree that is in a given file and at a given line number
Notes:

Parameters:
pcFilename CHARACTER
Name of the file
piLine INTEGER
Line at which the node is
Top

PRIVATE MapQualifications (UltraTreeNode)

Purpose: Helper method that finds the target routines for all calls that do
not have qualification-images yet
Notes:

Parameters:
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
The Node from which the search starts, ? for the TopNode
Top

PRIVATE RefreshQualifications ()

Purpose: Refreshes the qualifications of routines and blocks with those inherited from other routines
Notes:

Top

PUBLIC RefreshTree ()

Purpose: Refreshes the Tree
Notes:

Top

PRIVATE SelectChild (UltraTreeNode, character, UltraTreeNode)

Purpose: Finds and selects a child-node of a given type based on a given target node.
Notes:

Parameters:
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
The node from which the search starts
pcType CHARACTER
Type of the sought node
poTarget Infragistics.Win.UltraWinTree.UltraTreeNode
The target node that is used to find the correct child-node
Top

PROTECTED SetFileImages (UltraTreeNode)

Purpose: Sets the images for the file cells based on the filetype
Notes:

Parameters:
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
Currently processed node
Top

PRIVATE SetUnknownTypes (UltraTreeNode)

Purpose: Sets the type-cell for nodes where this is still unknown.
Notes:

Parameters:
poNode Infragistics.Win.UltraWinTree.UltraTreeNode
The Node from which the search starts, ? for the TopNode
Top

PRIVATE ultraTree1_BeforeExpand (Object, CancelableNodeEventArgs)

Purpose: Event handler for the BeforeExpand event of the UltraTree
Notes: Removes dummies and adds trees of called routines

Parameters:
sender System.Object
The reference to the object that raised the event
e Infragistics.Win.UltraWinTree.CancelableNodeEventArgs
The CancelableNodeEventArgs containing information about the nodes being expanded
Top

PRIVATE ultraTree1_DoubleClick (Object, EventArgs)

Purpose: Event handler for the DoubleClick event in the ultra tree
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e System.EventArgs
The EventArgs with the data for this event
Top

PUBLIC ViewIncomingCalls ()

Purpose: Displays a list of incloming calls for the currently selected routine node
Notes:



Constructor Detail
Top

PUBLIC CallgraphTreeViewControl ()

Purpose: Constructor of the CallgraphTreeViewControl class
Notes:



ProDataset Detail

ProDataset dsCallgraph

Member tables: eProgram, eRoutine, eBlock, eCall


Temp-Table Detail

Temp-Table eBlock

Defined in:

Temp-Table eCall

Defined in:

Temp-Table eProgram

Defined in:

Temp-Table eRoutine

Defined in:


©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       15.04.2024 06:16:14