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