mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 14:38:14 +02:00
codetools: code templates: fixed using params
git-svn-id: trunk@48652 -
This commit is contained in:
parent
06bcb15e19
commit
b44c1e81a6
@ -87,7 +87,7 @@ unit CodeCompletionTemplater;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, laz2_DOM, laz2_XMLRead, LazFileUtils, LazUTF8Classes,
|
Classes, SysUtils, laz2_DOM, laz2_XMLRead, LazFileUtils,
|
||||||
CodeCache, FileProcs;
|
CodeCache, FileProcs;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -190,7 +190,7 @@ begin
|
|||||||
Template := FindTemplate(TemplateName);
|
Template := FindTemplate(TemplateName);
|
||||||
if Template = nil then
|
if Template = nil then
|
||||||
raise Exception.Create('Template "' + TemplateName + '" not found in TemplateExpander.');
|
raise Exception.Create('Template "' + TemplateName + '" not found in TemplateExpander.');
|
||||||
Result := ExpandTemplate(Template, #13#10, ' ', ArgName, ArgVal);
|
Result := ExpandTemplate(Template, LineEnd, Indent, ArgName, ArgVal);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TTemplateExpander.ExpandTemplate(Template: TDOMNode; LineEnd,
|
function TTemplateExpander.ExpandTemplate(Template: TDOMNode; LineEnd,
|
||||||
@ -218,7 +218,7 @@ begin
|
|||||||
raise Exception.Create('ExpandTemplate could not find Argument named "' + Name + '"');
|
raise Exception.Create('ExpandTemplate could not find Argument named "' + Name + '"');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetBoolArgValue(Name : String; Index : Integer = -1): Boolean;
|
function GetBoolArgValue(Name : String): Boolean;
|
||||||
var
|
var
|
||||||
I : Integer;
|
I : Integer;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user