mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 10:32:37 +02:00
codetools: method jumping, class completion: support having an overload that differ only in class keyword, issue #25130
git-svn-id: trunk@47990 -
This commit is contained in:
parent
e464eb70d9
commit
82b49e8841
@ -8335,7 +8335,7 @@ var
|
||||
ANode: TCodeTreeNode;
|
||||
begin
|
||||
Result:=GatherProcNodes(ClassNode.FirstChild,
|
||||
[phpInUpperCase,phpAddClassName],ExtractClassName(ClassNode,true));
|
||||
[phpInUpperCase,phpAddClassName,phpWithStart],ExtractClassName(ClassNode,true));
|
||||
if RemoveAbstracts then begin
|
||||
AnAVLNode:=Result.FindLowest;
|
||||
while AnAVLNode<>nil do begin
|
||||
@ -8359,7 +8359,7 @@ var
|
||||
begin
|
||||
TypeSectionNode:=ClassNode.GetTopMostNodeOfType(ctnTypeSection);
|
||||
Result:=GatherProcNodes(TypeSectionNode,
|
||||
[phpInUpperCase,phpIgnoreForwards,phpOnlyWithClassname],
|
||||
[phpInUpperCase,phpIgnoreForwards,phpOnlyWithClassname,phpWithStart],
|
||||
ExtractClassName(ClassNode,true));
|
||||
end;
|
||||
|
||||
@ -8904,7 +8904,7 @@ begin
|
||||
FCodeCompleteClassNode:=FindClassNode(CursorNode,CurClassName,true,false);
|
||||
if CodeCompleteClassNode=nil then
|
||||
RaiseException('oops, I lost your class');
|
||||
ProcNode:=FindProcNode(CursorNode,FJumpToProcName,[phpInUpperCase,phpIgnoreForwards]);
|
||||
ProcNode:=FindProcNode(CursorNode,FJumpToProcName,[phpInUpperCase,phpIgnoreForwards,phpWithStart]);
|
||||
if ProcNode=nil then begin
|
||||
debugln(['TCodeCompletionCodeTool.ApplyChangesAndJumpToFirstNewProc Proc="',FJumpToProcName,'"']);
|
||||
RaiseException(ctsNewProcBodyNotFound);
|
||||
|
@ -379,8 +379,8 @@ begin
|
||||
GetNodeOfType(ctnProcedure);
|
||||
if (CursorNode=nil) then exit;
|
||||
// search corresponding proc node
|
||||
Result:=FindBestProcNode(CursorNode,[phpAddClassName,phpInUpperCase],
|
||||
TypeSectionNode,[phpIgnoreForwards,phpInUpperCase],
|
||||
Result:=FindBestProcNode(CursorNode,[phpAddClassName,phpInUpperCase,phpWithStart],
|
||||
TypeSectionNode,[phpIgnoreForwards,phpInUpperCase,phpWithStart],
|
||||
false);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint F FindBestProcNode=',dbgs(Result));
|
||||
@ -558,8 +558,8 @@ begin
|
||||
RaiseException('method "'+ProcName+'" has no declaration');
|
||||
end;
|
||||
// search method with same name and param list
|
||||
Result:=FindBestProcNode(ProcNode,[phpWithoutClassName,phpInUpperCase],
|
||||
StartNode,[phpInUpperCase],false);
|
||||
Result:=FindBestProcNode(ProcNode,[phpWithoutClassName,phpInUpperCase,phpWithStart],
|
||||
StartNode,[phpInUpperCase,phpWithStart],false);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint 4E FindBestProcNode=',dbgs(Result));
|
||||
{$ENDIF}
|
||||
|
Loading…
Reference in New Issue
Block a user