mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-17 11:59:35 +02:00
EditorMacros / PascalScript: fix missing cmd registration
git-svn-id: trunk@38423 -
This commit is contained in:
parent
a2a43cfe89
commit
efbdc6b949
@ -5,8 +5,9 @@ unit EMScriptMacro;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, SrcEditorIntf, Controls, SynEdit, SynEditKeyCmds, EMScriptClasses,
|
Classes, SysUtils, SrcEditorIntf, IDECommands, Controls, SynEdit, SynEditKeyCmds,
|
||||||
Laz2_XMLCfg, LazLoggerBase, uPSCompiler, uPSRuntime, uPSUtils, uPSC_std, uPSR_std;
|
EMScriptClasses, Laz2_XMLCfg, LazLoggerBase, uPSCompiler, uPSRuntime, uPSUtils, uPSC_std,
|
||||||
|
uPSR_std;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -113,8 +114,10 @@ begin
|
|||||||
begin
|
begin
|
||||||
SIRegisterTObject(Sender);
|
SIRegisterTObject(Sender);
|
||||||
//SIRegister_Std(Sender);
|
//SIRegister_Std(Sender);
|
||||||
if Sender is TEMSPSPascalCompiler then
|
if Sender is TEMSPSPascalCompiler then begin
|
||||||
GetEditorCommandValues(@TEMSPSPascalCompiler(Sender).AddECFuncToCompEnum);
|
GetEditorCommandValues(@TEMSPSPascalCompiler(Sender).AddECFuncToCompEnum);
|
||||||
|
GetIDEEditorCommandValues(@TEMSPSPascalCompiler(Sender).AddECFuncToCompEnum);
|
||||||
|
end;
|
||||||
|
|
||||||
CompRegisterBasics(TheCompiler);
|
CompRegisterBasics(TheCompiler);
|
||||||
CompRegisterTSynEdit(TheCompiler);
|
CompRegisterTSynEdit(TheCompiler);
|
||||||
@ -129,6 +132,7 @@ end;
|
|||||||
procedure AddECFuncToExec;
|
procedure AddECFuncToExec;
|
||||||
begin
|
begin
|
||||||
GetEditorCommandValues(@TheExec.AddECFuncToExecEnum);
|
GetEditorCommandValues(@TheExec.AddECFuncToExecEnum);
|
||||||
|
GetIDEEditorCommandValues(@TheExec.AddECFuncToExecEnum);
|
||||||
ExecRegisterBasics(TheExec);
|
ExecRegisterBasics(TheExec);
|
||||||
ExecRegisterTSynEdit(TheCLassImp);
|
ExecRegisterTSynEdit(TheCLassImp);
|
||||||
TheExec.RegisterFunctionName('CALLER', @HandleGetCaller, TheExec, nil);
|
TheExec.RegisterFunctionName('CALLER', @HandleGetCaller, TheExec, nil);
|
||||||
|
@ -666,6 +666,7 @@ function CompareIDEShortCutKey1s(Data1, Data2: Pointer): integer;
|
|||||||
|
|
||||||
function IdentToIDECommand(const Ident: string; var Cmd: longint): boolean;
|
function IdentToIDECommand(const Ident: string; var Cmd: longint): boolean;
|
||||||
function IDECommandToIdent(Cmd: longint; var Ident: string): boolean;
|
function IDECommandToIdent(Cmd: longint; var Ident: string): boolean;
|
||||||
|
procedure GetIDEEditorCommandValues(Proc: TGetStrProc);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -1579,5 +1580,13 @@ begin
|
|||||||
Result := IntToIdent(Cmd, Ident, IDEEditorCommandStrs);
|
Result := IntToIdent(Cmd, Ident, IDEEditorCommandStrs);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure GetIDEEditorCommandValues(Proc: TGetStrProc);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
for i := Low(IDEEditorCommandStrs) to High(IDEEditorCommandStrs) do
|
||||||
|
Proc(IDEEditorCommandStrs[I].Name);
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user