codetools: debugging

git-svn-id: trunk@26856 -
This commit is contained in:
mattias 2010-07-27 14:51:53 +00:00
parent fb877424e0
commit d66103ac53

View File

@ -5348,6 +5348,9 @@ var
CursorBlockLvl:=Stack.Top; CursorBlockLvl:=Stack.Top;
if CursorBlockLvl<0 then begin if CursorBlockLvl<0 then begin
// cursor outside blocks or on first atom of first block // cursor outside blocks or on first atom of first block
{$IFDEF ShowCompleteBlock}
DebugLn(['ReadStatements no completion: cursor outside blocks or on first atom of first block ',CleanPosToStr(CurPos.StartPos)]);
{$ENDIF}
exit; exit;
end else begin end else begin
CursorBlock:=Stack.Stack[CursorBlockLvl]; CursorBlock:=Stack.Stack[CursorBlockLvl];
@ -5356,6 +5359,9 @@ var
if (CursorBlockInnerIndent<=CursorBlockOuterIndent) if (CursorBlockInnerIndent<=CursorBlockOuterIndent)
and OnlyIfCursorBlockIndented then begin and OnlyIfCursorBlockIndented then begin
// cursor block not indented // cursor block not indented
{$IFDEF ShowCompleteBlock}
DebugLn(['ReadStatements no completion: cursor block not indented ',CleanPosToStr(CurPos.StartPos),' CursorBlockOuterIndent=',CursorBlockOuterIndent,' CursorBlockInnerIndent=',CursorBlockInnerIndent]);
{$ENDIF}
exit; exit;
end; end;
AtomInFrontOfCursor:=LastAtoms.GetValueAt(0); AtomInFrontOfCursor:=LastAtoms.GetValueAt(0);
@ -5392,11 +5398,11 @@ var
and not PositionsInSameLine(Src,LastPos,CurPos.StartPos); and not PositionsInSameLine(Src,LastPos,CurPos.StartPos);
if LineStart then if LineStart then
Indent:=GetLineIndent(Src,CurPos.StartPos); Indent:=GetLineIndent(Src,CurPos.StartPos);
if LineStart and (NeedCompletion=0) then begin if LineStart and (NeedCompletion=0) then begin
// atom is in same block as cursor (not sub block) // atom is in same block as cursor (not sub block)
// and first atom of a line // and first atom of a line
// => check indent // => check indent
//debugln(['CompleteStatements first atom of line in cursor block: ',GetAtom,' Indent=',Indent,' CursorBlockOuterIndent=',CursorBlockOuterIndent,' CursorBlockOuterIndent=',CursorBlockOuterIndent]);
if (Indent=CursorBlockOuterIndent) then begin if (Indent=CursorBlockOuterIndent) then begin
if (CursorBlockLvl>0) if (CursorBlockLvl>0)
and (Stack.Stack[CursorBlockLvl-1].InnerIndent=Indent) and (Stack.Stack[CursorBlockLvl-1].InnerIndent=Indent)