MG: get compatible published methods now works

git-svn-id: trunk@1392 -
This commit is contained in:
lazarus 2002-02-09 02:30:16 +00:00
parent 46ae7f0d85
commit 100ab29f02
3 changed files with 9 additions and 6 deletions

View File

@ -178,8 +178,8 @@ type
var NewX, NewY, NewTopLine: integer): boolean; var NewX, NewY, NewTopLine: integer): boolean;
// functions for events in the object inspector // functions for events in the object inspector
procedure GetCompatibleMethods(Code: TCodeBuffer; const AClassName: string; function GetCompatibleMethods(Code: TCodeBuffer; const AClassName: string;
TypeData: PTypeData; Proc: TGetStringProc); TypeData: PTypeData; Proc: TGetStringProc): boolean;
function MethodExists(Code:TCodeBuffer; const AClassName, function MethodExists(Code:TCodeBuffer; const AClassName,
AMethodName: string; TypeData: PTypeData): boolean; AMethodName: string; TypeData: PTypeData): boolean;
function JumpToMethodBody(Code: TCodeBuffer; function JumpToMethodBody(Code: TCodeBuffer;
@ -712,18 +712,19 @@ writeln('TCodeToolManager.GuessUnclosedBlock END ');
{$ENDIF} {$ENDIF}
end; end;
procedure TCodeToolManager.GetCompatibleMethods(Code: TCodeBuffer; function TCodeToolManager.GetCompatibleMethods(Code: TCodeBuffer;
const AClassName: string; TypeData: PTypeData; Proc: TGetStringProc); const AClassName: string; TypeData: PTypeData; Proc: TGetStringProc): boolean;
begin begin
{$IFDEF CTDEBUG} {$IFDEF CTDEBUG}
writeln('TCodeToolManager.GetCompatibleMethods A ',Code.Filename,' Classname=',AClassname); writeln('TCodeToolManager.GetCompatibleMethods A ',Code.Filename,' Classname=',AClassname);
{$ENDIF} {$ENDIF}
Result:=InitCurCodeTool(Code);
if not InitCurCodeTool(Code) then exit; if not InitCurCodeTool(Code) then exit;
try try
FCurCodeTool.GetCompatiblePublishedMethods(UpperCaseStr(AClassName), Result:=FCurCodeTool.GetCompatiblePublishedMethods(UpperCaseStr(AClassName),
TypeData,Proc); TypeData,Proc);
except except
on e: Exception do HandleException(e); on e: Exception do Result:=HandleException(e);
end; end;
end; end;

View File

@ -834,6 +834,7 @@ begin
WordIsPredefinedIdentifier:=TKeyWordFunctionList.Create; WordIsPredefinedIdentifier:=TKeyWordFunctionList.Create;
KeyWordLists.Add(WordIsPredefinedIdentifier); KeyWordLists.Add(WordIsPredefinedIdentifier);
with WordIsPredefinedIdentifier do begin with WordIsPredefinedIdentifier do begin
Add('POINTER' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('INT64' ,{$ifdef FPC}@{$endif}AllwaysTrue); Add('INT64' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('CARDINAL' ,{$ifdef FPC}@{$endif}AllwaysTrue); Add('CARDINAL' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('QWORD' ,{$ifdef FPC}@{$endif}AllwaysTrue); Add('QWORD' ,{$ifdef FPC}@{$endif}AllwaysTrue);

View File

@ -2052,6 +2052,7 @@ end;
procedure TMethodPropertyEditor.GetValues(Proc: TGetStringProc); procedure TMethodPropertyEditor.GetValues(Proc: TGetStringProc);
begin begin
writeln('### TMethodPropertyEditor.GetValues');
PropertyHook.GetMethods(GetTypeData(GetPropType), Proc); PropertyHook.GetMethods(GetTypeData(GetPropType), Proc);
end; end;