mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 13:17:03 +02:00
MG: get compatible published methods now works
git-svn-id: trunk@1392 -
This commit is contained in:
parent
46ae7f0d85
commit
100ab29f02
@ -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;
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user