mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-28 17:09:23 +02:00
codetools: clean up
git-svn-id: trunk@50048 -
This commit is contained in:
parent
e6714b1468
commit
12645682d5
@ -270,8 +270,6 @@ type
|
|||||||
SourceChangeCache: TSourceChangeCache): boolean;
|
SourceChangeCache: TSourceChangeCache): boolean;
|
||||||
function AddPublishedVariable(const UpperClassName,VarName, VarType: string;
|
function AddPublishedVariable(const UpperClassName,VarName, VarType: string;
|
||||||
SourceChangeCache: TSourceChangeCache): boolean; override;
|
SourceChangeCache: TSourceChangeCache): boolean; override;
|
||||||
function GatherPublishedMethods(ClassNode: TCodeTreeNode;
|
|
||||||
out ListOfPFindContext: TFPList): boolean;
|
|
||||||
|
|
||||||
// graph of definitions of a unit
|
// graph of definitions of a unit
|
||||||
function GatherUnitDefinitions(out TreeOfCodeTreeNodeExt: TAVLTree;
|
function GatherUnitDefinitions(out TreeOfCodeTreeNodeExt: TAVLTree;
|
||||||
@ -5656,20 +5654,9 @@ var
|
|||||||
s: TPascalClassSection;
|
s: TPascalClassSection;
|
||||||
|
|
||||||
procedure GatherClassProcs;
|
procedure GatherClassProcs;
|
||||||
var
|
|
||||||
PublishedMethods: TFPList;
|
|
||||||
begin
|
begin
|
||||||
// gather existing proc definitions in the class
|
// gather existing proc definitions in the class
|
||||||
if ClassProcs=nil then begin
|
if ClassProcs=nil then begin
|
||||||
PublishedMethods:=nil;
|
|
||||||
try
|
|
||||||
{$IFDEF EnableInheritedEmptyMethods}
|
|
||||||
DebugLn(['GatherClassProcs EnableInheritedEmptyMethods']);
|
|
||||||
GatherPublishedMethods(FCompletingStartNode,PublishedMethods);
|
|
||||||
{$ENDIF}
|
|
||||||
finally
|
|
||||||
FreeListOfPFindContext(PublishedMethods);
|
|
||||||
end;
|
|
||||||
ClassProcs:=GatherProcNodes(FCompletingFirstEntryNode,
|
ClassProcs:=GatherProcNodes(FCompletingFirstEntryNode,
|
||||||
[phpInUpperCase,phpAddClassName],
|
[phpInUpperCase,phpAddClassName],
|
||||||
ExtractClassName(CodeCompleteClassNode,true));
|
ExtractClassName(CodeCompleteClassNode,true));
|
||||||
@ -6768,28 +6755,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCodeCompletionCodeTool.GatherPublishedMethods(
|
|
||||||
ClassNode: TCodeTreeNode; out ListOfPFindContext: TFPList): boolean;
|
|
||||||
var
|
|
||||||
Ancestors: TFPList; // list of PFindContext
|
|
||||||
i: Integer;
|
|
||||||
Context: PFindContext;
|
|
||||||
begin
|
|
||||||
Result:=false;
|
|
||||||
Ancestors:=nil;
|
|
||||||
ListOfPFindContext:=nil;
|
|
||||||
try
|
|
||||||
if not FindClassAndAncestors(ClassNode,Ancestors,false) then exit;
|
|
||||||
if Ancestors=nil then exit(true);
|
|
||||||
for i:=0 to Ancestors.Count-1 do begin
|
|
||||||
Context:=PFindContext(Ancestors[i]);
|
|
||||||
DebugLn(['TCodeCompletionCodeTool.GatherPublishedMethods ',Context^.Node.DescAsString]);
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
FreeListOfPFindContext(Ancestors);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TCodeCompletionCodeTool.InitClassCompletion(
|
function TCodeCompletionCodeTool.InitClassCompletion(
|
||||||
const AClassName: string;
|
const AClassName: string;
|
||||||
SourceChangeCache: TSourceChangeCache): boolean;
|
SourceChangeCache: TSourceChangeCache): boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user