Evaluate a expression when EvaluateDlg is already shown

git-svn-id: trunk@60045 -
This commit is contained in:
michl 2019-01-09 14:55:35 +00:00
parent 8175bdfee6
commit 25cba76789
2 changed files with 13 additions and 0 deletions

View File

@ -101,6 +101,7 @@ type
procedure Modify;
public
constructor Create(TheOwner: TComponent); override;
procedure Execute(const AExpression: String);
property FindText: string read GetFindText write SetFindText;
end;
@ -149,6 +150,11 @@ begin
mnuHistory.Items[2].Caption:=dsrEvalHistoryDown;
end;
procedure TEvaluateDlg.Execute(const AExpression: String);
begin
SetFindText(AExpression);
end;
procedure TEvaluateDlg.EvaluateCallback(Sender: TObject; ASuccess: Boolean;
ResultText: String; ResultDBGType: TDBGType);
var

View File

@ -1680,6 +1680,13 @@ begin
else
TIDEInspectDlg(CurDialog).Execute(SourceEditorManager.GetActiveSE.GetOperandAtCurrentCaret);
end;
if (CurDialog is TEvaluateDlg) and (SourceEditorManager.GetActiveSE <> nil)
then begin
if SourceEditorManager.GetActiveSE.SelectionAvailable then
TEvaluateDlg(CurDialog).Execute(SourceEditorManager.GetActiveSE.Selection)
else
TEvaluateDlg(CurDialog).Execute(SourceEditorManager.GetActiveSE.GetOperandAtCurrentCaret);
end;
end;
if not DoDisableAutoSizing then
CurDialog.EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TDebugManager.ViewDebugDialog'){$ENDIF};