Ignore:
Timestamp:
Aug 10, 2010, 1:48:38 PM (14 years ago)
Author:
george
Message:

Fix: View proper source file after click to error message.
Made partial changes to support unit interface and implementation sections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DelphiToC/Produce/UProducerTreeView.pas

    r54 r55  
    284284  TypeName: string;
    285285begin
    286   case Module.ModuleType of
    287     mdPackage: TypeName := 'package';
    288     mdProgram: TypeName := 'program';
    289     mdUnit: TypeName := 'unit';
    290     mdLibrary: TypeName := 'library';
    291   end;
    292   NewNode := TreeView.Items.AddChild(Node, TypeName + ' ' + Module.Name);
    293   AddNodeUses(NewNode, Module.UsedModules);
    294   AddNodeMethodList(NewNode, Module.Functions);
    295   AddNodeConstantList(NewNode, Module.Constants);
    296   AddNodeVariableList(NewNode, Module.Variables);
    297   AddNodeTypeList(NewNode, Module.Types);
    298   AddNodeBeginEnd(NewNode, Module.Code);
     286  if Module is TModulePackage then TypeName := 'package'
     287  else if Module is TModuleProgram then
     288  with TModuleProgram(Module) do begin
     289    TypeName := 'program';
     290    NewNode := TreeView.Items.AddChild(Node, TypeName + ' ' + Module.Name);
     291    AddNodeUses(NewNode, UsedModules);
     292    AddNodeMethodList(NewNode, Body.Functions);
     293    AddNodeConstantList(NewNode, Body.Constants);
     294    AddNodeVariableList(NewNode, Body.Variables);
     295    AddNodeTypeList(NewNode, Body.Types);
     296    AddNodeBeginEnd(NewNode, Body.Code);
     297  end else if Module is TModuleUnit then TypeName := 'unit'
     298  else if Module is TModuleLibrary then TypeName := 'library';
     299
    299300end;
    300301
Note: See TracChangeset for help on using the changeset viewer.