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:
parent
e68dab9280
commit
1e0ccf34ef
@ -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,41 +451,41 @@ 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
|
||||||
if (Procs[i] is TciProcedureDeclaration) then
|
if (Procs[i] is TciProcedureDeclaration) then
|
||||||
with Procs[i] as TciProcedureDeclaration do
|
with Procs[i] as TciProcedureDeclaration do
|
||||||
begin
|
|
||||||
tmpNode := FunctionList^.Items.AddChild(Node,name.ShortText);
|
|
||||||
tmpNode.Data := GetMem(SizeOf(TMethodInfo));
|
|
||||||
FillChar(PMethodInfo(tmpNode.Data)^,SizeOf(TMethodInfo),0);
|
|
||||||
with PMethodInfo(tmpNode.Data)^ do
|
|
||||||
begin
|
begin
|
||||||
MethodStr := strnew(Pchar(CleanDeclaration));
|
tmpNode := FunctionList^.Items.AddChild(Node,name.ShortText);
|
||||||
Filename:= strnew(pchar(path));
|
tmpNode.Data := GetMem(SizeOf(TMethodInfo));
|
||||||
BeginPos:= name.StartPos ;
|
FillChar(PMethodInfo(tmpNode.Data)^,SizeOf(TMethodInfo),0);
|
||||||
EndPos := name.StartPos + Length(TrimRight(name.RawText));
|
with PMethodInfo(tmpNode.Data)^ do
|
||||||
|
begin
|
||||||
|
MethodStr := strnew(Pchar(CleanDeclaration));
|
||||||
|
Filename:= strnew(pchar(path));
|
||||||
|
BeginPos:= name.StartPos ;
|
||||||
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user