Changeset 47 for branches/DelphiToC/Visual/USourceTree.pas
- Timestamp:
- Aug 9, 2010, 12:48:14 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DelphiToC/Visual/USourceTree.pas
r44 r47 17 17 procedure AddNodeBeginEnd(Node: TTreeNode; BeginEnd: TBeginEnd); 18 18 procedure AddNodeIfThenElse(Node: TTreeNode; IfThenElse: TIfThenElse); 19 procedure AddNodeMethodCall(Node: TTreeNode; Method: T MethodCall);19 procedure AddNodeMethodCall(Node: TTreeNode; Method: TFunctionCall); 20 20 procedure AddNodeMethodList(Node: TTreeNode; Methods: TFunctionList); 21 procedure AddNodeParameterList(Node: TTreeNode; Parameters: TParameterList); 21 22 procedure AddNodeTypeList(Node: TTreeNode; Types: TTypeList); 22 23 procedure AddNodeVariableList(Node: TTreeNode; Variables: TVariableList); … … 82 83 end; 83 84 84 procedure TSourceTree.AddNodeMethodCall(Node: TTreeNode; Method: T MethodCall);85 var 86 NewNode: TTreeNode; 87 begin 88 NewNode := TreeView.Items.AddChild(Node, Method. Method.Name);85 procedure TSourceTree.AddNodeMethodCall(Node: TTreeNode; Method: TFunctionCall); 86 var 87 NewNode: TTreeNode; 88 begin 89 NewNode := TreeView.Items.AddChild(Node, Method.FunctionRef.Name); 89 90 end; 90 91 … … 103 104 if Command is TWhileDo then 104 105 AddNodeWhileDo(Node, TWhileDo(Command)); 105 if Command is T MethodCall then106 AddNodeMethodCall(Node, T MethodCall(Command));106 if Command is TFunctionCall then 107 AddNodeMethodCall(Node, TFunctionCall(Command)); 107 108 if Command is TIfThenElse then 108 109 AddNodeIfThenElse(Node, TIfThenElse(Command)); … … 186 187 for I := 0 to Methods.Count - 1 do 187 188 with TFunction(Methods[I]) do begin 188 NewNode := TreeView.Items.AddChild(Node, 'procedure ' + Name); 189 if HaveResult then 190 NewNode := TreeView.Items.AddChild(Node, 'function ' + Name) 191 else NewNode := TreeView.Items.AddChild(Node, 'procedure ' + Name); 192 AddNodeParameterList(NewNode, Parameters); 189 193 AddNodeMethodList(NewNode, Methods); 190 194 AddNodeConstantList(NewNode, Constants); … … 192 196 AddNodeTypeList(NewNode, Types); 193 197 AddNodeBeginEnd(NewNode, Code); 198 end; 199 end; 200 201 procedure TSourceTree.AddNodeParameterList(Node: TTreeNode; 202 Parameters: TParameterList); 203 var 204 I: Integer; 205 NewNode: TTreeNode; 206 begin 207 if Parameters.Count > 0 then begin 208 NewNode := TreeView.Items.AddChild(Node, 'parametery'); 209 for I := 0 to Parameters.Count - 1 do 210 with TParameter(Parameters[I]) do begin 211 TreeView.Items.AddChild(NewNode, Name + ': ' + ValueType.Name); 212 end; 194 213 end; 195 214 end;
Note:
See TracChangeset
for help on using the changeset viewer.