fixed finding help for Form properties

git-svn-id: trunk@9753 -
This commit is contained in:
mattias 2006-08-27 15:13:47 +00:00
parent 63e2e77804
commit 17e38277d0
3 changed files with 16 additions and 8 deletions

View File

@ -1394,18 +1394,24 @@ begin
if PropertyPath='' then exit;
BuildTree(false);
// first search the class in the interface
// first search the class/variable in the interface
StartPos:=1;
Identifier:=GetNextIdentifier;
if Identifier='' then exit;
Context.Tool:=Self;
Context.Node:=FindDeclarationNodeInInterface(Identifier,true);
if Context.Node=nil then exit;
Context.Node:=FindTypeNodeOfDefinition(Context.Node);
if Context.Node=nil then exit;
if Context.Node=nil then begin
//DebugLn(['TFindDeclarationTool.FindDeclarationOfPropertyPath Identifier not found in interface ',Identifier]);
exit;
end;
Params:=TFindDeclarationParams.Create;
ActivateGlobalWriteLock;
try
Context:=FindBaseTypeOfNode(Params,Context.Node);
if Context.Node=nil then begin
//DebugLn(['TFindDeclarationTool.FindDeclarationOfPropertyPath context not found']);
exit;
end;
// then search the properties
repeat
//DebugLn('TFindDeclarationTool.FindDeclarationOfPropertyPath ',Context.Node.DescAsString);

View File

@ -249,9 +249,11 @@ begin
exit;
end;
PropPath:=AnInspector.GetActivePropertyGrid.PropertyPath(Row);
if APersistent is TComponent then
if APersistent is TComponent then begin
PropPath:=TComponent(APersistent).Name+'.'+PropPath;
PropPath:=LookupRoot.ClassName+'.'+PropPath;
if TComponent(APersistent).Owner=LookupRoot then
PropPath:=LookupRoot.ClassName+'.'+PropPath;
end;
// find the property declaration
if not CodeToolBoss.FindDeclarationOfPropertyPath(Code,PropPath,NewCode,
NewX,NewY,NewTopLine) then
@ -261,7 +263,7 @@ begin
end;
Code:=NewCode;
Caret:=Point(NewX,NewY);
DebugLn('FindDeclarationOfOIProperty SUCCESS ',Code.Filename,' ',dbgs(Caret));
//DebugLn('FindDeclarationOfOIProperty SUCCESS ',Code.Filename,' ',dbgs(Caret));
Result:=true;
end;

View File

@ -711,7 +711,7 @@ var
ErrMsg: string;
NewTopLine: integer;
begin
DebugLn('THelpManager.ShowHelpForObjectInspector ',dbgsName(Sender));
//DebugLn('THelpManager.ShowHelpForObjectInspector ',dbgsName(Sender));
if Sender=nil then Sender:=ObjectInspector1;
if Sender is TObjectInspector then begin
AnInspector:=TObjectInspector(Sender);