mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 20:49:30 +02:00
codetools: completeblock debugging
git-svn-id: trunk@35002 -
This commit is contained in:
parent
00ccb9351a
commit
197ac89ba8
@ -5467,6 +5467,9 @@ var
|
||||
exit;
|
||||
end;
|
||||
AtomInFrontOfCursor:=LastAtoms.GetValueAt(0);
|
||||
{$IFDEF VerboseCompleteBlock}
|
||||
DebugLn(['ReadStatements reached cursor: ',CleanPosToStr(CurPos.StartPos),' CursorBlockOuterIndent=',CursorBlockOuterIndent,' CursorBlockInnerIndent=',CursorBlockInnerIndent,' LastAtom=',GetAtom(AtomInFrontOfCursor),' CurAtom=',GetAtom]);
|
||||
{$ENDIF}
|
||||
if (CurPos.Flag=cafSemicolon)
|
||||
and ((AtomInFrontOfCursor.Flag=cafSemicolon)
|
||||
or (CursorBlock.StartPos=AtomInFrontOfCursor.StartPos))
|
||||
|
@ -131,6 +131,16 @@ end;
|
||||
|
||||
procedure TTestCodetoolsCompleteBlock.TestCompleteBlockClassStart;
|
||||
begin
|
||||
{ Not implemented yet:
|
||||
CompleteBlock('procedure a;'+LineEnding
|
||||
+'begin|'+LineEnding
|
||||
+'begin'+LineEnding
|
||||
+'end.',
|
||||
'procedure a;'+LineEnding
|
||||
+'begin|'+LineEnding
|
||||
+'end;'+LineEnding
|
||||
+'begin'+LineEnding
|
||||
+'end.');}
|
||||
CompleteBlock('type'+LineEnding
|
||||
+' TTestClass = class(TObject)|',
|
||||
'type'+LineEnding
|
||||
@ -181,6 +191,13 @@ begin
|
||||
+' case of|'+LineEnding
|
||||
+' end;'+LineEnding
|
||||
+'end.');
|
||||
CompleteBlock('begin'+LineEnding
|
||||
+' case of|'+LineEnding
|
||||
+'end.',
|
||||
'begin'+LineEnding
|
||||
+' case of|'+LineEnding
|
||||
+' end;'+LineEnding
|
||||
+'end.');
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
Loading…
Reference in New Issue
Block a user