mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 13:28:04 +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}
|
||||
begin
|
||||
{$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);
|
||||
if Method.Code<>nil then begin
|
||||
// there is a real method with this name
|
||||
Method.Data := FCurReadJITComponent;
|
||||
end else begin
|
||||
// create a fake TJITMethod
|
||||
JITMethod:=JITMethods.Add(Reader.LookupRoot.ClassType,TheMethodName);
|
||||
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
|
||||
JITMethod:=JITMethods.Add(Reader.LookupRoot.ClassType,TheMethodName);
|
||||
end;
|
||||
Method:=JITMethod.Method;
|
||||
end;
|
||||
SetMethodProp(Instance, PropInfo, Method);
|
||||
|
@ -1483,7 +1483,7 @@ begin
|
||||
if PropOwner is TComponent then begin
|
||||
LookupRoot:=GetLookupRootForComponent(TComponent(PropOwner));
|
||||
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
|
||||
Result:=JITMethod.TheClass.ClassName+'.'+Result;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user