mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 00:08:11 +02:00
debugger: add CopyAll to locals dialog. Issue #29467, patch by Cyrax
git-svn-id: trunk@51374 -
This commit is contained in:
parent
5baa72597f
commit
4b5db67a88
@ -1,4 +1,4 @@
|
||||
inherited LocalsDlg: TLocalsDlg
|
||||
object LocalsDlg: TLocalsDlg
|
||||
Left = 359
|
||||
Height = 200
|
||||
Top = 126
|
||||
@ -10,7 +10,8 @@ inherited LocalsDlg: TLocalsDlg
|
||||
Caption = 'Locals'
|
||||
ClientHeight = 200
|
||||
ClientWidth = 500
|
||||
object lvLocals: TListView[0]
|
||||
LCLVersion = '1.7'
|
||||
object lvLocals: TListView
|
||||
Left = 0
|
||||
Height = 200
|
||||
Top = 0
|
||||
@ -32,7 +33,7 @@ inherited LocalsDlg: TLocalsDlg
|
||||
TabOrder = 0
|
||||
ViewStyle = vsReport
|
||||
end
|
||||
object ActionList1: TActionList[1]
|
||||
object ActionList1: TActionList
|
||||
left = 152
|
||||
top = 80
|
||||
object actInspect: TAction
|
||||
@ -68,8 +69,14 @@ inherited LocalsDlg: TLocalsDlg
|
||||
OnExecute = actCopyValueExecute
|
||||
OnUpdate = actInspectUpdate
|
||||
end
|
||||
object actCopyAll: TAction
|
||||
Category = 'copy'
|
||||
Caption = 'actCopyAll'
|
||||
OnExecute = actCopyAllExecute
|
||||
OnUpdate = actCopyAllUpdate
|
||||
end
|
||||
end
|
||||
object PopupMenu1: TPopupMenu[2]
|
||||
object PopupMenu1: TPopupMenu
|
||||
left = 38
|
||||
top = 75
|
||||
object MenuItem1: TMenuItem
|
||||
@ -90,5 +97,8 @@ inherited LocalsDlg: TLocalsDlg
|
||||
object MenuItem6: TMenuItem
|
||||
Action = actCopyValue
|
||||
end
|
||||
object MenuItem7: TMenuItem
|
||||
Action = actCopyAll
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -49,6 +49,7 @@ type
|
||||
actEvaluate: TAction;
|
||||
actCopyName: TAction;
|
||||
actCopyValue: TAction;
|
||||
actCopyAll: TAction;
|
||||
actWath: TAction;
|
||||
ActionList1: TActionList;
|
||||
lvLocals: TListView;
|
||||
@ -58,7 +59,10 @@ type
|
||||
MenuItem4: TMenuItem;
|
||||
MenuItem5: TMenuItem;
|
||||
MenuItem6: TMenuItem;
|
||||
MenuItem7: TMenuItem;
|
||||
PopupMenu1: TPopupMenu;
|
||||
procedure actCopyAllExecute(Sender: TObject);
|
||||
procedure actCopyAllUpdate(Sender: TObject);
|
||||
procedure actCopyNameExecute(Sender: TObject);
|
||||
procedure actCopyValueExecute(Sender: TObject);
|
||||
procedure actEvaluateExecute(Sender: TObject);
|
||||
@ -135,6 +139,7 @@ begin
|
||||
actEvaluate.Caption := lisEvaluateModify;
|
||||
actCopyName.Caption := lisLocalsDlgCopyName;
|
||||
actCopyValue.Caption := lisLocalsDlgCopyValue;
|
||||
actCopyAll.Caption := lisCopyAll;
|
||||
|
||||
for i := low(COL_WIDTHS) to high(COL_WIDTHS) do
|
||||
lvLocals.Column[i].Width := COL_WIDTHS[i];
|
||||
@ -176,6 +181,27 @@ begin
|
||||
Clipboard.Close;
|
||||
end;
|
||||
|
||||
procedure TLocalsDlg.actCopyAllExecute(Sender: TObject);
|
||||
Var
|
||||
AStringList : TStringList;
|
||||
I : Integer;
|
||||
begin
|
||||
if lvLocals.Items.Count > 0 then begin
|
||||
AStringList := TStringList.Create;
|
||||
for I := 0 to lvLocals.Items.Count - 1 do
|
||||
AStringList.Values[lvLocals.Items[I].Caption] := lvLocals.Items[I].SubItems[0];
|
||||
Clipboard.Open;
|
||||
Clipboard.AsText := AStringList.Text;
|
||||
Clipboard.Close;
|
||||
FreeAndNil(AStringList);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TLocalsDlg.actCopyAllUpdate(Sender: TObject);
|
||||
begin
|
||||
(Sender as TAction).Enabled := lvLocals.Items.Count > 0;
|
||||
end;
|
||||
|
||||
procedure TLocalsDlg.actCopyValueExecute(Sender: TObject);
|
||||
begin
|
||||
Clipboard.Open;
|
||||
|
Loading…
Reference in New Issue
Block a user