mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-21 21:45:57 +02:00
InspectDlg: add button "add watch"
git-svn-id: trunk@65146 -
This commit is contained in:
parent
30d807f741
commit
c942b091f8
@ -154,5 +154,18 @@ object IDEInspectDlg: TIDEInspectDlg
|
||||
Caption = 'ToolButton4'
|
||||
Style = tbsDivider
|
||||
end
|
||||
object BtnAddWatch: TToolButton
|
||||
Left = 188
|
||||
Top = 2
|
||||
Caption = 'Add Watch'
|
||||
OnClick = BtnAddWatchClick
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 180
|
||||
Height = 22
|
||||
Top = 2
|
||||
Caption = 'ToolButton3'
|
||||
Style = tbsSeparator
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -60,12 +60,15 @@ type
|
||||
ToolBar1: TToolBar;
|
||||
btnUseInstance: TToolButton;
|
||||
btnBackward: TToolButton;
|
||||
BtnAddWatch: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
btnColClass: TToolButton;
|
||||
btnColType: TToolButton;
|
||||
btnColVisibility: TToolButton;
|
||||
btnForward: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
ToolButton4: TToolButton;
|
||||
procedure BtnAddWatchClick(Sender: TObject);
|
||||
procedure btnBackwardClick(Sender: TObject);
|
||||
procedure btnColClassClick(Sender: TObject);
|
||||
procedure btnForwardClick(Sender: TObject);
|
||||
@ -300,6 +303,27 @@ begin
|
||||
GotoHistory(FHistoryIndex - 1);
|
||||
end;
|
||||
|
||||
procedure TIDEInspectDlg.BtnAddWatchClick(Sender: TObject);
|
||||
var
|
||||
w: TCurrentWatch;
|
||||
begin
|
||||
if DebugBoss = nil then
|
||||
exit;
|
||||
DebugBoss.Watches.CurrentWatches.BeginUpdate;
|
||||
try
|
||||
w := DebugBoss.Watches.CurrentWatches.Find(FExpression);
|
||||
if w = nil then
|
||||
w := DebugBoss.Watches.CurrentWatches.Add(FExpression);
|
||||
if (w <> nil) then begin
|
||||
w.Enabled := True;
|
||||
DebugBoss.ViewDebugDialog(ddtWatches, False);
|
||||
end;
|
||||
finally
|
||||
DebugBoss.Watches.CurrentWatches.EndUpdate;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TIDEInspectDlg.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
if (Key = VK_ESCAPE) and not Docked then
|
||||
@ -797,6 +821,7 @@ begin
|
||||
btnBackward.Caption := '';
|
||||
btnForward.ImageIndex := IDEImages.LoadImage('arrow_right');
|
||||
btnForward.Caption := '';
|
||||
BtnAddWatch.Caption:=lisInspectAddWatch;
|
||||
|
||||
btnUseInstance.Enabled := False;
|
||||
btnColClass.Enabled := False;
|
||||
|
@ -559,6 +559,7 @@ resourcestring
|
||||
lisInspectClassInherit = '%s: class %s inherits from %s';
|
||||
lisInspectUnavailableError = '%s: unavailable (error: %s)';
|
||||
lisInspectPointerTo = 'Pointer to %s';
|
||||
lisInspectAddWatch = 'Add watch';
|
||||
lisColClass = 'Class';
|
||||
lisColVisibility = 'Visibility';
|
||||
lisColReturns = 'Returns';
|
||||
|
Loading…
Reference in New Issue
Block a user