mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 04:55:58 +02:00
MG; fixed find declaration of overloaded procs and expression input types
git-svn-id: trunk@1706 -
This commit is contained in:
parent
3d7a592187
commit
f9f85ea7c2
@ -1493,11 +1493,16 @@ begin
|
||||
//' "',copy(Src,ANode.StartPos,4),'" - "',copy(Src,ANode.EndPos-5,4),'"');
|
||||
if (StartNode.StartPos<=P)
|
||||
and ((StartNode.EndPos>P) or (StartNode.EndPos<1)) then begin
|
||||
// first search in childs
|
||||
// StartNode contains P
|
||||
// -> search for a child that contains P
|
||||
Result:=FindDeepestNodeAtPos(StartNode.FirstChild,P,false);
|
||||
if Result=nil then
|
||||
// no child found -> take this node
|
||||
if Result=nil then begin
|
||||
// no child found -> search in nextbrothers that contains P
|
||||
while (StartNode.NextBrother<>nil)
|
||||
and (StartNode.NextBrother.StartPos<=P) do
|
||||
StartNode:=StartNode.NextBrother;
|
||||
Result:=StartNode;
|
||||
end;
|
||||
end else
|
||||
// search in next node
|
||||
Result:=FindDeepestNodeAtPos(StartNode.NextBrother,P,false);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1973,15 +1973,15 @@ end;
|
||||
|
||||
function TPascalParserTool.ReadWithStatement(ExceptionOnError,
|
||||
CreateNodes: boolean): boolean;
|
||||
var WithVarNode: TCodeTreeNode;
|
||||
begin
|
||||
ReadNextAtom; // read 'with'
|
||||
if CreateNodes then begin
|
||||
CreateChildNode;
|
||||
CurNode.Desc:=ctnWithVariable
|
||||
CurNode.Desc:=ctnWithVariable;
|
||||
end;
|
||||
ReadTilVariableEnd(true);
|
||||
while CurPos.Flag=cafComma do begin
|
||||
CurNode.EndPos:=LastAtoms.GetValueAt(0).EndPos;
|
||||
if CreateNodes then
|
||||
EndChildNode;
|
||||
ReadNextAtom;
|
||||
@ -2008,8 +2008,14 @@ begin
|
||||
if CreateNodes then begin
|
||||
CurNode.EndPos:=CurPos.StartPos;
|
||||
EndChildNode; // ctnWithStatement
|
||||
WithVarNode:=CurNode.PriorBrother;
|
||||
CurNode.EndPos:=CurPos.StartPos;
|
||||
EndChildNode; // ctnWithVariable
|
||||
// set all with variable ends
|
||||
while (WithVarNode<>nil) and (WithVarNode.FirstChild=nil) do begin
|
||||
WithVarNode.EndPos:=CurPos.StartPos;
|
||||
WithVarNode:=WithVarNode.PriorBrother;
|
||||
end;
|
||||
end;
|
||||
Result:=true;
|
||||
end;
|
||||
|
@ -516,6 +516,7 @@ begin
|
||||
LoadPixmapRes('default',Result);
|
||||
end;
|
||||
|
||||
|
||||
//==============================================================================
|
||||
|
||||
|
||||
@ -5606,6 +5607,7 @@ begin
|
||||
writeln('');
|
||||
writeln('[TMainIDE.DoFindDeclarationAtCursor] ************');
|
||||
{$ENDIF}
|
||||
{$IFDEF IDE_MEM_CHECK}CheckHeap('TMainIDE.DoFindDeclarationAtCursor ',IntToStr(GetMem_Cnt));{$ENDIF}
|
||||
if CodeToolBoss.FindDeclaration(ActiveUnitInfo.Source,
|
||||
ActiveSrcEdit.EditorComponent.CaretX,
|
||||
ActiveSrcEdit.EditorComponent.CaretY,
|
||||
@ -5615,6 +5617,7 @@ begin
|
||||
NewSource, NewX, NewY, NewTopLine, true);
|
||||
end else
|
||||
DoJumpToCodeToolBossError;
|
||||
{$IFDEF IDE_MEM_CHECK}CheckHeap('TMainIDE.DoFindDeclarationAtCursor ',IntToStr(GetMem_Cnt));{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure TMainIDE.DoGoToPascalBlockOtherEnd;
|
||||
@ -6372,6 +6375,9 @@ end.
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.300 2002/05/27 14:38:32 lazarus
|
||||
MG; fixed find declaration of overloaded procs and expression input types
|
||||
|
||||
Revision 1.299 2002/05/24 07:18:14 lazarus
|
||||
MG: save is now possible during debugging
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user