mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 16:09:26 +02:00
IDE: Restore Jump to Implementation menu item accidentally removed in r49226 #c6b6503cf2.
git-svn-id: trunk@50943 -
This commit is contained in:
parent
dfebe2190c
commit
bbe1b886f7
@ -144,6 +144,7 @@ type
|
||||
Shift: TShiftState);
|
||||
procedure IdleTimer1Timer(Sender: TObject);
|
||||
procedure JumpToMenuItemClick(Sender: TObject);
|
||||
procedure JumpToImplementationMenuItemClick(Sender: TObject);
|
||||
procedure OnCloseIDE(Sender: TObject);
|
||||
procedure ShowSrcEditPosMenuItemClick(Sender: TObject);
|
||||
procedure MainNotebookPageChanged(Sender: TObject);
|
||||
@ -282,6 +283,7 @@ const
|
||||
var
|
||||
CodeExplorerView: TCodeExplorerView = nil;
|
||||
CEJumpToIDEMenuCommand: TIDEMenuCommand;
|
||||
CEJumpToImplementationIDEMenuCommand: TIDEMenuCommand;
|
||||
CEShowSrcEditPosIDEMenuCommand: TIDEMenuCommand;
|
||||
CERefreshIDEMenuCommand: TIDEMenuCommand;
|
||||
CERenameIDEMenuCommand: TIDEMenuCommand;
|
||||
@ -372,6 +374,8 @@ begin
|
||||
CodeExplorerMenuRoot:=RegisterIDEMenuRoot(CodeExplorerMenuRootName);
|
||||
Path:=CodeExplorerMenuRoot.Name;
|
||||
CEJumpToIDEMenuCommand:=RegisterIDEMenuCommand(Path, 'Jump to', lisMenuJumpTo);
|
||||
CEJumpToImplementationIDEMenuCommand:=RegisterIDEMenuCommand(Path,
|
||||
'Jump to implementation', lisMenuJumpToImplementation);
|
||||
CEShowSrcEditPosIDEMenuCommand:=RegisterIDEMenuCommand(Path, 'Show position of source editor',
|
||||
lisShowPositionOfSourceEditor);
|
||||
CERefreshIDEMenuCommand:=RegisterIDEMenuCommand(Path, 'Refresh', dlgUnitDepRefresh);
|
||||
@ -511,6 +515,7 @@ begin
|
||||
//CodeExplorerMenuRoot.Items.WriteDebugReport(' ');
|
||||
|
||||
CEJumpToIDEMenuCommand.OnClick:=@JumpToMenuItemClick;
|
||||
CEJumpToImplementationIDEMenuCommand.OnClick:=@JumpToImplementationMenuItemClick;
|
||||
CEShowSrcEditPosIDEMenuCommand.OnClick:=@ShowSrcEditPosMenuItemClick;
|
||||
CERefreshIDEMenuCommand.OnClick:=@RefreshMenuItemClick;
|
||||
CERenameIDEMenuCommand.OnClick:=@RenameMenuItemClick;
|
||||
@ -624,6 +629,11 @@ begin
|
||||
JumpToSelection(false);
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerView.JumpToImplementationMenuItemClick(Sender: TObject);
|
||||
begin
|
||||
JumpToSelection(true);
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerView.OnCloseIDE(Sender: TObject);
|
||||
begin
|
||||
CodeExplorerOptions.Save;
|
||||
@ -688,8 +698,10 @@ var
|
||||
CurItem: TTreeNode;
|
||||
CanRename: boolean;
|
||||
CurNode: TViewNodeData;
|
||||
HasImplementation: Boolean;
|
||||
begin
|
||||
CanRename:=false;
|
||||
HasImplementation:=false;
|
||||
CurTreeView:=GetCurrentTreeView;
|
||||
if CurTreeView<>nil then begin
|
||||
if tvoAllowMultiselect in CurTreeView.Options then
|
||||
@ -708,9 +720,13 @@ begin
|
||||
;
|
||||
end;
|
||||
end;
|
||||
if (CurNode.ImplementationNode<>nil)
|
||||
and (CurNode.ImplementationNode.StartPos>0) then
|
||||
HasImplementation:=true;
|
||||
end;
|
||||
end;
|
||||
CERenameIDEMenuCommand.Visible:=CanRename;
|
||||
CEJumpToImplementationIDEMenuCommand.Visible:=HasImplementation;
|
||||
//DebugLn(['TCodeExplorerView.TreePopupmenuPopup ',CERenameIDEMenuCommand.Visible]);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user