mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 18:20:30 +02:00
IDE: searching jitmethods in ancestors
git-svn-id: trunk@17754 -
This commit is contained in:
parent
bd1b6382f0
commit
5f7325271c
@ -1642,14 +1642,21 @@ var
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
{$IFNDEF DisableFakeMethods}
|
{$IFNDEF DisableFakeMethods}
|
||||||
//debugln('TJITComponentList.ReaderSetMethodProperty ',DbgSName(Instance),' ',PropInfo^.Name,':=',TheMethodName);
|
//debugln('TJITComponentList.ReaderSetMethodProperty ',DbgSName(Instance),' LookupRoot=',DbgSName(Reader.LookupRoot),' ',PropInfo^.Name,':=',TheMethodName);
|
||||||
Method.Code:=FCurReadJITComponent.MethodAddress(TheMethodName);
|
Method.Code:=FCurReadJITComponent.MethodAddress(TheMethodName);
|
||||||
if Method.Code<>nil then begin
|
if Method.Code<>nil then begin
|
||||||
// there is a real method with this name
|
// there is a real method with this name
|
||||||
Method.Data := FCurReadJITComponent;
|
Method.Data := FCurReadJITComponent;
|
||||||
end else begin
|
end else begin
|
||||||
|
JITMethod:=nil;
|
||||||
|
if FCurReadStreamClass<>nil then begin
|
||||||
|
// search in JIT method of stream class (e.g. ancestor)
|
||||||
|
JITMethod:=JITMethods.Find(FCurReadStreamClass,TheMethodName);
|
||||||
|
end;
|
||||||
|
if JITMethod=nil then begin
|
||||||
// create a fake TJITMethod
|
// create a fake TJITMethod
|
||||||
JITMethod:=JITMethods.Add(Reader.LookupRoot.ClassType,TheMethodName);
|
JITMethod:=JITMethods.Add(Reader.LookupRoot.ClassType,TheMethodName);
|
||||||
|
end;
|
||||||
Method:=JITMethod.Method;
|
Method:=JITMethod.Method;
|
||||||
end;
|
end;
|
||||||
SetMethodProp(Instance, PropInfo, Method);
|
SetMethodProp(Instance, PropInfo, Method);
|
||||||
|
@ -1483,7 +1483,7 @@ begin
|
|||||||
if PropOwner is TComponent then begin
|
if PropOwner is TComponent then begin
|
||||||
LookupRoot:=GetLookupRootForComponent(TComponent(PropOwner));
|
LookupRoot:=GetLookupRootForComponent(TComponent(PropOwner));
|
||||||
if LookupRoot is TComponent then begin
|
if LookupRoot is TComponent then begin
|
||||||
//DebugLn(['TMainIDE.OnPropHookGetMethodName ',dbgsName(GlobalDesignHook.LookupRoot),' ',dbgsName(JITMethod.TheClass)]);
|
//DebugLn(['TMainIDE.OnPropHookGetMethodName ',Result,' ',dbgsName(GlobalDesignHook.LookupRoot),' ',dbgsName(JITMethod.TheClass)]);
|
||||||
if (LookupRoot.ClassType<>JITMethod.TheClass) then begin
|
if (LookupRoot.ClassType<>JITMethod.TheClass) then begin
|
||||||
Result:=JITMethod.TheClass.ClassName+'.'+Result;
|
Result:=JITMethod.TheClass.ClassName+'.'+Result;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user