Top Method Summary
Options Name Purpose
+ Consultingwerk.Studio.ProparseApi.INode FindChildNodeOfNodeType (INode, character) Searches for a child node of the given node with the matching node type
+ Consultingwerk.Studio.ProparseApi.INode FindChildNodeOfNodeTypeWithID (INode, character, character) Searches for a child node of the given node with the matching node type and ID childnode text
+ Consultingwerk.Studio.ProparseApi.INode FindFirstChildByPositionInCode (INode) Returns the first INode in a AST by position
+ Consultingwerk.Studio.ProparseApi.INode GetChildNodeByPath (INode, character) Returns the reference to the child node with the given node path
+ CHARACTER GetIdNodeText (INode) Returns the text of the ID node below the given Node
+ CHARACTER GetTypeName (NodeTypesEnum) Returns the type-name of the given NodeTypesEnum member
+ LOGICAL HasChildNodeOfNodeType (INode, NodeTypesEnum) Searches for a Childnode of the given node with the matching node type
+ LOGICAL HasChildNodeOfNodeTypeWithText (INode, character, character) Searches for a Childnode of the given node with the matching node type and text
+ initialize () Initializes proparse API
+ Consultingwerk.Studio.ProparseApi.IParseUnit ParseFile (character) Parses a file and returns the reference to the ParseUnit
+ CHARACTER ParseParameterList (INode) Parses the Parameter_list of a Method/Function/Event/Constructor node
+ CHARACTER ParseParameterList (INode, logical) Parses the Parameter_list of a Method/Function/Event/Constructor node
+ ReplaceRoutineNode (INode, longchar, logical, logical) Replaces a routine node (METHOD, CONSTRUCTOR, ...) with the given text

Top Property Summary
Options Name Purpose
+ LOGICAL Initialized


Method Detail
Top

PUBLIC Consultingwerk.Studio.ProparseApi.INode FindChildNodeOfNodeType (INode, character)

Purpose: Searches for a child node of the given node with the matching node type
Notes: This method does not work recursively, so only direct child nodes are
processed

Parameters:
poASTNode Consultingwerk.Studio.ProparseApi.INode
The parent INode
pcChildNodeType CHARACTER
The searched child not type as returned by ProparseHelper2:GetTypeName
Returns Consultingwerk.Studio.ProparseApi.INode
The found INode or the unknown value
Top

PUBLIC Consultingwerk.Studio.ProparseApi.INode FindChildNodeOfNodeTypeWithID (INode, character, character)

Purpose: Searches for a child node of the given node with the matching node type
and ID childnode text
Notes: This method does not work recursively, so only direct child nodes are
processed
Useful for finding

Parameters:
poASTNode Consultingwerk.Studio.ProparseApi.INode
The parent INode
pcChildNodeType CHARACTER
The searched child node type as returned by ProparseHelper2:GetTypeName
pcChildNodeID CHARACTER
The searched child node ID node value
Returns Consultingwerk.Studio.ProparseApi.INode
The found INode or the unknown value
Top

PUBLIC Consultingwerk.Studio.ProparseApi.INode FindFirstChildByPositionInCode (INode)

Purpose: Returns the first INode in a AST by position
Notes:

Parameters:
poNode Consultingwerk.Studio.ProparseApi.INode
The parent INode
Returns Consultingwerk.Studio.ProparseApi.INode
The found JPNode or the unknown value
Top

PUBLIC Consultingwerk.Studio.ProparseApi.INode GetChildNodeByPath (INode, character)

Purpose: Returns the reference to the child node with the given node path
Notes: Paths are separated either by / or \
Supported path references, samples
EQUAL\Field_ref\ID returns the ID node of an assignment
RECORD_NAME\WHERE\AND\AND\2\QSTRING - The quoted string "b" in FOR EACH Customer WHERE Customer.Name BEGINS "Lift" AND Customer.City BEGINS "b" AND Customer.Country = "USA": (the second node, a BEGINS is referenced by the 2)
2 - returns the second child of the parent node

Parameters:
poParentNode Consultingwerk.Studio.ProparseApi.INode
The reference to the parent INode
pcPath CHARACTER
The path reference
Returns Consultingwerk.Studio.ProparseApi.INode
The reference to the child INode with the given node path
Top

PUBLIC CHARACTER GetIdNodeText (INode)

Purpose: Returns the text of the ID node below the given Node
Notes: Returns ? when the given node does not contain an ID Node

Parameters:
poNode Consultingwerk.Studio.ProparseApi.INode
The parent node
Returns CHARACTER
The Text value of the ID node below the given node or ?
Top

PUBLIC CHARACTER GetTypeName (NodeTypesEnum)

Purpose: Returns the type-name of the given NodeTypesEnum member
Notes:

Parameters:
poType Consultingwerk.Studio.ProparseApi.NodeTypesEnum
The NodeTypesEnum member
Returns CHARACTER
The name of poType
Top

PUBLIC LOGICAL HasChildNodeOfNodeType (INode, NodeTypesEnum)

Purpose: Searches for a Childnode of the given node with the matching node type
Notes:

Parameters:
poNode Consultingwerk.Studio.ProparseApi.INode
The parent INode
poType Consultingwerk.Studio.ProparseApi.NodeTypesEnum
The searched child node type
Returns LOGICAL
True when a child node with the given node type exists
Top

PUBLIC LOGICAL HasChildNodeOfNodeTypeWithText (INode, character, character)

Purpose: Searches for a Childnode of the given node with the matching node type
and text
Notes: Useful for finding Annotations with Text = "@Annotation"

Parameters:
poASTNode Consultingwerk.Studio.ProparseApi.INode
The parent INode
pcChildNodeType CHARACTER
The searched child not type as returned by ProparseHelper2:GetTypeName
pcChildNodeText CHARACTER
The searched child node Text value
Returns LOGICAL
True when a child node with the given node type exists
Top

PUBLIC initialize ()

Purpose: Initializes proparse API
Notes:

Top

PUBLIC Consultingwerk.Studio.ProparseApi.IParseUnit ParseFile (character)

Purpose: Parses a file and returns the reference to the ParseUnit
Notes:

Parameters:
pcFilename CHARACTER
The name of the file to parse
Returns Consultingwerk.Studio.ProparseApi.IParseUnit
The proparse ParseUnit reference
Top

PUBLIC CHARACTER ParseParameterList (INode)

Purpose: Parses the Parameter_list of a Method/Function/Event/Constructor
node
Notes: Returns a value in the form "INPUT CHARACTER,OUTPUT INTEGER,OUTPUT DATASET-HANDLE"

Parameters:
poParentNode Consultingwerk.Studio.ProparseApi.INode
The reference to the INode of the Method/Function/Event/Constructor
Returns CHARACTER
The Character representation of the Parameter list
Top

PUBLIC CHARACTER ParseParameterList (INode, logical)

Purpose: Parses the Parameter_list of a Method/Function/Event/Constructor
node
Notes: Returns a value in the form "INPUT CHARACTER,OUTPUT INTEGER,OUTPUT DATASET-HANDLE"

Parameters:
poParentNode Consultingwerk.Studio.ProparseApi.INode
The reference to the INode of the Method/Function/Event/Constructor
plIncludeParameterName LOGICAL
Logical value indicating if the parameter name should be included as well
Returns CHARACTER
The Character representation of the Parameter list
Top

PUBLIC ReplaceRoutineNode (INode, longchar, logical, logical)

Purpose: Replaces a routine node (METHOD, CONSTRUCTOR, ...) with the given
text
Notes: Should not be called more than onces for a given Parse Unit as by replacing
a routine node all following line counts may become inaccurate
Optionally replaces the comments block (a single block) or any white
spaces that precedes the method block.
When replacing all white spaces preceding the routine node
(plReplaceAllLeadingHiddenText = TRUE) it is recommended, to start
the plcNewText with two new lines (~n~n)

Parameters:
poNode Consultingwerk.Studio.ProparseApi.INode
The INode to replace
plcNewText LONGCHAR
The new text for the node
plReplaceComments LOGICAL
Replaces comments preceding the node
plReplaceAllLeadingHiddenText LOGICAL
Replaces comments and all white spaces preceding the node


Property Detail
Top

PUBLIC LOGICAL Initialized


Returns LOGICAL


©2006-2025 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       20.01.2025 18:46:38