mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 01:19:16 +02:00
IDE: Fix and add some Code Templates. Issue #40657, patch by n7800.
This commit is contained in:
parent
c2350a8d1c
commit
ddfe91b020
Binary file not shown.
@ -24,8 +24,7 @@ EnableMakros=true
|
|||||||
$(AttributesEnd)
|
$(AttributesEnd)
|
||||||
begin
|
begin
|
||||||
|
|
|
|
||||||
end else
|
end else begin
|
||||||
begin
|
|
||||||
|
|
||||||
end$AddSemicolon()
|
end$AddSemicolon()
|
||||||
[casee | case statement (with else)]
|
[casee | case statement (with else)]
|
||||||
@ -106,6 +105,9 @@ end;
|
|||||||
[hexc | HexStr(Cardinal(),8)]
|
[hexc | HexStr(Cardinal(),8)]
|
||||||
HexStr(PtrUInt(|),8)
|
HexStr(PtrUInt(|),8)
|
||||||
[ifs | if (no begin/end)]
|
[ifs | if (no begin/end)]
|
||||||
|
$(AttributesStart)
|
||||||
|
EnableMakros=true
|
||||||
|
$(AttributesEnd)
|
||||||
if $Param(Conditional) then
|
if $Param(Conditional) then
|
||||||
|
|
|
|
||||||
[ifb | if statement]
|
[ifb | if statement]
|
||||||
@ -138,7 +140,10 @@ else begin
|
|||||||
|
|
||||||
end$AddSemicolon()
|
end$AddSemicolon()
|
||||||
[procedure | procedure declaration]
|
[procedure | procedure declaration]
|
||||||
procedure $Param(ProcName)|($Param());
|
$(AttributesStart)
|
||||||
|
EnableMakros=true
|
||||||
|
$(AttributesEnd)
|
||||||
|
procedure $Param(ProcName)($Param());
|
||||||
begin
|
begin
|
||||||
|
|
|
|
||||||
end;
|
end;
|
||||||
@ -147,7 +152,7 @@ $(AttributesStart)
|
|||||||
EnableMakros=true
|
EnableMakros=true
|
||||||
$(AttributesEnd)
|
$(AttributesEnd)
|
||||||
of
|
of
|
||||||
|$OfAll()end;
|
|$OfAll()end$AddSemicolon()
|
||||||
[trye | try except]
|
[trye | try except]
|
||||||
$(AttributesStart)
|
$(AttributesStart)
|
||||||
EnableMakros=true
|
EnableMakros=true
|
||||||
@ -188,6 +193,9 @@ begin
|
|||||||
|
|
|
|
||||||
end$AddSemicolon()
|
end$AddSemicolon()
|
||||||
[whiles | while (no begin)]
|
[whiles | while (no begin)]
|
||||||
|
$(AttributesStart)
|
||||||
|
EnableMakros=true
|
||||||
|
$(AttributesEnd)
|
||||||
while $Param(LoopCondition) do
|
while $Param(LoopCondition) do
|
||||||
|
|
|
|
||||||
[withb | with statement]
|
[withb | with statement]
|
||||||
@ -227,7 +235,7 @@ begin
|
|||||||
Width:=$Param(0);
|
Width:=$Param(0);
|
||||||
Height:=$Param(0);
|
Height:=$Param(0);
|
||||||
Caption:='$Param(CaptionText)';
|
Caption:='$Param(CaptionText)';
|
||||||
end;
|
end$AddSemicolon()
|
||||||
|
|
|
|
||||||
[fpc | Conditional FPC Mode]
|
[fpc | Conditional FPC Mode]
|
||||||
$(AttributesStart)
|
$(AttributesStart)
|
||||||
@ -251,35 +259,56 @@ writeln('$ProcedureName() '|)$AddSemicolon()
|
|||||||
[prws | property read write]
|
[prws | property read write]
|
||||||
$(AttributesStart)
|
$(AttributesStart)
|
||||||
!Version=1
|
!Version=1
|
||||||
|
EnableMakros=true
|
||||||
$(AttributesEnd)
|
$(AttributesEnd)
|
||||||
property $param(Name) read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1);|
|
property $param(Name) read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1);|
|
||||||
[prwd | property read write default]
|
[prwd | property read write default]
|
||||||
$(AttributesStart)
|
$(AttributesStart)
|
||||||
!Version=1
|
!Version=1
|
||||||
|
EnableMakros=true
|
||||||
$(AttributesEnd)
|
$(AttributesEnd)
|
||||||
property $param(Name) read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1) default $param(Const);|
|
property $param(Name) read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1) default $param(Const);|
|
||||||
[pirws | property Integer read write]
|
[pirws | property Integer read write]
|
||||||
$(AttributesStart)
|
$(AttributesStart)
|
||||||
!Version=1
|
!Version=1
|
||||||
|
EnableMakros=true
|
||||||
$(AttributesEnd)
|
$(AttributesEnd)
|
||||||
property $param(Name): Integer read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1);|
|
property $param(Name): Integer read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1);|
|
||||||
[pirwd | property Integer read write default]
|
[pirwd | property Integer read write default]
|
||||||
$(AttributesStart)
|
$(AttributesStart)
|
||||||
!Version=1
|
!Version=1
|
||||||
|
EnableMakros=true
|
||||||
$(AttributesEnd)
|
$(AttributesEnd)
|
||||||
property $param(Name): Integer read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1) default $param(Const);|
|
property $param(Name): Integer read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1) default $param(Const);|
|
||||||
[psrw | property string read write]
|
[psrw | property string read write]
|
||||||
$(AttributesStart)
|
$(AttributesStart)
|
||||||
!Version=1
|
!Version=1
|
||||||
|
EnableMakros=true
|
||||||
$(AttributesEnd)
|
$(AttributesEnd)
|
||||||
property $param(Name): string read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1);|
|
property $param(Name): string read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1);|
|
||||||
[pdrwd | property Double read write default]
|
[pdrwd | property Double read write default]
|
||||||
$(AttributesStart)
|
$(AttributesStart)
|
||||||
!Version=1
|
!Version=1
|
||||||
|
EnableMakros=true
|
||||||
$(AttributesEnd)
|
$(AttributesEnd)
|
||||||
property $param(Name): Double read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1) default $param(Const);|
|
property $param(Name): Double read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1) default $param(Const);|
|
||||||
[pdrws | property Double read write]
|
[pdrws | property Double read write]
|
||||||
$(AttributesStart)
|
$(AttributesStart)
|
||||||
!Version=1
|
!Version=1
|
||||||
|
EnableMakros=true
|
||||||
$(AttributesEnd)
|
$(AttributesEnd)
|
||||||
property $param(Name): Double read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1);|
|
property $param(Name): Double read $param(Get)$param(Name,sync=1) write $param(Set)$param(Name,sync=1);|
|
||||||
|
[is | IntToStr]
|
||||||
|
IntToStr(|)
|
||||||
|
[si | StrToInt()]
|
||||||
|
StrToInt(|)
|
||||||
|
[sid | StrToIntDef]
|
||||||
|
StrToIntDef(|, -1)
|
||||||
|
[bs | BoolToStr]
|
||||||
|
BoolToStr(|, true)
|
||||||
|
[sb | StrToBool]
|
||||||
|
StrToBool(|)
|
||||||
|
[sbd | StrToBoolDef]
|
||||||
|
StrToBoolDef(|, false)
|
||||||
|
[ih | IntToHex]
|
||||||
|
IntToHex(|)
|
Loading…
Reference in New Issue
Block a user