codetools: clean up

git-svn-id: trunk@50048 -
This commit is contained in:
mattias 2015-10-13 17:06:59 +00:00
parent e6714b1468
commit 12645682d5

View File

@ -270,8 +270,6 @@ type
SourceChangeCache: TSourceChangeCache): boolean;
function AddPublishedVariable(const UpperClassName,VarName, VarType: string;
SourceChangeCache: TSourceChangeCache): boolean; override;
function GatherPublishedMethods(ClassNode: TCodeTreeNode;
out ListOfPFindContext: TFPList): boolean;
// graph of definitions of a unit
function GatherUnitDefinitions(out TreeOfCodeTreeNodeExt: TAVLTree;
@ -5656,20 +5654,9 @@ var
s: TPascalClassSection;
procedure GatherClassProcs;
var
PublishedMethods: TFPList;
begin
// gather existing proc definitions in the class
if ClassProcs=nil then begin
PublishedMethods:=nil;
try
{$IFDEF EnableInheritedEmptyMethods}
DebugLn(['GatherClassProcs EnableInheritedEmptyMethods']);
GatherPublishedMethods(FCompletingStartNode,PublishedMethods);
{$ENDIF}
finally
FreeListOfPFindContext(PublishedMethods);
end;
ClassProcs:=GatherProcNodes(FCompletingFirstEntryNode,
[phpInUpperCase,phpAddClassName],
ExtractClassName(CodeCompleteClassNode,true));
@ -6768,28 +6755,6 @@ begin
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(
const AClassName: string;
SourceChangeCache: TSourceChangeCache): boolean;