mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 08:28:14 +02:00
examples: codetools: register shortcut, issue #27094
git-svn-id: trunk@46994 -
This commit is contained in:
parent
e563b55f2c
commit
6c3808768e
@ -27,7 +27,8 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, MenuIntf, LazIDEIntf, Controls, SrcEditorIntf,
|
||||
CodeToolManager, CodeTree, CodeCache, CodeAtom, CustomCodeTool;
|
||||
CodeToolManager, CodeTree, CodeCache, CustomCodeTool, IDECommands,
|
||||
LCLType;
|
||||
|
||||
procedure JumpIDEToImplementationKeyword(Sender: TObject);
|
||||
|
||||
@ -91,9 +92,18 @@ begin
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
var
|
||||
Key: TIDEShortCut;
|
||||
Cat: TIDECommandCategory;
|
||||
CmdMyTool: TIDECommand;
|
||||
begin
|
||||
// register IDE shortcut and menu item
|
||||
Key := IDEShortCut(VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
Cat:=IDECommandList.FindCategoryByName(CommandCategoryCodeTools);
|
||||
CmdMyTool := RegisterIDECommand(Cat,'JumpToImplementation', 'Jump to implementation keyword', Key, nil, @JumpIDEToImplementationKeyword);
|
||||
|
||||
RegisterIDEMenuCommand(itmCodeToolSearches,'JumpToImplementation',
|
||||
'Jump to implementation keyword',nil,@JumpIDEToImplementationKeyword);
|
||||
'Jump to implementation keyword',nil,@JumpIDEToImplementationKeyword, CmdMyTool);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user