mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 10:39:18 +02:00
codetools: tests with
git-svn-id: trunk@50265 -
This commit is contained in:
parent
a98baa8442
commit
7395b9b047
@ -1486,10 +1486,22 @@ begin
|
|||||||
|
|
||||||
// RemoveWithHeader
|
// RemoveWithHeader
|
||||||
SourceChangeCache.MainScanner:=Scanner;
|
SourceChangeCache.MainScanner:=Scanner;
|
||||||
if not FindBounds then exit;
|
if not FindBounds then begin
|
||||||
if not RemoveWithHeader then exit;
|
debugln(['TExtractProcTool.RemoveWithBlock FindBounds failed']);
|
||||||
if not UnindentAndEncloseSkippedCode then exit;
|
exit;
|
||||||
if not PrefixSubIdentifiers then exit;
|
end;
|
||||||
|
if not RemoveWithHeader then begin
|
||||||
|
debugln(['TExtractProcTool.RemoveWithBlock RemoveWithHeader failed']);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if not UnindentAndEncloseSkippedCode then begin
|
||||||
|
debugln(['TExtractProcTool.RemoveWithBlock UnindentAndEncloseSkippedCode failed']);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if not PrefixSubIdentifiers then begin
|
||||||
|
debugln(['TExtractProcTool.RemoveWithBlock PrefixSubIdentifiers failed']);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
Result:=SourceChangeCache.Apply;
|
Result:=SourceChangeCache.Apply;
|
||||||
//debugln(['TExtractProcTool.RemoveWithBlock SOURCE:']);
|
//debugln(['TExtractProcTool.RemoveWithBlock SOURCE:']);
|
||||||
|
@ -100,7 +100,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
// check each marker
|
// check each marker
|
||||||
Src:=Code.Source;
|
Src:=Code.Source;
|
||||||
//debugln(['TTestRefactoring.TestExplodeWith ',copy(Src,NewStartPos,NewEndPos-NewStartPos)]);
|
//debugln(['TTestRefactoring.TestExplodeWith NewBlock=',copy(Src,NewStartPos,NewEndPos-NewStartPos)]);
|
||||||
p:=NewStartPos;
|
p:=NewStartPos;
|
||||||
repeat
|
repeat
|
||||||
CommentStartPos:=FindNextComment(Src,p,NewEndPos);
|
CommentStartPos:=FindNextComment(Src,p,NewEndPos);
|
||||||
|
@ -13,6 +13,8 @@ type
|
|||||||
|
|
||||||
TMyClass = class
|
TMyClass = class
|
||||||
public
|
public
|
||||||
|
Parent: TMyClass;
|
||||||
|
Left: string;
|
||||||
procedure DoSomething;
|
procedure DoSomething;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -22,11 +24,16 @@ implementation
|
|||||||
|
|
||||||
procedure TMyClass.DoSomething;
|
procedure TMyClass.DoSomething;
|
||||||
var
|
var
|
||||||
R: TRect;
|
R1: TRect;
|
||||||
begin
|
begin
|
||||||
R:=Rect(1,2,3,4);
|
R1:=Rect(1,2,3,4);
|
||||||
with R do
|
with R1 do
|
||||||
{explodewith:R}Left:=4;
|
{explodewith:R1}Left:=4;
|
||||||
|
if R1.Left= 4 then ;
|
||||||
|
with Parent do
|
||||||
|
{explodewith:Parent}Left:='A';
|
||||||
|
with Parent.Parent do
|
||||||
|
{explodewith:Parent}Left:='A';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user