1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-25 02:32:19 -05:00

The functionlist wasn't being filled anymore..

This commit is contained in:
Raymond 2010-04-15 16:35:27 +02:00
parent e68dab9280
commit 1e0ccf34ef

View File

@ -85,7 +85,10 @@ procedure TFunctionListFrame.FillThreadTerminate(Sender: TObject);
begin begin
FillThread.Analyzer.Free; FillThread.Analyzer.Free;
{ Don't free the thread when it is already stopped... This causes deadlocks? } { Don't free the thread when it is already stopped... This causes deadlocks? }
//FreeAndNil(FillThread); {$IFDEF Linux}
KillThread(FillThread.Handle);
{$ENDIF}
FreeAndNil(FillThread);
ScriptNode.Expand(true); ScriptNode.Expand(true);
FunctionList.EndUpdate; FunctionList.EndUpdate;
if Filtering then if Filtering then
@ -448,11 +451,11 @@ end;
{ TFillThread } { TFillThread }
procedure TFillThread.execute; procedure TFillThread.execute;
procedure AddProcsTree(Node : TTreeNode; Procs : TDeclarationList; Path : string); procedure AddProcsTree(Node : TTreeNode; Procs : TDeclarationList; Path : string);
var var
i : integer; i : integer;
tmpNode : TTreeNode; tmpNode : TTreeNode;
begin; begin;
if procs = nil then if procs = nil then
exit; exit;
for i := 0 to Procs.Count - 1 do for i := 0 to Procs.Count - 1 do
@ -470,19 +473,19 @@ begin;
EndPos := name.StartPos + Length(TrimRight(name.RawText)); EndPos := name.StartPos + Length(TrimRight(name.RawText));
end; end;
end; end;
end; end;
procedure AddIncludes(ParentNode : TTreeNode; Include : TCodeInsight); procedure AddIncludes(ParentNode : TTreeNode; Include : TCodeInsight);
var var
i : integer; i : integer;
begin; begin;
parentNode := FunctionList^.Items.AddChild( parentNode := FunctionList^.Items.AddChild(
IncludesNode,ExtractFileNameOnly( IncludesNode,ExtractFileNameOnly(
Include.FileName)); Include.FileName));
AddProcsTree(parentNode,Include.Items,Include.FileName); AddProcsTree(parentNode,Include.Items,Include.FileName);
for i := 0 to high(Include.Includes) do for i := 0 to high(Include.Includes) do
AddIncludes(ParentNode,Include.Includes[i]) AddIncludes(ParentNode,Include.Includes[i])
end; end;
var var
i : integer; i : integer;
begin begin