mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 08:29:47 +02:00
fixed compiling codetools with -dCTDebug
git-svn-id: trunk@5855 -
This commit is contained in:
parent
2cf465a4ec
commit
79e0b3d2d1
components/codetools
codecompletiontool.pascodetoolmanager.pascustomcodetool.paslinkscanner.pasmethodjumptool.passourcechanger.pas
examples/gtkglarea
ide
@ -2033,7 +2033,7 @@ begin
|
||||
// -> search a good Insert Position behind or in front of
|
||||
// another proc body of this class
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeCompletionCodeTool.CreateMissingProcBodies Insert missing bodies between existing ... ClassProcs.Count=',ClassProcs.Count);
|
||||
DebugLn('TCodeCompletionCodeTool.CreateMissingProcBodies Insert missing bodies between existing ... ClassProcs.Count=',dbgs(ClassProcs.Count));
|
||||
{$ENDIF}
|
||||
|
||||
// set default insert position
|
||||
@ -2147,7 +2147,7 @@ var CleanCursorPos, Indent, insertPos: integer;
|
||||
if (CursorNode.SubDesc and ctnsForwardDeclaration)>0 then exit;
|
||||
// parse class and build CodeTreeNodes for all properties/methods
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeCompletionCodeTool.CompleteCode C ',CleanCursorPos,', |',copy(Src,CleanCursorPos,8));
|
||||
DebugLn('TCodeCompletionCodeTool.CompleteCode C ',dbgs(CleanCursorPos),', |',copy(Src,CleanCursorPos,8));
|
||||
{$ENDIF}
|
||||
CodeCompleteClassNode:=AClassNode;
|
||||
try
|
||||
@ -2606,7 +2606,7 @@ var CleanCursorPos, Indent, insertPos: integer;
|
||||
if not Result then exit;
|
||||
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn(' CompleteEventAssignment: CreateEventFullName... UserEventAtom.StartPos=',UserEventAtom.StartPos);
|
||||
DebugLn(' CompleteEventAssignment: CreateEventFullName... UserEventAtom.StartPos=',dbgs(UserEventAtom.StartPos));
|
||||
{$ENDIF}
|
||||
// create a nice event name
|
||||
FullEventName:=CreateEventFullName(UserEventAtom,PropertyAtom);
|
||||
@ -2648,7 +2648,7 @@ begin
|
||||
CursorNode:=FindDeepestNodeAtPos(CleanCursorPos,true);
|
||||
CodeCompleteSrcChgCache:=SourceChangeCache;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeCompletionCodeTool.CompleteCode A CleanCursorPos=',CleanCursorPos,' NodeDesc=',NodeDescriptionAsString(CursorNode.Desc));
|
||||
DebugLn('TCodeCompletionCodeTool.CompleteCode A CleanCursorPos=',dbgs(CleanCursorPos),' NodeDesc=',NodeDescriptionAsString(CursorNode.Desc));
|
||||
{$ENDIF}
|
||||
ImplementationNode:=FindImplementationNode;
|
||||
if ImplementationNode=nil then ImplementationNode:=Tree.Root;
|
||||
|
@ -602,7 +602,7 @@ function TCodeToolManager.LoadFile(const ExpandedFilename: string;
|
||||
UpdateFromDisk, Revert: boolean): TCodeBuffer;
|
||||
begin
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('>>>>>> [TCodeToolManager.LoadFile] ',ExpandedFilename,' Update=',UpdateFromDisk,' Revert=',Revert);
|
||||
DebugLn('>>>>>> [TCodeToolManager.LoadFile] ',ExpandedFilename,' Update=',dbgs(UpdateFromDisk),' Revert=',dbgs(Revert));
|
||||
{$ENDIF}
|
||||
Result:=SourceCache.LoadFile(ExpandedFilename);
|
||||
if Result<>nil then begin
|
||||
@ -617,7 +617,7 @@ function TCodeToolManager.CreateFile(const AFilename: string): TCodeBuffer;
|
||||
begin
|
||||
Result:=SourceCache.CreateFile(AFilename);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('****** TCodeToolManager.CreateFile "',AFilename,'" ',Result<>nil);
|
||||
DebugLn('****** TCodeToolManager.CreateFile "',AFilename,'" ',dbgs(Result<>nil));
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
@ -1004,7 +1004,7 @@ begin
|
||||
FCurCodeTool:=TCodeTool(GetCodeToolForSource(MainCode,true));
|
||||
FCurCodeTool.ErrorPosition.Code:=nil;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('[TCodeToolManager.InitCurCodeTool] ',Code.Filename,' ',Code.SourceLength);
|
||||
DebugLn('[TCodeToolManager.InitCurCodeTool] ',Code.Filename,' ',dbgs(Code.SourceLength));
|
||||
{$ENDIF}
|
||||
Result:=(FCurCodeTool.Scanner<>nil);
|
||||
if not Result then begin
|
||||
@ -1115,14 +1115,14 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.JumpToMethod A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.JumpToMethod A ',Code.Filename,' x=',dbgs(x),' y=',dbgs(y));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
CursorPos.X:=X;
|
||||
CursorPos.Y:=Y;
|
||||
CursorPos.Code:=Code;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.JumpToMethod B ',FCurCodeTool.Scanner<>nil);
|
||||
DebugLn('TCodeToolManager.JumpToMethod B ',dbgs(FCurCodeTool.Scanner<>nil));
|
||||
{$ENDIF}
|
||||
try
|
||||
Result:=FCurCodeTool.FindJumpPoint(CursorPos,NewPos,NewTopLine,
|
||||
@ -1149,14 +1149,14 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.FindDeclaration A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.FindDeclaration A ',Code.Filename,' x=',dbgs(x),' y=',dbgs(y));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
CursorPos.X:=X;
|
||||
CursorPos.Y:=Y;
|
||||
CursorPos.Code:=Code;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.FindDeclaration B ',FCurCodeTool.Scanner<>nil);
|
||||
DebugLn('TCodeToolManager.FindDeclaration B ',dbgs(FCurCodeTool.Scanner<>nil));
|
||||
{$ENDIF}
|
||||
try
|
||||
{$IFDEF DoNotHandleFindDeclException}
|
||||
@ -1190,14 +1190,14 @@ var
|
||||
begin
|
||||
Result:='';
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.FindSmartHint A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.FindSmartHint A ',Code.Filename,' x=',dbgs(x),' y=',dbgs(y));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
CursorPos.X:=X;
|
||||
CursorPos.Y:=Y;
|
||||
CursorPos.Code:=Code;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.FindSmartHint B ',FCurCodeTool.Scanner<>nil);
|
||||
DebugLn('TCodeToolManager.FindSmartHint B ',dbgs(FCurCodeTool.Scanner<>nil));
|
||||
{$ENDIF}
|
||||
try
|
||||
Result:=FCurCodeTool.FindSmartHint(CursorPos);
|
||||
@ -1221,7 +1221,7 @@ begin
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.FindDeclarationInInterface B ',FCurCodeTool.Scanner<>nil);
|
||||
DebugLn('TCodeToolManager.FindDeclarationInInterface B ',dbgs(FCurCodeTool.Scanner<>nil));
|
||||
{$ENDIF}
|
||||
try
|
||||
Result:=FCurCodeTool.FindDeclarationInInterface(Identifier,NewPos,
|
||||
@ -1246,14 +1246,14 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.FindDeclarationsAndAncestors A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.FindDeclarationsAndAncestors A ',Code.Filename,' x=',dbgs(x),' y=',dbgs(y));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
CursorPos.X:=X;
|
||||
CursorPos.Y:=Y;
|
||||
CursorPos.Code:=Code;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.FindDeclarationsAndAncestors B ',FCurCodeTool.Scanner<>nil);
|
||||
DebugLn('TCodeToolManager.FindDeclarationsAndAncestors B ',dbgs(FCurCodeTool.Scanner<>nil));
|
||||
{$ENDIF}
|
||||
try
|
||||
Result:=FCurCodeTool.FindDeclarationsAndAncestors(CursorPos,
|
||||
@ -1273,14 +1273,14 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GatherIdentifiers A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.GatherIdentifiers A ',Code.Filename,' x=',dbgs(x),' y=',dbgs(y));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
CursorPos.X:=X;
|
||||
CursorPos.Y:=Y;
|
||||
CursorPos.Code:=Code;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GatherIdentifiers B ',FCurCodeTool.Scanner<>nil);
|
||||
DebugLn('TCodeToolManager.GatherIdentifiers B ',dbgs(FCurCodeTool.Scanner<>nil));
|
||||
{$ENDIF}
|
||||
try
|
||||
Result:=FCurCodeTool.GatherIdentifiers(CursorPos,IdentifierList,
|
||||
@ -1300,7 +1300,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GetIdentifierAt A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.GetIdentifierAt A ',Code.Filename,' x=',dbgs(x),' y=',dbgs(y));
|
||||
{$ENDIF}
|
||||
Code.LineColToPosition(Y,X,CleanPos);
|
||||
if (CleanPos>0) and (CleanPos<=Code.SourceLength) then begin
|
||||
@ -1319,7 +1319,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GatherResourceStringSections A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.GatherResourceStringSections A ',Code.Filename,' x=',dbgs(x),' y=',dbgs(y));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
CursorPos.X:=X;
|
||||
@ -1343,7 +1343,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.IdentifierExistsInResourceStringSection A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.IdentifierExistsInResourceStringSection A ',Code.Filename,' x=',dbgs(x),' y=',dbgs(y));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
CursorPos.X:=X;
|
||||
@ -1366,7 +1366,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.CreateIdentifierFromStringConst A ',StartCode.Filename,' x=',StartX,' y=',StartY);
|
||||
DebugLn('TCodeToolManager.CreateIdentifierFromStringConst A ',StartCode.Filename,' x=',dbgs(StartX),' y=',dbgs(StartY));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(StartCode) then exit;
|
||||
StartCursorPos.X:=StartX;
|
||||
@ -1393,7 +1393,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.StringConstToFormatString A ',StartCode.Filename,' x=',StartX,' y=',StartY);
|
||||
DebugLn('TCodeToolManager.StringConstToFormatString A ',StartCode.Filename,' x=',dbgs(StartX),' y=',dbgs(StartY));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(StartCode) then exit;
|
||||
StartCursorPos.X:=StartX;
|
||||
@ -1418,7 +1418,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GatherResourceStringsWithValue A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.GatherResourceStringsWithValue A ',SectionCode.Filename,' x=',dbgs(SectionX),' y=',dbgs(SectionY));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(SectionCode) then exit;
|
||||
CursorPos.X:=SectionX;
|
||||
@ -1446,7 +1446,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.AddResourcestring A ',SectionCode.Filename,' x=',Sectionx,' y=',Sectiony);
|
||||
DebugLn('TCodeToolManager.AddResourcestring A ',SectionCode.Filename,' x=',dbgs(SectionX),' y=',dbgs(SectionY));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(SectionCode) then exit;
|
||||
SectionPos.X:=SectionX;
|
||||
@ -1478,7 +1478,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GetStringConstBounds A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.GetStringConstBounds A ',Code.Filename);
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
CursorPos.X:=X;
|
||||
@ -1507,7 +1507,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.ReplaceCode A ',StartCode.Filename,' x=',StartX,' y=',StartY);
|
||||
DebugLn('TCodeToolManager.ReplaceCode A ',Code.Filename);
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
StartCursorPos.X:=StartX;
|
||||
@ -1533,7 +1533,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GuessMisplacedIfdefEndif A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.GuessMisplacedIfdefEndif A ',Code.Filename);
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
CursorPos.X:=X;
|
||||
@ -1560,7 +1560,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.FindEnclosingIncludeDirective A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.FindEnclosingIncludeDirective A ',Code.Filename);
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
CursorPos.X:=X;
|
||||
@ -1609,14 +1609,14 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.FindBlockCounterPart A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.FindBlockCounterPart A ',Code.Filename);
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
CursorPos.X:=X;
|
||||
CursorPos.Y:=Y;
|
||||
CursorPos.Code:=Code;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.FindBlockCounterPart B ',FCurCodeTool.Scanner<>nil);
|
||||
DebugLn('TCodeToolManager.FindBlockCounterPart B ',dbgs(FCurCodeTool.Scanner<>nil));
|
||||
{$ENDIF}
|
||||
try
|
||||
Result:=FCurCodeTool.FindBlockCounterPart(CursorPos,NewPos,NewTopLine);
|
||||
@ -1642,14 +1642,14 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.FindBlockStart A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.FindBlockStart A ',Code.Filename);
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
CursorPos.X:=X;
|
||||
CursorPos.Y:=Y;
|
||||
CursorPos.Code:=Code;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.FindBlockStart B ',FCurCodeTool.Scanner<>nil);
|
||||
DebugLn('TCodeToolManager.FindBlockStart B ',dbgs(FCurCodeTool.Scanner<>nil));
|
||||
{$ENDIF}
|
||||
try
|
||||
Result:=FCurCodeTool.FindBlockStart(CursorPos,NewPos,NewTopLine);
|
||||
@ -1674,14 +1674,14 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GuessUnclosedBlock A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.GuessUnclosedBlock A ',Code.Filename);
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
CursorPos.X:=X;
|
||||
CursorPos.Y:=Y;
|
||||
CursorPos.Code:=Code;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GuessUnclosedBlock B ',FCurCodeTool.Scanner<>nil);
|
||||
DebugLn('TCodeToolManager.GuessUnclosedBlock B ',dbgs(FCurCodeTool.Scanner<>nil));
|
||||
{$ENDIF}
|
||||
try
|
||||
Result:=FCurCodeTool.GuessUnclosedBlock(CursorPos,NewPos,NewTopLine);
|
||||
@ -1827,7 +1827,7 @@ var
|
||||
NewPos: TCodeXYPosition;
|
||||
begin
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.CompleteCode A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.CompleteCode A ',Code.Filename);
|
||||
{$ENDIF}
|
||||
Result:=false;
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
@ -1912,7 +1912,7 @@ var
|
||||
NewPos: TCodeXYPosition;
|
||||
begin
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.InsertCodeTemplate A ',Code.Filename,' x=',x,' y=',y);
|
||||
DebugLn('TCodeToolManager.InsertCodeTemplate A ',Code.Filename);
|
||||
{$ENDIF}
|
||||
Result:=false;
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
@ -1942,7 +1942,7 @@ begin
|
||||
if (Code=nil)
|
||||
or ((not SearchMainCode) and (Code.LastIncludedByFile<>'')) then exit;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GetSourceName A ',Code.Filename,' ',Code.SourceLength);
|
||||
DebugLn('TCodeToolManager.GetSourceName A ',Code.Filename,' ',dbgs(Code.SourceLength));
|
||||
{$ENDIF}
|
||||
{$IFDEF MEM_CHECK}
|
||||
CheckHeap(IntToStr(GetMem_Cnt));
|
||||
@ -1954,7 +1954,7 @@ begin
|
||||
on e: Exception do HandleException(e);
|
||||
end;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GetSourceName B ',Code.Filename,' ',Code.SourceLength);
|
||||
DebugLn('TCodeToolManager.GetSourceName B ',Code.Filename,' ',dbgs(Code.SourceLength));
|
||||
{$IFDEF MEM_CHECK}
|
||||
CheckHeap(IntToStr(GetMem_Cnt));
|
||||
{$ENDIF}
|
||||
@ -1968,7 +1968,7 @@ begin
|
||||
if (Code=nil)
|
||||
or (Code.LastIncludedByFile<>'') then exit;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GetCachedSourceName A ',Code.Filename,' ',Code.SourceLength);
|
||||
DebugLn('TCodeToolManager.GetCachedSourceName A ',Code.Filename,' ',dbgs(Code.SourceLength));
|
||||
{$ENDIF}
|
||||
{$IFDEF MEM_CHECK}
|
||||
CheckHeap(IntToStr(GetMem_Cnt));
|
||||
@ -1980,7 +1980,7 @@ begin
|
||||
on e: Exception do HandleException(e);
|
||||
end;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GetCachedSourceName B ',Code.Filename,' ',Code.SourceLength);
|
||||
DebugLn('TCodeToolManager.GetCachedSourceName B ',Code.Filename,' ',dbgs(Code.SourceLength));
|
||||
{$IFDEF MEM_CHECK}
|
||||
CheckHeap(IntToStr(GetMem_Cnt));
|
||||
{$ENDIF}
|
||||
@ -1995,7 +1995,7 @@ begin
|
||||
if (Code=nil)
|
||||
or ((not SearchMainCode) and (Code.LastIncludedByFile<>'')) then exit;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GetSourceType A ',Code.Filename,' ',Code.SourceLength);
|
||||
DebugLn('TCodeToolManager.GetSourceType A ',Code.Filename,' ',dbgs(Code.SourceLength));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
try
|
||||
@ -2013,7 +2013,7 @@ begin
|
||||
on e: Exception do HandleException(e);
|
||||
end;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.GetSourceType END ',Code.Filename,',',Code.SourceLength);
|
||||
DebugLn('TCodeToolManager.GetSourceType END ',Code.Filename,',',dbgs(Code.SourceLength));
|
||||
{$IFDEF MEM_CHECK}
|
||||
CheckHeap(IntToStr(GetMem_Cnt));
|
||||
{$ENDIF}
|
||||
@ -2237,7 +2237,7 @@ function TCodeToolManager.AddLazarusResource(Code: TCodeBuffer;
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.AddLazarusResource A ',Code.Filename,' ResourceName=',ResourceName,' ',length(ResourceData));
|
||||
DebugLn('TCodeToolManager.AddLazarusResource A ',Code.Filename,' ResourceName=',ResourceName,' ',dbgs(length(ResourceData)));
|
||||
{$ENDIF}
|
||||
if not InitResourceTool then exit;
|
||||
{$IFDEF CTDEBUG}
|
||||
@ -2273,7 +2273,7 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.RenameMainInclude A ',Code.Filename,' NewFilename=',NewFilename,' KeepPath=',KeepPath);
|
||||
DebugLn('TCodeToolManager.RenameMainInclude A ',Code.Filename,' NewFilename=',NewFilename,' KeepPath=',dbgs(KeepPath));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
try
|
||||
@ -2296,7 +2296,7 @@ function TCodeToolManager.RenameIncludeDirective(Code: TCodeBuffer;
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.RenameIncludeDirective A ',Code.Filename,' NewFilename=',NewFilename,' KeepPath=',KeepPath);
|
||||
DebugLn('TCodeToolManager.RenameIncludeDirective A ',Code.Filename,' NewFilename=',NewFilename,' KeepPath=',dbgs(KeepPath));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
try
|
||||
@ -2330,7 +2330,7 @@ var PosAtom: TAtomPosition;
|
||||
begin
|
||||
Result:=-1;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.FindCreateFormStatement A ',Code.Filename,' StartPos=',StartPos,' ',AClassName,':',AVarName);
|
||||
DebugLn('TCodeToolManager.FindCreateFormStatement A ',Code.Filename,' StartPos=',dbgs(StartPos),' ',AClassName,':',AVarName);
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
try
|
||||
@ -2382,8 +2382,8 @@ begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.ChangeCreateFormStatement A ',Code.Filename,
|
||||
' ',OldVarName.':',OldClassName,' -> ',NewVarName.':',NewClassName,
|
||||
' OnlyIfExists=',OnlyIfExists);
|
||||
' ',OldVarName+':',OldClassName,' -> ',NewVarName+':',NewClassName,
|
||||
' OnlyIfExists=',dbgs(OnlyIfExists));
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
try
|
||||
@ -2586,7 +2586,7 @@ function TCodeToolManager.RenamePublishedVariable(Code: TCodeBuffer;
|
||||
begin
|
||||
Result:=false;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeToolManager.RenamePublishedVariable A ',Code.Filename,' ',AClassName,' OldVar=',OldVarName,' NewVar=',NewVarName);
|
||||
DebugLn('TCodeToolManager.RenamePublishedVariable A ',Code.Filename,' ',AClassName,' OldVar=',OldVariableName,' NewVar=',NewVarName);
|
||||
{$ENDIF}
|
||||
if not InitCurCodeTool(Code) then exit;
|
||||
try
|
||||
@ -2870,7 +2870,7 @@ begin
|
||||
end;
|
||||
inc(FWriteLockCount);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('[TCodeToolManager.ActivateWriteLock] FWriteLockCount=',FWriteLockCount,' FWriteLockStep=',FWriteLockStep);
|
||||
DebugLn('[TCodeToolManager.ActivateWriteLock] FWriteLockCount=',dbgs(FWriteLockCount),' FWriteLockStep=',dbgs(FWriteLockStep));
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
@ -2884,7 +2884,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('[TCodeToolManager.DeactivateWriteLock] FWriteLockCount=',FWriteLockCount,' FWriteLockStep=',FWriteLockStep);
|
||||
DebugLn('[TCodeToolManager.DeactivateWriteLock] FWriteLockCount=',dbgs(FWriteLockCount),' FWriteLockStep=',dbgs(FWriteLockStep));
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
@ -2207,7 +2207,7 @@ end;
|
||||
function TCustomCodeTool.UpdateNeeded(OnlyInterfaceNeeded: boolean): boolean;
|
||||
begin
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCustomCodeTool.UpdateNeeded A ',Scanner<>nil,' FForceUpdateNeeded=',FForceUpdateNeeded);
|
||||
DebugLn('TCustomCodeTool.UpdateNeeded A ',dbgs(Scanner<>nil),' FForceUpdateNeeded=',dbgs(FForceUpdateNeeded));
|
||||
{$ENDIF}
|
||||
if FForceUpdateNeeded then begin
|
||||
Result:=true;
|
||||
@ -2217,7 +2217,7 @@ begin
|
||||
or (Scanner.UpdateNeeded(OnlyInterfaceNeeded, CheckFilesOnDisk));
|
||||
FForceUpdateNeeded:=Result;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCustomCodeTool.UpdateNeeded END Result=',Result);
|
||||
DebugLn('TCustomCodeTool.UpdateNeeded END Result=',dbgs(Result));
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
@ -1023,7 +1023,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TLinkScanner.Scan A -------- TillInterfaceEnd=',TillInterfaceEnd);
|
||||
DebugLn('TLinkScanner.Scan A -------- TillInterfaceEnd=',dbgs(TillInterfaceEnd));
|
||||
{$ENDIF}
|
||||
ScanTillInterfaceEnd:=TillInterfaceEnd;
|
||||
Clear;
|
||||
@ -1038,7 +1038,7 @@ begin
|
||||
SetLength(FCleanedSrc,NewSrcLen);
|
||||
CleanedLen:=0;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TLinkScanner.Scan C ',SrcLen);
|
||||
DebugLn('TLinkScanner.Scan C ',dbgs(SrcLen));
|
||||
{$ENDIF}
|
||||
EndOfInterfaceFound:=false;
|
||||
EndOfSourceFound:=false;
|
||||
@ -1085,7 +1085,7 @@ begin
|
||||
LastProgressPos:=0;
|
||||
CheckForAbort:=Assigned(OnProgress);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TLinkScanner.Scan F ',SrcLen);
|
||||
DebugLn('TLinkScanner.Scan F ',dbgs(SrcLen));
|
||||
{$ENDIF}
|
||||
try
|
||||
try
|
||||
@ -1131,7 +1131,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TLinkScanner.Scan END ',CleanedLen);
|
||||
DebugLn('TLinkScanner.Scan END ',dbgs(CleanedLen));
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
@ -205,7 +205,7 @@ const
|
||||
DiffPos: integer;
|
||||
begin
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint.JumpToProc A ',FromProcNode<>nil,' ',ToProcNode<>nil);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint.JumpToProc A ',dbgs(FromProcNode<>nil),' ',dbgs(ToProcNode<>nil));
|
||||
{$ENDIF}
|
||||
FromProcHead:=ExtractProcHead(FromProcNode,FromProcAttr);
|
||||
ToProcHead:=ExtractProcHead(ToProcNode,ToProcAttr);
|
||||
@ -221,7 +221,7 @@ const
|
||||
if (DiffPos>length(ToProcHead)) and (DiffPos<=length(FromProcHead)) then
|
||||
DiffPos:=length(ToProcHead);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint.JumpToProc C DiffPos=',DiffPos,' length(ToProcHead)=',length(ToProcHead));
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint.JumpToProc C DiffPos=',dbgs(DiffPos),' length(ToProcHead)=',dbgs(length(ToProcHead)));
|
||||
{$ENDIF}
|
||||
if DiffPos<=length(ToProcHead) then begin
|
||||
// procs differ -> search difference in code
|
||||
@ -233,7 +233,7 @@ const
|
||||
ExtractSearchPos:=-1;
|
||||
end;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint.JumpToProc D CleanDiffPos=',DiffPos);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint.JumpToProc D CleanDiffPos=',dbgs(DiffPos));
|
||||
{$ENDIF}
|
||||
Result:=JumpToCleanPos(DiffPos,ToProcNode.StartPos,ToProcNode.EndPos,
|
||||
NewPos,NewTopLine,true);
|
||||
@ -273,12 +273,12 @@ const
|
||||
Result:=false;
|
||||
SearchedProcHead:=ExtractProcHead(SearchForProcNode,SearchForProcAttr);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint.FindBestProcNode Searching ',ProcNode<>nil,' "',SearchedProcHead,'"');
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint.FindBestProcNode Searching ',dbgs(ProcNode<>nil),' "',SearchedProcHead,'"');
|
||||
{$ENDIF}
|
||||
if SearchedProcHead='' then exit;
|
||||
ProcNode:=FindProcNode(StartNode,SearchedProcHead,SearchInProcAttr);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint.FindBestProcNode Found:',ProcNode<>nil);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint.FindBestProcNode Found:',dbgs(ProcNode<>nil));
|
||||
{$ENDIF}
|
||||
if ProcNode<>nil then begin
|
||||
Result:=JumpToProc(SearchForProcNode,JumpToProcAttr,
|
||||
@ -300,7 +300,7 @@ const
|
||||
if SearchedProcHead='' then exit;
|
||||
ProcNode:=FindProcNode(StartNode,SearchedProcHead,SearchForProcAttr);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint.FindBestProcNode Found:',ProcNode<>nil);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint.FindBestProcNode Found:',dbgs(ProcNode<>nil));
|
||||
{$ENDIF}
|
||||
if ProcNode<>nil then begin
|
||||
// there is a proc with the same name, but with different parameters
|
||||
@ -322,7 +322,7 @@ begin
|
||||
NewPos:=CursorPos;
|
||||
// build code tree
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint A CursorPos=',CursorPos.X,',',CursorPos.Y);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint A CursorPos=',dbgs(CursorPos.X),',',dbgs(CursorPos.Y));
|
||||
{$ENDIF}
|
||||
BuildTreeAndGetCleanPos(trAll,CursorPos,CleanCursorPos,[]);
|
||||
GetLineInfo(CleanCursorPos,LineStart,LineEnd,FirstAtomStart,LastAtomEnd);
|
||||
@ -350,7 +350,7 @@ begin
|
||||
if (ClassNode.SubDesc and ctnsForwardDeclaration)>0 then exit;
|
||||
// parse class and build CodeTreeNodes for all properties/methods
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint E ',CleanCursorPos,', |',copy(Src,CleanCursorPos,8));
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint E ',dbgs(CleanCursorPos),', |',copy(Src,CleanCursorPos,8));
|
||||
{$ENDIF}
|
||||
BuildSubTreeForClass(ClassNode);
|
||||
TypeSectionNode:=ClassNode.Parent;
|
||||
@ -366,7 +366,7 @@ begin
|
||||
TypeSectionNode,[phpIgnoreForwards,phpInUpperCase],
|
||||
false);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint F FindBestProcNode=',Result);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint F FindBestProcNode=',dbgs(Result));
|
||||
{$ENDIF}
|
||||
if not Result then begin
|
||||
// find the method bodies which are not defined in class
|
||||
@ -397,7 +397,7 @@ begin
|
||||
// remove all corresponding methods
|
||||
RemoveCorrespondingProcNodes(SearchInNodes,SearchForNodes,false);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint J DiffMethods found = ',SearchInNodes.Count);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint J DiffMethods found = ',dbgs(SearchInNodes.Count));
|
||||
{$ENDIF}
|
||||
if SearchInNodes.Count=0 then exit;
|
||||
// SearchForNodes now contains all method bodies, which do not have any
|
||||
@ -406,7 +406,7 @@ begin
|
||||
ProcNode:=FindProcNodeInTreeWithName(SearchInNodes,
|
||||
ExtractProcName(CursorNode,[phpWithoutClassName,phpInUpperCase]));
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint J DiffMethod with same name found = ',ProcNode<>nil);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint J DiffMethod with same name found = ',dbgs(ProcNode<>nil));
|
||||
{$ENDIF}
|
||||
if (ProcNode=nil) then begin
|
||||
// no method body with same name
|
||||
@ -429,7 +429,7 @@ begin
|
||||
// then test if cursor is in a procedure
|
||||
ProcNode:=CursorNode.GetNodeOfType(ctnProcedure);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint Checking if in a proc ... ',ProcNode<>nil);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint Checking if in a proc ... ',dbgs(ProcNode<>nil));
|
||||
{$ENDIF}
|
||||
while (ProcNode<>nil) and (ProcNode.Desc=ctnProcedure) do begin
|
||||
if (ProcNode.SubDesc and ctnsForwardDeclaration)>0 then begin
|
||||
@ -519,7 +519,7 @@ begin
|
||||
SearchedClassname:=ExtractClassNameOfProcNode(ProcNode);
|
||||
StartNode:=FindFirstNodeOnSameLvl(ProcNode);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint 4B ',StartNode<>nil,' ',SearchedClassName);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint 4B ',dbgs(StartNode<>nil),' ',SearchedClassName);
|
||||
{$ENDIF}
|
||||
if StartNode=nil then exit;
|
||||
if SearchedClassname<>'' then begin
|
||||
@ -527,7 +527,7 @@ begin
|
||||
ClassNode:=FindClassNode(StartNode,UpperCaseStr(SearchedClassName),
|
||||
true,false);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint 4C ',ClassNode<>nil);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint 4C ',dbgs(ClassNode<>nil));
|
||||
{$ENDIF}
|
||||
if ClassNode=nil then exit;
|
||||
BuildSubTreeForClass(ClassNode);
|
||||
@ -536,7 +536,7 @@ begin
|
||||
while (StartNode<>nil) and (StartNode.FirstChild=nil) do
|
||||
StartNode:=StartNode.NextBrother;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint 4D ',StartNode<>nil);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint 4D ',dbgs(StartNode<>nil));
|
||||
{$ENDIF}
|
||||
if StartNode=nil then exit;
|
||||
StartNode:=StartNode.FirstChild;
|
||||
@ -544,7 +544,7 @@ begin
|
||||
Result:=FindBestProcNode(ProcNode,[phpWithoutClassName,phpInUpperCase],
|
||||
StartNode,[phpInUpperCase],false);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint 4E FindBestProcNode=',Result);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint 4E FindBestProcNode=',dbgs(Result));
|
||||
{$ENDIF}
|
||||
if Result then exit;
|
||||
|
||||
@ -566,7 +566,7 @@ begin
|
||||
// remove corresponding methods
|
||||
RemoveCorrespondingProcNodes(SearchForNodes,SearchInNodes,false);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint 4G DiffNodes=',SearchInNodes.Count);
|
||||
DebugLn('TMethodJumpingCodeTool.FindJumpPoint 4G DiffNodes=',dbgs(SearchInNodes.Count));
|
||||
{$ENDIF}
|
||||
if SearchInNodes.Count=0 then exit;
|
||||
// search for a method with same name but different param list
|
||||
@ -707,13 +707,13 @@ begin
|
||||
while (CurPos.StartPos-i>1) and (Src[CurPos.StartPos-i-1] in [' ',#8]) do
|
||||
inc(i);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('[TMethodJumpingCodeTool.FindJumpPointInProcNode] A i=',i);
|
||||
DebugLn('[TMethodJumpingCodeTool.FindJumpPointInProcNode] A i=',dbgs(i));
|
||||
{$ENDIF}
|
||||
if (CurPos.StartPos-i>1) and (not (Src[CurPos.StartPos-i-1] in [#10,#13]))
|
||||
then
|
||||
i:=0;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('[TMethodJumpingCodeTool.FindJumpPointInProcNode] B i=',i,' IndentSize=',IndentSize);
|
||||
DebugLn('[TMethodJumpingCodeTool.FindJumpPointInProcNode] B i=',dbgs(i),' IndentSize=',dbgs(IndentSize));
|
||||
{$ENDIF}
|
||||
// set cursor in the next line but before the next token/comment
|
||||
ReadNextAtom;
|
||||
|
@ -475,11 +475,11 @@ var
|
||||
IntersectionEntry: TSourceChangeCacheEntry;
|
||||
begin
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TSourceChangeCache.ReplaceEx FrontGap=',ord(FrontGap),
|
||||
' AfterGap=',ord(AfterGap),' CleanPos=',FromPos,'-',ToPos,
|
||||
DebugLn('TSourceChangeCache.ReplaceEx FrontGap=',dbgs(ord(FrontGap)),
|
||||
' AfterGap=',dbgs(ord(AfterGap)),' CleanPos=',dbgs(FromPos),'-',dbgs(ToPos),
|
||||
' Text="',Text,'"');
|
||||
if DirectCode<>nil then
|
||||
DebugLn('DirectCode=',DirectCode.Filename,' DirectPos=',FromDirectPos,'-',ToDirectPos);
|
||||
DebugLn('DirectCode=',DirectCode.Filename,' DirectPos=',dbgs(FromDirectPos),'-',dbgs(ToDirectPos));
|
||||
{$ENDIF}
|
||||
Result:=false;
|
||||
IsDirectChange:=DirectCode<>nil;
|
||||
@ -511,8 +511,8 @@ begin
|
||||
if IntersectionEntry<>nil then begin
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TSourceChangeCache.ReplaceEx IGNORED, because intersection found: ',
|
||||
IntersectionEntry.FromPos,'-',IntersectionEntry.ToPos,
|
||||
' IsDelete=',IntersectionEntry.IsDeleteOperation);
|
||||
dbgs(IntersectionEntry.FromPos),'-',dbgs(IntersectionEntry.ToPos),
|
||||
' IsDelete=',dbgs(IntersectionEntry.IsDeleteOperation));
|
||||
{$ENDIF}
|
||||
RaiseIntersectionFound;
|
||||
exit;
|
||||
@ -547,7 +547,7 @@ begin
|
||||
FBuffersToModifyNeedsUpdate:=true;
|
||||
Result:=true;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TSourceChangeCache.ReplaceEx SUCCESS IsDelete=',NewEntry.IsDeleteOperation);
|
||||
DebugLn('TSourceChangeCache.ReplaceEx SUCCESS IsDelete=',dbgs(NewEntry.IsDeleteOperation));
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
@ -716,7 +716,7 @@ var
|
||||
Abort: boolean;
|
||||
begin
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TSourceChangeCache.Apply EntryCount=',FEntries.Count);
|
||||
DebugLn('TSourceChangeCache.Apply EntryCount=',dbgs(FEntries.Count));
|
||||
{$ENDIF}
|
||||
Result:=false;
|
||||
if MainScanner=nil then
|
||||
@ -745,7 +745,7 @@ begin
|
||||
while CurNode<>nil do begin
|
||||
FirstEntry:=TSourceChangeCacheEntry(CurNode.Data);
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TSourceChangeCache.Apply Pos=',FirstEntry.FromPos,'-',FirstEntry.ToPos,
|
||||
DebugLn('TSourceChangeCache.Apply Pos=',dbgs(FirstEntry.FromPos),'-',dbgs(FirstEntry.ToPos),
|
||||
' Text="',FirstEntry.Text,'"');
|
||||
{$ENDIF}
|
||||
InsertText:=FirstEntry.Text;
|
||||
@ -758,7 +758,7 @@ begin
|
||||
PrecEntry:=TSourceChangeCacheEntry(PrecNode.Data);
|
||||
if PrecEntry.IsAtSamePos(CurEntry) then begin
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TSourceChangeCache.Apply EntryAtSamePos Pos=',PrecEntry.FromPos,'-',PrecEntry.ToPos,
|
||||
DebugLn('TSourceChangeCache.Apply EntryAtSamePos Pos=',dbgs(PrecEntry.FromPos),'-',dbgs(PrecEntry.ToPos),
|
||||
' InsertText="',InsertText,'"');
|
||||
{$ENDIF}
|
||||
BetweenGap:=PrecEntry.AfterGap;
|
||||
@ -809,7 +809,7 @@ end;
|
||||
procedure TSourceChangeCache.DeleteCleanText(CleanFromPos,CleanToPos: integer);
|
||||
begin
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('[TSourceChangeCache.DeleteCleanText] Pos=',CleanFromPos,'-',CleanToPos);
|
||||
DebugLn('[TSourceChangeCache.DeleteCleanText] Pos=',dbgs(CleanFromPos),'-',dbgs(CleanToPos));
|
||||
{$ENDIF}
|
||||
if CleanFromPos=CleanToPos then exit;
|
||||
MainScanner.DeleteRange(CleanFromPos,CleanToPos);
|
||||
@ -820,7 +820,7 @@ procedure TSourceChangeCache.DeleteDirectText(ACode: TCodeBuffer; DirectFromPos,
|
||||
begin
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('[TSourceChangeCache.DeleteDirectText] Code=',ACode.Filename,
|
||||
' Pos=',DirectFromPos,'-',DirectToPos);
|
||||
' Pos=',dbgs(DirectFromPos),'-',dbgs(DirectToPos));
|
||||
{$ENDIF}
|
||||
if DirectFromPos=DirectToPos then exit;
|
||||
ACode.Delete(DirectFromPos,DirectToPos-DirectFromPos);
|
||||
@ -831,7 +831,7 @@ procedure TSourceChangeCache.InsertNewText(ACode: TCodeBuffer;
|
||||
begin
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('[TSourceChangeCache.InsertNewText] Code=',ACode.Filename,
|
||||
' Pos=',DirectPos,' Text="',InsertText,'"');
|
||||
' Pos=',dbgs(DirectPos),' Text="',InsertText,'"');
|
||||
{$ENDIF}
|
||||
if InsertText='' then exit;
|
||||
ACode.Insert(DirectPos,InsertText);
|
||||
|
@ -25,7 +25,7 @@
|
||||
<UsageCount Value="22"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<CursorPos X="30" Y="629"/>
|
||||
<CursorPos X="19" Y="620"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<Filename Value="exampleform.pp"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -55,10 +55,14 @@
|
||||
</RequiredPackages>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="2"/>
|
||||
<SearchPaths>
|
||||
<LCLWidgetType Value="gtk"/>
|
||||
<SrcPath Value="$(LazarusDir)/lcl/;$(LazarusDir)/lcl/interfaces/gtk/"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
</CodeGeneration>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
|
@ -112,9 +112,7 @@ type
|
||||
{ Help Contexts for IDE help }
|
||||
const
|
||||
lihcStartPage = 'StartPage';
|
||||
lihcFCLStartPage = 'FCLStartPage';
|
||||
lihcFCLUnits = 'FCLUnits';
|
||||
lihcLCLStartPage = 'LCLStartPage';
|
||||
lihcLCLUnits = 'LCLUnits';
|
||||
|
||||
var
|
||||
@ -356,7 +354,6 @@ procedure THelpManager.RegisterIDEHelpDatabases;
|
||||
procedure CreateFCLHelpDB;
|
||||
var
|
||||
HTMLHelp: TFPDocHTMLHelpDatabase;
|
||||
StartNode: THelpNode;
|
||||
FPDocNode: THelpNode;
|
||||
DirItem: THelpDBISourceDirectory;
|
||||
begin
|
||||
@ -364,18 +361,11 @@ procedure THelpManager.RegisterIDEHelpDatabases;
|
||||
true);
|
||||
HTMLHelp:=FFCLHelpDB as TFPDocHTMLHelpDatabase;
|
||||
|
||||
// FCL
|
||||
StartNode:=THelpNode.CreateURLID(HTMLHelp,
|
||||
'FCL - Free Pascal Component Library',
|
||||
'http://www.freepascal.org/docs-html/fcl/index.html',
|
||||
lihcFCLStartPage);
|
||||
HTMLHelp.TOCNode:=THelpNode.Create(HTMLHelp,StartNode);
|
||||
HTMLHelp.RegisterItemWithNode(StartNode);
|
||||
|
||||
// FPDoc: units in the FCL
|
||||
FPDocNode:=THelpNode.CreateURL(HTMLHelp,
|
||||
'FCL - Free Pascal Component Library Units',
|
||||
'http://www.freepascal.org/docs-html/fcl/index.html');
|
||||
HTMLHelp.TOCNode:=THelpNode.Create(HTMLHelp,FPDocNode);
|
||||
DirItem:=THelpDBISourceDirectory.Create(FPDocNode,'$(FPCSrcDir)/fcl',
|
||||
'*.pp;*.pas',true);
|
||||
HTMLHelp.RegisterItem(DirItem);
|
||||
@ -390,7 +380,6 @@ procedure THelpManager.RegisterIDEHelpDatabases;
|
||||
procedure CreateLCLHelpDB;
|
||||
var
|
||||
HTMLHelp: TFPDocHTMLHelpDatabase;
|
||||
StartNode: THelpNode;
|
||||
FPDocNode: THelpNode;
|
||||
DirItem: THelpDBISourceDirectory;
|
||||
begin
|
||||
@ -399,18 +388,11 @@ procedure THelpManager.RegisterIDEHelpDatabases;
|
||||
HTMLHelp:=FLCLHelpDB as TFPDocHTMLHelpDatabase;
|
||||
HTMLHelp.BasePathObject:=Self;
|
||||
|
||||
// LCL
|
||||
StartNode:=THelpNode.CreateURLID(HTMLHelp,
|
||||
'LCL - Lazarus Component Library',
|
||||
'file://$(LazarusDir)/docs/html/index.html',
|
||||
lihcLCLStartPage);
|
||||
HTMLHelp.TOCNode:=THelpNode.Create(HTMLHelp,StartNode);
|
||||
HTMLHelp.RegisterItemWithNode(StartNode);
|
||||
|
||||
// FPDoc: units in the LCL
|
||||
FPDocNode:=THelpNode.CreateURL(HTMLHelp,
|
||||
'LCL - Lazarus Component Library Units',
|
||||
'file://$(LazarusDir)/docs/html/index.html');
|
||||
HTMLHelp.TOCNode:=THelpNode.Create(HTMLHelp,FPDocNode);
|
||||
DirItem:=THelpDBISourceDirectory.Create(FPDocNode,'$(LazarusDir)/lcl',
|
||||
'*.pp;*.pas',false);
|
||||
HTMLHelp.RegisterItem(DirItem);
|
||||
|
Loading…
Reference in New Issue
Block a user