mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 06:08:17 +02:00
added evaluate text at cursor during debugging from Darek
git-svn-id: trunk@9419 -
This commit is contained in:
parent
a49b4716a8
commit
5d2766a239
@ -468,7 +468,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
ClearLastError;
|
||||
DebugLn('TPascalParserTool.BuildTree B OnlyIntf=',dbgs(OnlyInterfaceNeeded),' ',TCodeBuffer(Scanner.MainCode).Filename);
|
||||
// DebugLn('TPascalParserTool.BuildTree B OnlyIntf=',dbgs(OnlyInterfaceNeeded),' ',TCodeBuffer(Scanner.MainCode).Filename);
|
||||
//CheckHeap('TBasicCodeTool.BuildTree B '+IntToStr(MemCheck_GetMem_Cnt));
|
||||
|
||||
// scan code
|
||||
|
@ -63,8 +63,14 @@ type
|
||||
Shift: TShiftState);
|
||||
procedure tbEvaluateClick(Sender: TObject);
|
||||
procedure tbWatchClick(Sender: TObject);
|
||||
|
||||
private
|
||||
function GetFindText: string;
|
||||
procedure SetFindText(const NewFindText: string);
|
||||
|
||||
public
|
||||
property FindText: string read GetFindText write SetFindText;
|
||||
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -92,6 +98,22 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEvaluateDlg.SetFindText(const NewFindText: string);
|
||||
begin
|
||||
if NewFindText<>'' then begin
|
||||
cmbExpression.Text := NewFindText;
|
||||
cmbExpression.SelectAll;
|
||||
tbEvaluate.Click;
|
||||
end;
|
||||
ActiveControl := cmbExpression;
|
||||
end;
|
||||
|
||||
function TEvaluateDlg.GetFindText: string;
|
||||
begin
|
||||
Result := cmbExpression.Text;
|
||||
end;
|
||||
|
||||
|
||||
procedure TEvaluateDlg.FormShow(Sender: TObject);
|
||||
begin
|
||||
cmbExpression.SetFocus;
|
||||
|
@ -1114,7 +1114,7 @@ begin
|
||||
then Include(FManagerStates,dmsInitializingDebuggerObjectFailed);
|
||||
end;
|
||||
|
||||
DebugLn('[TDebugManager.OnDebuggerChangeState] state: ', STATENAME[FDebugger.State]);
|
||||
//DebugLn('[TDebugManager.OnDebuggerChangeState] state: ', STATENAME[FDebugger.State]);
|
||||
|
||||
// All conmmands
|
||||
// -------------------
|
||||
@ -1313,6 +1313,11 @@ begin
|
||||
TBreakPointsDlg(CurDialog).BaseDirectory:=Project1.ProjectDirectory;
|
||||
end;
|
||||
end;
|
||||
if (CurDialog is tEvaluateDlg) and (sourceNotebook<>nil)
|
||||
then begin
|
||||
tEvaluateDlg(CurDialog).FindText:=
|
||||
SourceNotebook.GetActiveSE.GetWordAtCurrentCaret;
|
||||
end;
|
||||
FDialogs[ADialogType].Show;
|
||||
FDialogs[ADialogType].BringToFront;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user