Changeset 51 for branches/DelphiToC/Visual/USourceTree.pas
- Timestamp:
- Aug 9, 2010, 3:50:42 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DelphiToC/Visual/USourceTree.pas
r50 r51 6 6 7 7 uses 8 Classes, SysUtils, U PascalSource, ComCtrls;8 Classes, SysUtils, USourceCode, ComCtrls; 9 9 10 10 type … … 20 20 procedure AddNodeMethodList(Node: TTreeNode; Methods: TFunctionList); 21 21 procedure AddNodeParameterList(Node: TTreeNode; Parameters: TParameterList); 22 procedure AddNodeTypeRecord(Node: TTreeNode; TypeRecord: TTypeRecord); 22 23 procedure AddNodeTypeList(Node: TTreeNode; Types: TTypeList); 23 24 procedure AddNodeVariableList(Node: TTreeNode; Variables: TVariableList); … … 195 196 NewNode: TTreeNode; 196 197 NewNode2: TTreeNode; 198 NewNode3: TTreeNode; 197 199 I: Integer; 198 200 begin … … 202 204 with TType(Types[I]) do 203 205 if not System then begin 204 NewNode2 := TreeView.Items.AddChild(NewNode, Name + ' = '); 206 if TType(Types[I]) is TTypeRecord then begin 207 NewNode2 := TreeView.Items.AddChild(NewNode, Name + ' = record'); 208 AddNodeTypeRecord(NewNode2, TTypeRecord(Types[I])); 209 end else if Assigned(UsedType) then 210 NewNode2 := TreeView.Items.AddChild(NewNode, Name + ' = ' + UsedType.Name) 211 else NewNode2 := TreeView.Items.AddChild(NewNode, Name); 205 212 end; 206 213 end; … … 244 251 end; 245 252 253 procedure TSourceTree.AddNodeTypeRecord(Node: TTreeNode; TypeRecord: TTypeRecord 254 ); 255 var 256 NewNode: TTreeNode; 257 NewNode2: TTreeNode; 258 NewNode3: TTreeNode; 259 I: Integer; 260 begin 261 if TypeRecord.Items.Count > 0 then begin 262 for I := 0 to TypeRecord.Items.Count - 1 do 263 with TType(TypeRecord.Items[I]) do 264 if not System then begin 265 if TType(TypeRecord.Items[I]) is TTypeRecord then begin 266 NewNode2 := TreeView.Items.AddChild(NewNode, Name + ' = record'); 267 AddNodeTypeRecord(NewNode2, TTypeRecord(TypeRecord.Items[I])) 268 end else if Assigned(UsedType) then 269 NewNode2 := TreeView.Items.AddChild(NewNode, Name + ' = ' + UsedType.Name) 270 else NewNode2 := TreeView.Items.AddChild(NewNode, Name); 271 end; 272 end; 273 end; 274 246 275 procedure TSourceTree.AddNodeModule(Node: TTreeNode; Module: TModule); 247 276 var
Note:
See TracChangeset
for help on using the changeset viewer.