From d3513326449f1b1e7b2b18fc2a85a64d05490f91 Mon Sep 17 00:00:00 2001 From: lazarus Date: Sun, 18 Aug 2002 08:54:44 +0000 Subject: [PATCH] MG: added smart hints in debug mode git-svn-id: trunk@2838 - --- ide/main.pp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ide/main.pp b/ide/main.pp index e3fd8b4c7f..425d162631 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -6729,8 +6729,10 @@ var ActiveSrcEdit: TSourceEditor; ActiveUnitInfo: TUnitInfo; Identifier, SmartHintStr: string; + DebugEval: string; begin - if (ToolStatus<>itNone) or (SrcEdit=nil) then exit; + if (SrcEdit=nil) then exit; + if (ToolStatus<>itNone) and (ToolStatus<>itDebugger) then exit; // check if there is an identifier Identifier:=SrcEdit.GetWordFromCaret(CaretPos); if (Identifier='') or (not IsValidIdent(Identifier)) then exit; @@ -6748,6 +6750,13 @@ begin CodeToolBoss.Abortable:=false; {$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TMainIDE.OnSrcNotebookShowHintForSource B');{$ENDIF} + if (ToolStatus=itDebugger) + and (dcEvaluate in DebugBoss.Commands) then begin + DebugBoss.Evaluate(Identifier,DebugEval); + if (DebugEval<>'') then + SmartHintStr:=SmartHintStr+' = '+DebugEval; + end; + if SmartHintStr<>'' then SrcEdit.ActivateHint(ClientPos,SmartHintStr); end; @@ -7484,6 +7493,9 @@ end. { ============================================================================= $Log$ + Revision 1.429 2002/11/10 22:02:35 lazarus + MG: added smart hints in debug mode + Revision 1.428 2002/11/10 21:49:23 lazarus MG: added smart hints in edit mode