cody: added function to insert an int64 id

git-svn-id: trunk@53019 -
This commit is contained in:
mattias 2016-09-22 14:31:49 +00:00
parent 284c7d20d0
commit 291ce7da29
2 changed files with 15 additions and 0 deletions

View File

@ -131,6 +131,10 @@ begin
CreateSourceCommand(CmdCatCodeTools,'InsertCallInherited',
crsInsertCallInherited,nil,@InsertCallInherited);
// insert int64 ID
CreateSourceCommand(CmdCatCodeTools,'InsertInt64ID',
'Insert int64 id YYYYDDMMhhnnss',nil,@InsertInt64ID);
// Show unit / identifier dictionary
InitUnitDictionary;
CreateSourceCommand(CmdCatCodeTools,'ShowUnitDictionary',

View File

@ -110,6 +110,7 @@ type
procedure ExplodeAWithBlockCmd(Sender: TObject);
procedure InsertFileAtCursor(Sender: TObject);
procedure InsertCallInherited(Sender: TObject);
procedure InsertInt64ID(Sender: TObject);
function ParseTilCursor(out Tool: TCodeTool; out CleanPos: integer;
out Node: TCodeTreeNode; out ErrorHandled: boolean;
@ -318,6 +319,16 @@ begin
end;
end;
procedure InsertInt64ID(Sender: TObject);
var
SrcEdit: TSourceEditorInterface;
begin
SrcEdit:=SourceEditorManagerIntf.ActiveEditor;
if SrcEdit=nil then exit;
SrcEdit.Selection:=FormatDateTime('YYYYMMDDhhnnss',Now);
end;
function ParseTilCursor(out Tool: TCodeTool; out CleanPos: integer;
out Node: TCodeTreeNode; out ErrorHandled: boolean;
JumpToError: boolean; CodePos: PCodeXYPosition): TCUParseError;