ide: add Evaluate/Modify item to the source editor debug menu

git-svn-id: trunk@21976 -
This commit is contained in:
paul 2009-10-02 06:53:42 +00:00
parent 5c17d9b336
commit a32cbde664
4 changed files with 12 additions and 0 deletions

View File

@ -1873,6 +1873,8 @@ end;
procedure TDebugManager.ConnectSourceNotebookEvents;
begin
SrcEditMenuAddWatchAtCursor.OnClick:=@mnuAddWatchClicked;
SrcEditMenuEvaluateModify.OnClick:=@mnuViewDebugDialogClick;
SrcEditMenuEvaluateModify.Tag := Ord(ddtEvaluate);
end;
procedure TDebugManager.SetupMainBarShortCuts;
@ -1910,6 +1912,7 @@ procedure TDebugManager.SetupSourceMenuShortCuts;
begin
SrcEditMenuToggleBreakpoint.Command:=GetCommand(ecToggleBreakPoint);
SrcEditMenuRunToCursor.Command:=GetCommand(ecRunToCursor);
SrcEditMenuEvaluateModify.Command:=GetCommand(ecEvaluate);
SrcEditMenuAddWatchAtCursor.Command:=GetCommand(ecAddWatch);
SrcEditMenuViewCallStack.Command:=GetCommand(ecToggleCallStack);
end;
@ -1944,6 +1947,8 @@ begin
itmRunMenuEvaluate.Enabled := (not DebuggerInvalid)
and (dcEvaluate in FDebugger.Commands);
SrcEditMenuEvaluateModify.Enabled := (not DebuggerInvalid)
and (dcEvaluate in FDebugger.Commands);
itmRunMenuAddWatch.Enabled := True; // always allow to add a watch
// TODO: add other debugger menuitems
// TODO: implement by actions

View File

@ -1934,6 +1934,7 @@ resourcestring
uemShowUnitInfo = 'Unit Info';
uemDebugWord = 'Debug';
uemToggleBreakpoint = '&Toggle Breakpoint';
uemEvaluateModify = '&Evaluate/Modify...';
uemAddWatchAtCursor = 'Add &Watch At Cursor';
uemRunToCursor='&Run to Cursor';
uemViewCallStack = 'View Call Stack';

View File

@ -1,3 +1,5 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TSourceNotebook','FORMDATA',[
'TPF0'#241#15'TSourceNotebook'#14'SourceNotebook'#4'Left'#3#21#2#6'Height'#3
+','#1#3'Top'#3'v'#1#5'Width'#3#144#1#14'AllowDropFiles'#9#7'Caption'#6#14'So'

View File

@ -874,6 +874,7 @@ var
// debugging
SrcEditMenuToggleBreakpoint: TIDEMenuCommand;
SrcEditMenuRunToCursor: TIDEMenuCommand;
SrcEditMenuEvaluateModify: TIDEMenuCommand;
SrcEditMenuAddWatchAtCursor: TIDEMenuCommand;
SrcEditMenuViewCallStack: TIDEMenuCommand;
// refactoring
@ -1041,6 +1042,9 @@ begin
// register the Debug submenu items
SrcEditMenuToggleBreakpoint:=RegisterIDEMenuCommand(AParent,'Toggle Breakpoint',
uemToggleBreakpoint);
SrcEditMenuEvaluateModify:=RegisterIDEMenuCommand(AParent,'Evaluate/Modify...',
uemEvaluateModify, nil, nil, nil,'debugger_modify');
SrcEditMenuEvaluateModify.Enabled:=False;
SrcEditMenuAddWatchAtCursor:=RegisterIDEMenuCommand(AParent,
'Add Watch at Cursor',uemAddWatchAtCursor);
SrcEditMenuRunToCursor:=RegisterIDEMenuCommand(AParent,