mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 12:19:14 +02:00
codetools: clean up
git-svn-id: trunk@26423 -
This commit is contained in:
parent
75f8643d7d
commit
e03811d82e
@ -32,8 +32,6 @@ interface
|
|||||||
|
|
||||||
{$I codetools.inc}
|
{$I codetools.inc}
|
||||||
|
|
||||||
{ $DEFINE DisableIgnoreErrorAfter}
|
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF MEM_CHECK}
|
{$IFDEF MEM_CHECK}
|
||||||
MemCheck,
|
MemCheck,
|
||||||
|
@ -72,9 +72,6 @@ interface
|
|||||||
{$IFDEF ShowTriedIdentifiers}{$DEFINE DebugPrefix}{$ENDIF}
|
{$IFDEF ShowTriedIdentifiers}{$DEFINE DebugPrefix}{$ENDIF}
|
||||||
{$IFDEF ShowTriedContexts}{$DEFINE DebugPrefix}{$ENDIF}
|
{$IFDEF ShowTriedContexts}{$DEFINE DebugPrefix}{$ENDIF}
|
||||||
|
|
||||||
// new features
|
|
||||||
{ $DEFINE DisableIgnoreErrorAfter}
|
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF MEM_CHECK}
|
{$IFDEF MEM_CHECK}
|
||||||
MemCheck,
|
MemCheck,
|
||||||
@ -1217,7 +1214,7 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if DirtySrc<>nil then DirtySrc.Clear;
|
if DirtySrc<>nil then DirtySrc.Clear;
|
||||||
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
||||||
[{$IFNDEF DisableIgnoreErrorAfter}btSetIgnoreErrorPos{$ENDIF}]);
|
[btSetIgnoreErrorPos]);
|
||||||
{$IFDEF CTDEBUG}
|
{$IFDEF CTDEBUG}
|
||||||
DebugLn('TFindDeclarationTool.FindDeclarationOfIdentifier B CleanCursorPos=',dbgs(CleanCursorPos));
|
DebugLn('TFindDeclarationTool.FindDeclarationOfIdentifier B CleanCursorPos=',dbgs(CleanCursorPos));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -1407,8 +1404,7 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if DirtySrc<>nil then DirtySrc.Clear;
|
if DirtySrc<>nil then DirtySrc.Clear;
|
||||||
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
||||||
[{$IFNDEF DisableIgnoreErrorAfter}btSetIgnoreErrorPos,{$ENDIF}
|
[btSetIgnoreErrorPos,btLoadDirtySource,btCursorPosOutAllowed]);
|
||||||
btLoadDirtySource,btCursorPosOutAllowed]);
|
|
||||||
{$IFDEF CTDEBUG}
|
{$IFDEF CTDEBUG}
|
||||||
DebugLn('TFindDeclarationTool.FindDeclaration C CleanCursorPos=',dbgs(CleanCursorPos));
|
DebugLn('TFindDeclarationTool.FindDeclaration C CleanCursorPos=',dbgs(CleanCursorPos));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -3872,7 +3868,7 @@ begin
|
|||||||
ActivateGlobalWriteLock;
|
ActivateGlobalWriteLock;
|
||||||
try
|
try
|
||||||
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
||||||
[{$IFNDEF DisableIgnoreErrorAfter}btSetIgnoreErrorPos{$ENDIF}]);
|
[btSetIgnoreErrorPos]);
|
||||||
|
|
||||||
// find class node
|
// find class node
|
||||||
ANode:=FindDeepestNodeAtPos(CleanCursorPos,true);
|
ANode:=FindDeepestNodeAtPos(CleanCursorPos,true);
|
||||||
|
@ -43,10 +43,6 @@ interface
|
|||||||
{ $DEFINE ShowFilteredIdents}
|
{ $DEFINE ShowFilteredIdents}
|
||||||
{ $DEFINE ShowHistory}
|
{ $DEFINE ShowHistory}
|
||||||
|
|
||||||
// new features
|
|
||||||
{ $DEFINE DisableIgnoreErrorAfter}
|
|
||||||
|
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF MEM_CHECK}
|
{$IFDEF MEM_CHECK}
|
||||||
MemCheck,
|
MemCheck,
|
||||||
@ -1706,8 +1702,7 @@ begin
|
|||||||
{$IFDEF CTDEBUG}
|
{$IFDEF CTDEBUG}
|
||||||
DebugLn('TIdentCompletionTool.ParseSourceTillCollectionStart A CursorPos=',dbgs(CursorPos.X),',',dbgs(CursorPos.Y),' ',DbgsCXY(IdentStartXYPos));
|
DebugLn('TIdentCompletionTool.ParseSourceTillCollectionStart A CursorPos=',dbgs(CursorPos.X),',',dbgs(CursorPos.Y),' ',DbgsCXY(IdentStartXYPos));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,[btSetIgnoreErrorPos]);
|
||||||
[{$IFNDEF DisableIgnoreErrorAfter}btSetIgnoreErrorPos{$ENDIF}]);
|
|
||||||
|
|
||||||
// find node at position
|
// find node at position
|
||||||
CursorNode:=BuildSubTreeAndFindDeepestNodeAtPos(CleanCursorPos,true);
|
CursorNode:=BuildSubTreeAndFindDeepestNodeAtPos(CleanCursorPos,true);
|
||||||
@ -2388,7 +2383,7 @@ begin
|
|||||||
Params:=nil;
|
Params:=nil;
|
||||||
try
|
try
|
||||||
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
||||||
[{$IFNDEF DisableIgnoreErrorAfter}btSetIgnoreErrorPos{$ENDIF}]);
|
[btSetIgnoreErrorPos]);
|
||||||
|
|
||||||
// find node at position
|
// find node at position
|
||||||
CursorNode:=BuildSubTreeAndFindDeepestNodeAtPos(CleanCursorPos,true);
|
CursorNode:=BuildSubTreeAndFindDeepestNodeAtPos(CleanCursorPos,true);
|
||||||
@ -2462,7 +2457,7 @@ begin
|
|||||||
Params:=nil;
|
Params:=nil;
|
||||||
try
|
try
|
||||||
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
||||||
[{$IFNDEF DisableIgnoreErrorAfter}btSetIgnoreErrorPos{$ENDIF}]);
|
[btSetIgnoreErrorPos]);
|
||||||
|
|
||||||
// find node at position
|
// find node at position
|
||||||
CursorNode:=BuildSubTreeAndFindDeepestNodeAtPos(CleanCursorPos,true);
|
CursorNode:=BuildSubTreeAndFindDeepestNodeAtPos(CleanCursorPos,true);
|
||||||
|
@ -41,7 +41,6 @@ interface
|
|||||||
|
|
||||||
{$I codetools.inc}
|
{$I codetools.inc}
|
||||||
|
|
||||||
{ $DEFINE DisableIgnoreErrorAfter}
|
|
||||||
{$DEFINE VerboseGetStringConstBounds}
|
{$DEFINE VerboseGetStringConstBounds}
|
||||||
{ $DEFINE ShowCompleteBlock}
|
{ $DEFINE ShowCompleteBlock}
|
||||||
|
|
||||||
@ -6049,7 +6048,7 @@ begin
|
|||||||
Result:=false;
|
Result:=false;
|
||||||
NewPos:=CursorPos;
|
NewPos:=CursorPos;
|
||||||
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
||||||
[{$IFNDEF DisableIgnoreErrorAfter}btSetIgnoreErrorPos{$ENDIF}]);
|
[btSetIgnoreErrorPos]);
|
||||||
StartNode:=FindDeepestNodeAtPos(CleanCursorPos,true);
|
StartNode:=FindDeepestNodeAtPos(CleanCursorPos,true);
|
||||||
|
|
||||||
SourceChangeCache.MainScanner:=Scanner;
|
SourceChangeCache.MainScanner:=Scanner;
|
||||||
@ -6120,7 +6119,7 @@ begin
|
|||||||
Result:=false;
|
Result:=false;
|
||||||
try
|
try
|
||||||
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
BuildTreeAndGetCleanPos(trTillCursor,CursorPos,CleanCursorPos,
|
||||||
[{$IFNDEF DisableIgnoreErrorAfter}btSetIgnoreErrorPos{$ENDIF}]);
|
[btSetIgnoreErrorPos]);
|
||||||
LinkIndex:=Scanner.LinkIndexAtCleanPos(CleanCursorPos);
|
LinkIndex:=Scanner.LinkIndexAtCleanPos(CleanCursorPos);
|
||||||
LinkIndex:=Scanner.FindParentLink(LinkIndex);
|
LinkIndex:=Scanner.FindParentLink(LinkIndex);
|
||||||
if LinkIndex<0 then
|
if LinkIndex<0 then
|
||||||
|
Loading…
Reference in New Issue
Block a user