mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-28 17:29:36 +02:00
Jedi code format: more options to indent labels (goto label).
This commit is contained in:
parent
81f3140a4b
commit
a68ddcaaf6
@ -37,6 +37,7 @@
|
||||
<IndentNestedTypes> False </IndentNestedTypes>
|
||||
<IndentVarAndConstInClass> False </IndentVarAndConstInClass>
|
||||
<IndentInterfaceGuid> True </IndentInterfaceGuid>
|
||||
<IndentLabels> 0 </IndentLabels>
|
||||
</Indent>
|
||||
<Spaces>
|
||||
<TabsToSpaces> True </TabsToSpaces>
|
||||
|
@ -113,6 +113,12 @@ resourcestring
|
||||
lisIndentIndentNestedTypes = 'Indent nested types';
|
||||
lisIndentIndentVarAndConstInClass = 'Indent var and const in class';
|
||||
lisIndentExtraIndentForInterfaceGuid = 'Extra Indent for interface GUID';
|
||||
lisIndentLabels = 'Indent labels';
|
||||
lisIndentLabelsStatement = 'Indent statement';
|
||||
lisIndentLabelsDontIndent = 'Don''t indent';
|
||||
lisIndentLabelsIndentPrevLevel = 'Indent to prior level';
|
||||
lisIndentLabelslIndentToProcedure = 'Indent to procedure level';
|
||||
lisIndentLabelsIndentX0 = 'Indent to first column position';
|
||||
|
||||
//Blank lines tab
|
||||
lisBLBlankLines = 'Blank Lines';
|
||||
|
@ -696,6 +696,30 @@ msgstr ""
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr ""
|
||||
|
@ -700,6 +700,30 @@ msgstr "Einzeilige Kommentare in Globals mit dem Quelltext zusammenhalten"
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr "Einzeilige Kommentare in Prozeduren mit dem Quelltext zusammenhalten"
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr "Einstellungen"
|
||||
|
@ -692,6 +692,30 @@ msgstr ""
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr ""
|
||||
|
@ -700,6 +700,30 @@ msgstr "Conserver une seule ligne de commentaires avec le code"
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr "Garder une seule ligne de commentaires avec le code dans les procédures"
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr "Options"
|
||||
|
@ -701,6 +701,30 @@ msgstr "Az egysoros megjegyzések együtt tartása a globális kóddal"
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr "Az egysoros megjegyzések együtt tartása az eljárásban lévő kóddal"
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr "Beállítások"
|
||||
|
@ -701,6 +701,30 @@ msgstr "Mantieni codice e commenti monolinea nei globali"
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr "Mantieni codice e commenti monolinea nelle procedure"
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr "Opzioni"
|
||||
|
@ -700,6 +700,30 @@ msgstr "グローバル内の 1 行コメントをコードに合わせる"
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr "手続き内の 1 行コメントをコードに合わせる"
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr "オプション"
|
||||
|
@ -700,6 +700,30 @@ msgstr "Kodo „globaliniuose“ komentarai turi būti vienos eilutės"
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr "Kodo procedūrose komentarai turi būti vienos eilutės"
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr "Parinktys"
|
||||
|
@ -698,6 +698,30 @@ msgstr ""
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr "Opcje"
|
||||
|
@ -676,6 +676,30 @@ msgstr ""
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr ""
|
||||
|
@ -700,6 +700,30 @@ msgstr "Manter uma única linha de código com comentários em globais"
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr "Manter uma única linha de código com comentários em procedimentos"
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr "Opções"
|
||||
|
@ -690,6 +690,30 @@ msgstr "Оставлять однострочные комментарии с к
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr "Оставлять однострочные комментарии с кодом в процедурах"
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr "Параметры"
|
||||
|
@ -701,6 +701,30 @@ msgstr "Залишати однорядкові коментарі з кодом
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr "Залишати однорядкові коментарі з кодом в процедурах"
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr "Параметри"
|
||||
|
@ -698,6 +698,30 @@ msgstr ""
|
||||
msgid "Keep single-line comments with code in procedures"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabels
|
||||
msgid "Indent labels"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsdontindent
|
||||
msgid "Don't indent"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentprevlevel
|
||||
msgid "Indent to prior level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsindentx0
|
||||
msgid "Indent to first column position"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelslindenttoprocedure
|
||||
msgid "Indent to procedure level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentlabelsstatement
|
||||
msgid "Indent statement"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentoptions
|
||||
msgid "Options"
|
||||
msgstr "选项"
|
||||
|
@ -714,10 +714,37 @@ begin
|
||||
Inc(liIndentCount);
|
||||
|
||||
// indent statement after label
|
||||
if ( not lbHasIndentedRunOnLine) and
|
||||
(pt.Nestings.GetLevel(nlStatementLabel) > 0) and
|
||||
( not pt.HasParentNode(nStatementLabel)) then
|
||||
Inc(liIndentCount);
|
||||
if (not lbHasIndentedRunOnLine) and (pt.Nestings.GetLevel(nlStatementLabel) > 0) then
|
||||
begin
|
||||
if (not pt.HasParentNode(nStatementLabel)) then
|
||||
begin
|
||||
if FormattingSettings.Indent.IndentLabels = eLabelIndentStatement then
|
||||
Inc(liIndentCount);
|
||||
end
|
||||
else
|
||||
begin
|
||||
case FormattingSettings.Indent.IndentLabels of
|
||||
eLabelIndentStatement: ;
|
||||
eLabelIndentDontIndent: {keep indent};
|
||||
eLabelIndentPrevLevel:
|
||||
begin
|
||||
if liIndentCount > 0 then
|
||||
Dec(liIndentCount);
|
||||
end;
|
||||
eLabelIndentToProcedure:
|
||||
begin
|
||||
if liIndentCount = 1 then
|
||||
liIndentCount := 0 // program or library top level procs
|
||||
else
|
||||
liIndentCount := pt.Nestings.GetLevel(nlStatementLabel);
|
||||
end;
|
||||
eLabelIndentX0:
|
||||
begin
|
||||
liIndentCount := 0;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
// program or library top level procs
|
||||
// re bug 1898723 - Identination of procedures in library
|
||||
|
@ -29,7 +29,7 @@ unit SetIndent;
|
||||
|
||||
interface
|
||||
|
||||
uses JcfSetBase, SettingsStream;
|
||||
uses JcfSetBase, SettingsStream, SettingsTypes;
|
||||
|
||||
type
|
||||
|
||||
@ -55,7 +55,7 @@ type
|
||||
fbIndentNestedTypes: Boolean;
|
||||
fbIndentVarAndConstInClass: Boolean;
|
||||
fbIndentInterfaceGuid: boolean;
|
||||
|
||||
fbIndentLabels:TIndentLabels;
|
||||
protected
|
||||
public
|
||||
constructor Create;
|
||||
@ -93,6 +93,7 @@ type
|
||||
|
||||
property IndentNestedTypes: Boolean read fbIndentNestedTypes write fbIndentNestedTypes;
|
||||
property IndentVarAndConstInClass: Boolean read fbIndentVarAndConstInClass write fbIndentVarAndConstInClass;
|
||||
property IndentLabels:TIndentLabels read fbIndentLabels write fbIndentLabels;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -120,6 +121,7 @@ const
|
||||
REG_INDENT_VAR_AND_CONST_IN_CLASS = 'IndentVarAndConstInClass';
|
||||
REG_INDENT_NESTED_TYPES = 'IndentNestedTypes';
|
||||
REG_INDENT_INTERFACE_GUID = 'IndentInterfaceGuid';
|
||||
REG_INDENT_LABELS = 'IndentLabels';
|
||||
|
||||
constructor TSetIndent.Create;
|
||||
begin
|
||||
@ -158,7 +160,7 @@ begin
|
||||
fbIndentNestedTypes := pcStream.Read(REG_INDENT_NESTED_TYPES, False);
|
||||
fbIndentVarAndConstInClass := pcStream.Read(REG_INDENT_VAR_AND_CONST_IN_CLASS, False);
|
||||
fbIndentInterfaceGuid := pcStream.Read(REG_INDENT_INTERFACE_GUID, True);
|
||||
|
||||
fbIndentLabels := TIndentLabels(pcStream.Read(REG_INDENT_LABELS,Ord(eLabelIndentStatement)));
|
||||
end;
|
||||
|
||||
procedure TSetIndent.WriteToStream(const pcOut: TSettingsOutput);
|
||||
@ -188,6 +190,7 @@ begin
|
||||
pcOut.Write(REG_INDENT_NESTED_TYPES, fbIndentNestedTypes);
|
||||
pcOut.Write(REG_INDENT_VAR_AND_CONST_IN_CLASS, fbIndentVarAndConstInClass);
|
||||
pcOut.Write(REG_INDENT_INTERFACE_GUID, fbIndentInterfaceGuid);
|
||||
pcOut.Write(REG_INDENT_LABELS, Ord(fbIndentLabels));
|
||||
end;
|
||||
|
||||
function TSetIndent.SpacesForIndentLevel(const piLevel: integer): integer;
|
||||
|
@ -55,9 +55,10 @@ type
|
||||
3) turn to CrLf
|
||||
4) pick 2 or 3 depending on the Host OS, preference, ie CrLf for win, Cr for 'nix
|
||||
}
|
||||
type
|
||||
TReturnChars = (rcLeaveAsIs, rcLinefeed, rcCrLf, rcPlatform);
|
||||
|
||||
TIndentLabels = (eLabelIndentStatement,eLabelIndentDontIndent,eLabelIndentPrevLevel,
|
||||
eLabelIndentToProcedure,eLabelIndentX0);
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
<IndentNestedTypes> True </IndentNestedTypes>
|
||||
<IndentVarAndConstInClass> True </IndentVarAndConstInClass>
|
||||
<IndentInterfaceGuid> True </IndentInterfaceGuid>
|
||||
<IndentLabels> 0 </IndentLabels>
|
||||
</Indent>
|
||||
<Spaces>
|
||||
<TabsToSpaces> True </TabsToSpaces>
|
||||
|
@ -1,9 +1,9 @@
|
||||
object fClarifyIndent: TfClarifyIndent
|
||||
Left = 0
|
||||
Height = 426
|
||||
Height = 458
|
||||
Top = 0
|
||||
Width = 430
|
||||
ClientHeight = 426
|
||||
ClientHeight = 458
|
||||
ClientWidth = 430
|
||||
TabOrder = 0
|
||||
DesignLeft = 737
|
||||
@ -41,13 +41,13 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 385
|
||||
Height = 417
|
||||
Top = 35
|
||||
Width = 418
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Options'
|
||||
ClientHeight = 365
|
||||
ClientHeight = 397
|
||||
ClientWidth = 414
|
||||
TabOrder = 1
|
||||
object cbIndentBeginEnd: TCheckBox
|
||||
@ -287,5 +287,32 @@ object fClarifyIndent: TfClarifyIndent
|
||||
Caption = 'Extra Indent for interface guid'
|
||||
TabOrder = 15
|
||||
end
|
||||
object lbIndentLabels: TLabel
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
AnchorSideTop.Control = cbIndentInterfaceGuid
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 368
|
||||
Width = 67
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 12
|
||||
Caption = 'Indent labels'
|
||||
end
|
||||
object cbIndentLabels: TComboBox
|
||||
AnchorSideLeft.Control = lbIndentLabels
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = lbIndentLabels
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 79
|
||||
Height = 23
|
||||
Top = 364
|
||||
Width = 257
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 15
|
||||
Style = csDropDownList
|
||||
TabOrder = 16
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -40,6 +40,7 @@ type
|
||||
TfClarifyIndent = class(TAbstractIDEOptionsEditor)
|
||||
cbIndentCaseLabels: TCheckBox;
|
||||
cbIndentInterfaceGuid: TCheckBox;
|
||||
cbIndentLabels: TComboBox;
|
||||
Label2: TLabel;
|
||||
edtIndentSpaces: TSpinEdit;
|
||||
gbOptions: TGroupBox;
|
||||
@ -57,6 +58,7 @@ type
|
||||
cbIndentProcedureBody: TCheckBox;
|
||||
cbIndentNestedTypes: TCheckBox;
|
||||
cbIndentVarAndConstInClass: TCheckBox;
|
||||
lbIndentLabels: TLabel;
|
||||
procedure cbIndentBeginEndClick(Sender: TObject);
|
||||
procedure cbHasFirstLevelIndentClick(Sender: TObject);
|
||||
public
|
||||
@ -74,7 +76,7 @@ implementation
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
JcfSettings, JcfUIConsts, JcfIdeRegister;
|
||||
JcfSettings, JcfUIConsts, JcfIdeRegister, SettingsTypes;
|
||||
|
||||
constructor TfClarifyIndent.Create(AOwner: TComponent);
|
||||
begin
|
||||
@ -108,6 +110,13 @@ begin
|
||||
cbIndentNestedTypes.Caption := lisIndentIndentNestedTypes;
|
||||
cbIndentVarAndConstInClass.Caption := lisIndentIndentVarAndConstInClass;
|
||||
cbIndentInterfaceGuid.Caption := lisIndentExtraIndentForInterfaceGuid;
|
||||
|
||||
cbIndentLabels.Items.Clear;
|
||||
cbIndentLabels.Items.Add(lisIndentLabelsStatement);
|
||||
cbIndentLabels.Items.Add(lisIndentLabelsDontIndent);
|
||||
cbIndentLabels.Items.Add(lisIndentLabelsIndentPrevLevel);;
|
||||
cbIndentLabels.Items.Add(lisIndentLabelslIndentToProcedure);
|
||||
cbIndentLabels.Items.Add(lisIndentLabelsIndentX0);
|
||||
end;
|
||||
|
||||
{-------------------------------------------------------------------------------
|
||||
@ -138,6 +147,7 @@ begin
|
||||
cbIndentNestedTypes.Checked := IndentNestedTypes;
|
||||
cbIndentVarAndConstInClass.Checked := IndentVarAndConstInClass;
|
||||
cbIndentInterfaceGuid.Checked := IndentInterfaceGuid;
|
||||
cbIndentLabels.ItemIndex := Ord(IndentLabels);
|
||||
end;
|
||||
|
||||
cbIndentBeginEndClick(nil);
|
||||
@ -170,6 +180,7 @@ begin
|
||||
IndentNestedTypes := cbIndentNestedTypes.Checked;
|
||||
IndentVarAndConstInClass := cbIndentVarAndConstInClass.Checked;
|
||||
IndentInterfaceGuid := cbIndentInterfaceGuid.Checked;
|
||||
IndentLabels := TIndentLabels(cbIndentLabels.ItemIndex);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user