mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 01:19:36 +02:00
Jedi code format: add support for "Whitesmiths" format style.
This commit is contained in:
parent
01c4f3588d
commit
1db5f4272e
@ -24,7 +24,9 @@
|
||||
<FirstLevelIndent> 0 </FirstLevelIndent>
|
||||
<HasFirstLevelIndent> False </HasFirstLevelIndent>
|
||||
<IndentBeginEnd> False </IndentBeginEnd>
|
||||
<IndentExtraTryBlockKeyWords> False </IndentExtraTryBlockKeyWords>
|
||||
<IndentbeginEndSpaces> 2 </IndentbeginEndSpaces>
|
||||
<IndentExtraTryBlockKeyWordsSpaces> 2 </IndentExtraTryBlockKeyWordsSpaces>
|
||||
<IndentLibraryProcs> True </IndentLibraryProcs>
|
||||
<IndentProcedureBody> False </IndentProcedureBody>
|
||||
<KeepCommentsWithCodeInGlobals> True </KeepCommentsWithCodeInGlobals>
|
||||
@ -38,6 +40,8 @@
|
||||
<IndentVarAndConstInClass> False </IndentVarAndConstInClass>
|
||||
<IndentInterfaceGuid> True </IndentInterfaceGuid>
|
||||
<IndentLabels> 0 </IndentLabels>
|
||||
<IndentEndTryBlockAsCode> False </IndentEndTryBlockAsCode>
|
||||
<IndentExtraOrphanTryBlocks> False </IndentExtraOrphanTryBlocks>
|
||||
</Indent>
|
||||
<Spaces>
|
||||
<TabsToSpaces> True </TabsToSpaces>
|
||||
|
@ -119,6 +119,9 @@ resourcestring
|
||||
lisIndentLabelsIndentPrevLevel = 'Indent to prior level';
|
||||
lisIndentLabelslIndentToProcedure = 'Indent to procedure level';
|
||||
lisIndentLabelsIndentX0 = 'Indent to first column position';
|
||||
lisIndentTryFinallyExcept = 'Indent try/finally/except';
|
||||
lisIndentEndTryBlockAsCode = 'Indent end try block as code';
|
||||
lisIndentExtraOrphanTryBlocks = 'Extra Indent for orphan try blocks';
|
||||
|
||||
//Blank lines tab
|
||||
lisBLBlankLines = 'Blank Lines';
|
||||
|
@ -640,6 +640,11 @@ msgstr ""
|
||||
msgid "Different indent for first level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr ""
|
||||
@ -660,6 +665,10 @@ msgstr ""
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr ""
|
||||
@ -724,6 +733,10 @@ msgstr ""
|
||||
msgid "Options"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr ""
|
||||
|
@ -641,6 +641,11 @@ msgstr "Leerzeichen für Blockeinrücking"
|
||||
msgid "Different indent for first level"
|
||||
msgstr "Unterschiedliche Einrückung in der ersten Ebene"
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr "Zusätzliche Einrückung für Begin/End in Prozeduren"
|
||||
@ -661,6 +666,10 @@ msgstr "Zusätzliche Einrückung bei If..Else-Blöcken"
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr "Einrückung"
|
||||
@ -728,6 +737,10 @@ msgstr ""
|
||||
msgid "Options"
|
||||
msgstr "Einstellungen"
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr "JCF-Formateinstellungen"
|
||||
|
@ -636,6 +636,11 @@ msgstr ""
|
||||
msgid "Different indent for first level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr ""
|
||||
@ -656,6 +661,10 @@ msgstr ""
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr ""
|
||||
@ -720,6 +729,10 @@ msgstr ""
|
||||
msgid "Options"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr ""
|
||||
|
@ -642,6 +642,11 @@ msgstr "Espaces de retrait de bloc"
|
||||
msgid "Different indent for first level"
|
||||
msgstr "Retrait différent pour le premier niveau"
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr "Retrait supplémentaire pour \"begin/end\" dans les procédures"
|
||||
@ -662,6 +667,10 @@ msgstr "Retrait supplémentaire pour les blocs \"If...Else\""
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr "Indentation"
|
||||
@ -728,6 +737,10 @@ msgstr ""
|
||||
msgid "Options"
|
||||
msgstr "Options"
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr "Paramètres de formatage de JCF"
|
||||
|
@ -643,6 +643,11 @@ msgstr "Blokkbehúzás szóközeinek száma"
|
||||
msgid "Different indent for first level"
|
||||
msgstr "Eltérő behúzás az első szinten"
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr "Extra behúzás a begin/end számára eljárásokban"
|
||||
@ -663,6 +668,10 @@ msgstr "Extra behúzás az If...Else számára"
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr "Behúzás"
|
||||
@ -729,6 +738,10 @@ msgstr ""
|
||||
msgid "Options"
|
||||
msgstr "Beállítások"
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr "JCF formázás beállításai"
|
||||
|
@ -643,6 +643,11 @@ msgstr "Spazi di indentazione dei blocchi"
|
||||
msgid "Different indent for first level"
|
||||
msgstr "Indentazione diversa per il primo livello"
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr "Indentazione extra per begin/end all'interno delle procedure"
|
||||
@ -663,6 +668,10 @@ msgstr "Indentazione extra per blocchi If...Else"
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr "Indentazione"
|
||||
@ -729,6 +738,10 @@ msgstr ""
|
||||
msgid "Options"
|
||||
msgstr "Opzioni"
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr "Impostazioni formato JCF"
|
||||
|
@ -642,6 +642,11 @@ msgstr "ブロックインデントの空白数"
|
||||
msgid "Different indent for first level"
|
||||
msgstr "最初のレベルとは異なるインデント"
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr "手続き内での begin/end にインデントを追加する"
|
||||
@ -662,6 +667,10 @@ msgstr "if...else ブロックにインデントを追加する"
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr "インデント"
|
||||
@ -728,6 +737,10 @@ msgstr ""
|
||||
msgid "Options"
|
||||
msgstr "オプション"
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr "JCF 整形設定"
|
||||
|
@ -642,6 +642,11 @@ msgstr "Tarpai bloko įtraukoje"
|
||||
msgid "Different indent for first level"
|
||||
msgstr "Pirmam lygiui kitokia įtrauka"
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr "Papildoma „begin“/„end“ įtrauka procedūrų viduje"
|
||||
@ -662,6 +667,10 @@ msgstr "Papildoma „If...Else“ blokų įtrauką"
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr "Įtrauka"
|
||||
@ -728,6 +737,10 @@ msgstr ""
|
||||
msgid "Options"
|
||||
msgstr "Parinktys"
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr "JCF formato nuostatos"
|
||||
|
@ -642,6 +642,11 @@ msgstr ""
|
||||
msgid "Different indent for first level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr ""
|
||||
@ -662,6 +667,10 @@ msgstr ""
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr ""
|
||||
@ -726,6 +735,10 @@ msgstr ""
|
||||
msgid "Options"
|
||||
msgstr "Opcje"
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr ""
|
||||
|
@ -620,6 +620,11 @@ msgstr ""
|
||||
msgid "Different indent for first level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr ""
|
||||
@ -640,6 +645,10 @@ msgstr ""
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr ""
|
||||
@ -704,6 +713,10 @@ msgstr ""
|
||||
msgid "Options"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr ""
|
||||
|
@ -642,6 +642,11 @@ msgstr "Espaços identação blocos"
|
||||
msgid "Different indent for first level"
|
||||
msgstr "Identação diferente para primeiro nível"
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr "Identação extra para \"begin/end\" dentro de procedimento"
|
||||
@ -662,6 +667,10 @@ msgstr "Identação extra para blocos \"If...Else\""
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr "Identação"
|
||||
@ -728,6 +737,10 @@ msgstr ""
|
||||
msgid "Options"
|
||||
msgstr "Opções"
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr "Configurações \"JCF\""
|
||||
|
@ -634,6 +634,11 @@ msgstr "Отступ блока в пробелах"
|
||||
msgid "Different indent for first level"
|
||||
msgstr "Другой отступ для блоков первого уровня"
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr "Дополнительный отступ для begin/end в процедурах"
|
||||
@ -654,6 +659,10 @@ msgstr "Дополнительный отступ для блоков If...Else"
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr "Дополнительный отступ для GUID интерфейса"
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr "Отступы"
|
||||
@ -718,6 +727,10 @@ msgstr "Добавить для оператора"
|
||||
msgid "Options"
|
||||
msgstr "Параметры"
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr "Форматирование кода JEDI"
|
||||
|
@ -645,6 +645,11 @@ msgstr "Пробіли відступу в блоках"
|
||||
msgid "Different indent for first level"
|
||||
msgstr "Інший відступ для першого рівня"
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr "Додатковий відступ для begin/end в процедурах"
|
||||
@ -665,6 +670,10 @@ msgstr "Додатковий відступ для блоків If...Else"
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr "Відступи"
|
||||
@ -729,6 +738,10 @@ msgstr ""
|
||||
msgid "Options"
|
||||
msgstr "Параметри"
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr "Параметри форматування JCF"
|
||||
|
@ -642,6 +642,11 @@ msgstr "语句块缩进空格"
|
||||
msgid "Different indent for first level"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentendtryblockascode
|
||||
msgctxt "jcfuiconsts.lisindentendtryblockascode"
|
||||
msgid "Indent end try block as code"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraindentforbeginend
|
||||
msgid "Extra indent for begin/end inside procedures"
|
||||
msgstr ""
|
||||
@ -662,6 +667,10 @@ msgstr ""
|
||||
msgid "Extra Indent for interface GUID"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentextraorphantryblocks
|
||||
msgid "Extra Indent for orphan try blocks"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisindentindentation
|
||||
msgid "Indentation"
|
||||
msgstr "缩进(Indentation)"
|
||||
@ -726,6 +735,10 @@ msgstr ""
|
||||
msgid "Options"
|
||||
msgstr "选项"
|
||||
|
||||
#: jcfuiconsts.lisindenttryfinallyexcept
|
||||
msgid "Indent try/finally/except"
|
||||
msgstr ""
|
||||
|
||||
#: jcfuiconsts.lisjcfformatsettings
|
||||
msgid "JCF Format Settings"
|
||||
msgstr "JCF格式设置"
|
||||
|
@ -338,6 +338,32 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function IsEndOfFinallyOrExceptBlock(const pt:TSourceToken):boolean;
|
||||
begin
|
||||
result := (pt.TokenType = ttEnd) and (pt.HasParentNode(nFinallyBlock,1) or pt.HasParentNode(nExceptBlock));
|
||||
end;
|
||||
|
||||
function OrphanTryBlocksCount(const pt: TSourceToken): integer;
|
||||
var
|
||||
lcParent: TParseTreeNode;
|
||||
begin
|
||||
Result := 0;
|
||||
lcParent := pt;
|
||||
while (lcParent <> nil) do
|
||||
begin
|
||||
if lcParent.NodeType = nTryAndHandlerBlock then
|
||||
begin
|
||||
lcParent := lcParent.Parent;
|
||||
if (lcParent <> nil) and (lcParent.NodeType = nStatement) then
|
||||
lcParent := lcParent.Parent;
|
||||
if (lcParent <> nil) and (lcParent.NodeType <> nStatementList) then
|
||||
Inc(Result);
|
||||
end;
|
||||
if lcParent <> nil then
|
||||
lcParent := lcParent.Parent;
|
||||
end;
|
||||
end;
|
||||
|
||||
function CalculateIndent(const pt: TSourceToken;aAlignPreprocessor:boolean=true): integer;forward;
|
||||
|
||||
//Align {$ENDIF}/{$IFEND}/{$ELSE}/{$ELSEIF} with his {$IF}/{$IFDEF}/{$$IFNDEF}/{$IFOPT}
|
||||
@ -648,8 +674,21 @@ begin
|
||||
|
||||
if FormattingSettings.Indent.IndentElse then
|
||||
liIndentCount := liIndentCount + ElseDepth(pt);
|
||||
|
||||
|
||||
//increment indent for orphan try blocks
|
||||
// if condition then while condition do ...
|
||||
// try
|
||||
// finally
|
||||
// end
|
||||
if FormattingSettings.Indent.IndentExtraOrphanTryBlocks then
|
||||
begin
|
||||
if pt.HasParentNode(nTryAndHandlerBlock) then
|
||||
begin
|
||||
liIndentCount := liIndentCount + OrphanTryBlocksCount(pt);
|
||||
end;
|
||||
end;
|
||||
if (pt.TokenType=ttEnd) and FormattingSettings.Indent.IndentEndTryBlockAsCode and IsEndOfFinallyOrExceptBlock(pt) then
|
||||
inc(liIndentCount);
|
||||
end; // procedures
|
||||
|
||||
{ record declaration stuph }
|
||||
@ -794,12 +833,29 @@ begin
|
||||
// IndentBeginEnd option to indent begin/end words a bit extra
|
||||
if FormattingSettings.Indent.IndentBeginEnd then
|
||||
begin
|
||||
if (pt.TokenType in [ttTry, ttExcept, ttFinally, ttBegin, ttEnd]) and InStatements(pt) then
|
||||
if (pt.TokenType in [ttBegin, ttEnd]) and InStatements(pt) then
|
||||
begin
|
||||
// filter out the begin/end that starts and ends a procedure
|
||||
if not pt.HasParentNode(nBlock, 2) then
|
||||
if not IsEndOfFinallyOrExceptBlock(pt) then
|
||||
begin
|
||||
Result := Result + FormattingSettings.Indent.IndentBeginEndSpaces;
|
||||
// filter out the begin/end that starts and ends a procedure
|
||||
if not pt.HasParentNode(nBlock, 2) then
|
||||
begin
|
||||
Result := Result + FormattingSettings.Indent.IndentBeginEndSpaces;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if FormattingSettings.Indent.IndentExtraTryBlockKeyWords then
|
||||
begin
|
||||
if ((pt.TokenType in [ttTry, ttExcept, ttFinally]) or IsEndOfFinallyOrExceptBlock(pt)) and InStatements(pt) then
|
||||
begin
|
||||
if not ((pt.TokenType=ttEnd) and FormattingSettings.Indent.IndentEndTryBlockAsCode) then
|
||||
begin
|
||||
// filter out the begin/end that starts and ends a procedure
|
||||
if not pt.HasParentNode(nBlock, 2) then
|
||||
begin
|
||||
Result := Result + FormattingSettings.Indent.IndentExtraTryBlockKeyWordsSpaces;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -56,6 +56,10 @@ type
|
||||
fbIndentVarAndConstInClass: Boolean;
|
||||
fbIndentInterfaceGuid: boolean;
|
||||
fbIndentLabels:TIndentLabels;
|
||||
fbIndentExtraTryBlockKeyWords:boolean;
|
||||
fiIndentExtraTryBlockKeyWordsSpaces:integer;
|
||||
fbIndentEndTryBlockAsCode:boolean;
|
||||
fbIndentExtraOrphanTryBlocks:boolean;
|
||||
protected
|
||||
public
|
||||
constructor Create;
|
||||
@ -94,6 +98,10 @@ type
|
||||
property IndentNestedTypes: Boolean read fbIndentNestedTypes write fbIndentNestedTypes;
|
||||
property IndentVarAndConstInClass: Boolean read fbIndentVarAndConstInClass write fbIndentVarAndConstInClass;
|
||||
property IndentLabels:TIndentLabels read fbIndentLabels write fbIndentLabels;
|
||||
property IndentExtraTryBlockKeyWords:boolean read fbIndentExtraTryBlockKeyWords write fbIndentExtraTryBlockKeyWords;
|
||||
property IndentExtraTryBlockKeyWordsSpaces:integer read fiIndentExtraTryBlockKeyWordsSpaces write fiIndentExtraTryBlockKeyWordsSpaces;
|
||||
property IndentEndTryBlockAsCode:boolean read fbIndentEndTryBlockAsCode write fbIndentEndTryBlockAsCode;
|
||||
property IndentExtraOrphanTryBlocks:boolean read fbIndentExtraOrphanTryBlocks write fbIndentExtraOrphanTryBlocks;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -122,6 +130,10 @@ const
|
||||
REG_INDENT_NESTED_TYPES = 'IndentNestedTypes';
|
||||
REG_INDENT_INTERFACE_GUID = 'IndentInterfaceGuid';
|
||||
REG_INDENT_LABELS = 'IndentLabels';
|
||||
REG_INDENT_EXTRA_TRY_BLOCK_KEYWORDS = 'IndentExtraTryBlockKeyWords';
|
||||
REG_INDENT_EXTRA_TRY_BLOCK_KEYWORDS_SPACES = 'IndentExtraTryBlockKeyWordsSpaces';
|
||||
REG_INDENT_END_TRY_BLOCK_AS_CODE = 'IndentEndTryBlockAsCode';
|
||||
REG_INDENT_EXTRA_ORPHAN_TRY_BLOCKS = 'IndentExtraOrphanTryBlocks';
|
||||
|
||||
constructor TSetIndent.Create;
|
||||
begin
|
||||
@ -141,6 +153,17 @@ begin
|
||||
fbIndentBeginEnd := pcStream.Read(REG_INDENT_BEGIN_END, False);
|
||||
fiIndentBeginEndSpaces := pcStream.Read(REG_INDENT_BEGIN_END_SPACES, 1);
|
||||
|
||||
if pcStream.HasTag(REG_INDENT_EXTRA_TRY_BLOCK_KEYWORDS) then
|
||||
begin
|
||||
fbIndentExtraTryBlockKeyWords := pcStream.Read(REG_INDENT_EXTRA_TRY_BLOCK_KEYWORDS, False);
|
||||
fiIndentExtraTryBlockKeyWordsSpaces :=pcStream.Read(REG_INDENT_EXTRA_TRY_BLOCK_KEYWORDS_SPACES, 1);
|
||||
end
|
||||
else
|
||||
begin
|
||||
fbIndentExtraTryBlockKeyWords := pcStream.Read(REG_INDENT_EXTRA_TRY_BLOCK_KEYWORDS, fbIndentBeginEnd);
|
||||
fiIndentExtraTryBlockKeyWordsSpaces := pcStream.Read(REG_INDENT_EXTRA_TRY_BLOCK_KEYWORDS_SPACES, fiIndentBeginEndSpaces);
|
||||
end;
|
||||
|
||||
fbIndentLibraryProcs := pcStream.Read(REG_INDENT_LIBRARY_PROCS, True);
|
||||
fbIndentProcedureBody := pcStream.Read(REG_INDENT_PROCEDURE_BODY, False);
|
||||
|
||||
@ -161,6 +184,8 @@ begin
|
||||
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)));
|
||||
fbIndentEndTryBlockAsCode := pcStream.Read(REG_INDENT_END_TRY_BLOCK_AS_CODE, False);
|
||||
fbIndentExtraOrphanTryBlocks := pcStream.Read(REG_INDENT_EXTRA_ORPHAN_TRY_BLOCKS, False);
|
||||
end;
|
||||
|
||||
procedure TSetIndent.WriteToStream(const pcOut: TSettingsOutput);
|
||||
@ -173,7 +198,9 @@ begin
|
||||
pcOut.Write(REG_HAS_FIRST_LEVEL_INDENT, fbHasFirstLevelIndent);
|
||||
|
||||
pcOut.Write(REG_INDENT_BEGIN_END, fbIndentBeginEnd);
|
||||
pcOut.Write(REG_INDENT_EXTRA_TRY_BLOCK_KEYWORDS, fbIndentExtraTryBlockKeyWords);
|
||||
pcOut.Write(REG_INDENT_BEGIN_END_SPACES, fiIndentBeginEndSpaces);
|
||||
pcOut.Write(REG_INDENT_EXTRA_TRY_BLOCK_KEYWORDS_SPACES, fiIndentExtraTryBlockKeyWordsSpaces);
|
||||
|
||||
pcOut.Write(REG_INDENT_LIBRARY_PROCS, fbIndentLibraryProcs);
|
||||
pcOut.Write(REG_INDENT_PROCEDURE_BODY, fbIndentProcedureBody);
|
||||
@ -191,6 +218,8 @@ begin
|
||||
pcOut.Write(REG_INDENT_VAR_AND_CONST_IN_CLASS, fbIndentVarAndConstInClass);
|
||||
pcOut.Write(REG_INDENT_INTERFACE_GUID, fbIndentInterfaceGuid);
|
||||
pcOut.Write(REG_INDENT_LABELS, Ord(fbIndentLabels));
|
||||
pcOut.Write(REG_INDENT_END_TRY_BLOCK_AS_CODE, fbIndentEndTryBlockAsCode);
|
||||
pcOut.Write(REG_INDENT_EXTRA_ORPHAN_TRY_BLOCKS, fbIndentExtraOrphanTryBlocks);
|
||||
end;
|
||||
|
||||
function TSetIndent.SpacesForIndentLevel(const piLevel: integer): integer;
|
||||
|
@ -24,7 +24,9 @@
|
||||
<FirstLevelIndent> 0 </FirstLevelIndent>
|
||||
<HasFirstLevelIndent> False </HasFirstLevelIndent>
|
||||
<IndentBeginEnd> False </IndentBeginEnd>
|
||||
<IndentExtraTryBlockKeyWords> False </IndentExtraTryBlockKeyWords>
|
||||
<IndentbeginEndSpaces> 2 </IndentbeginEndSpaces>
|
||||
<IndentExtraTryBlockKeyWordsSpaces> 2 </IndentExtraTryBlockKeyWordsSpaces>
|
||||
<IndentLibraryProcs> True </IndentLibraryProcs>
|
||||
<IndentProcedureBody> False </IndentProcedureBody>
|
||||
<KeepCommentsWithCodeInGlobals> True </KeepCommentsWithCodeInGlobals>
|
||||
@ -38,6 +40,8 @@
|
||||
<IndentVarAndConstInClass> True </IndentVarAndConstInClass>
|
||||
<IndentInterfaceGuid> True </IndentInterfaceGuid>
|
||||
<IndentLabels> 0 </IndentLabels>
|
||||
<IndentEndTryBlockAsCode> False </IndentEndTryBlockAsCode>
|
||||
<IndentExtraOrphanTryBlocks> False </IndentExtraOrphanTryBlocks>
|
||||
</Indent>
|
||||
<Spaces>
|
||||
<TabsToSpaces> True </TabsToSpaces>
|
||||
|
@ -1,9 +1,9 @@
|
||||
object fClarifyIndent: TfClarifyIndent
|
||||
Left = 0
|
||||
Height = 458
|
||||
Height = 539
|
||||
Top = 0
|
||||
Width = 430
|
||||
ClientHeight = 458
|
||||
ClientHeight = 539
|
||||
ClientWidth = 430
|
||||
TabOrder = 0
|
||||
DesignLeft = 737
|
||||
@ -41,13 +41,13 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 417
|
||||
Height = 498
|
||||
Top = 35
|
||||
Width = 418
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Options'
|
||||
ClientHeight = 397
|
||||
ClientHeight = 478
|
||||
ClientWidth = 414
|
||||
TabOrder = 1
|
||||
object cbIndentBeginEnd: TCheckBox
|
||||
@ -85,27 +85,27 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 37
|
||||
Top = 66
|
||||
Width = 169
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Different indent for first level'
|
||||
TabOrder = 2
|
||||
TabOrder = 4
|
||||
OnClick = cbHasFirstLevelIndentClick
|
||||
end
|
||||
object eFirstLevelIndent: TSpinEdit
|
||||
AnchorSideTop.Control = eIndentBeginEndSpaces
|
||||
AnchorSideTop.Control = eIndentTryFinallyExceptSpaces
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = gbOptions
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 344
|
||||
Height = 23
|
||||
Top = 35
|
||||
Top = 64
|
||||
Width = 50
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 20
|
||||
TabOrder = 3
|
||||
TabOrder = 5
|
||||
end
|
||||
object cbKeepWithInProc: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
@ -113,14 +113,14 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 62
|
||||
Top = 91
|
||||
Width = 292
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Keep single-line comments with code in procedures'
|
||||
TabOrder = 4
|
||||
TabOrder = 6
|
||||
end
|
||||
object cbKeepWithInGlobals: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
@ -128,14 +128,14 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 87
|
||||
Top = 116
|
||||
Width = 271
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Keep single-line comments with code in globals'
|
||||
TabOrder = 5
|
||||
TabOrder = 7
|
||||
end
|
||||
object cbKeepWithInClassDef: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
@ -143,14 +143,14 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 112
|
||||
Top = 141
|
||||
Width = 317
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Keep single-line comments with code in class definitions'
|
||||
TabOrder = 6
|
||||
TabOrder = 8
|
||||
end
|
||||
object cbKeepWithElsewhere: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
@ -158,14 +158,14 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 137
|
||||
Top = 166
|
||||
Width = 272
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Keep single-line comments with code elsewhere'
|
||||
TabOrder = 7
|
||||
TabOrder = 9
|
||||
end
|
||||
object cbIndentIfElse: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
@ -173,14 +173,14 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 162
|
||||
Top = 191
|
||||
Width = 174
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Extra Indent for If...Else blocks'
|
||||
TabOrder = 8
|
||||
TabOrder = 10
|
||||
end
|
||||
object cbIndentCaseElse: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
@ -188,14 +188,14 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 212
|
||||
Top = 241
|
||||
Width = 192
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Extra Indent for Case...Else blocks'
|
||||
TabOrder = 10
|
||||
TabOrder = 12
|
||||
end
|
||||
object cbIndentLibraryProcs: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
@ -203,14 +203,14 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 237
|
||||
Top = 266
|
||||
Width = 181
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Indent for procedures in library'
|
||||
TabOrder = 11
|
||||
TabOrder = 13
|
||||
end
|
||||
object cbIndentProcedureBody: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
@ -218,14 +218,14 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 262
|
||||
Top = 291
|
||||
Width = 157
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Indent for procedure body'
|
||||
TabOrder = 12
|
||||
TabOrder = 14
|
||||
end
|
||||
object cbIndentNestedTypes: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
@ -233,14 +233,14 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 287
|
||||
Top = 316
|
||||
Width = 121
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Indent nested types'
|
||||
TabOrder = 13
|
||||
TabOrder = 15
|
||||
end
|
||||
object cbIndentVarAndConstInClass: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
@ -248,14 +248,14 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 312
|
||||
Top = 341
|
||||
Width = 167
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Indent var and const in class'
|
||||
TabOrder = 14
|
||||
TabOrder = 16
|
||||
end
|
||||
object cbIndentCaseLabels: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
@ -263,14 +263,14 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 187
|
||||
Top = 216
|
||||
Width = 157
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Extra Indent for case labels'
|
||||
TabOrder = 9
|
||||
TabOrder = 11
|
||||
end
|
||||
object cbIndentInterfaceGuid: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
@ -278,14 +278,14 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 337
|
||||
Top = 366
|
||||
Width = 174
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Extra Indent for interface guid'
|
||||
TabOrder = 15
|
||||
TabOrder = 17
|
||||
end
|
||||
object lbIndentLabels: TLabel
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
@ -293,7 +293,7 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 368
|
||||
Top = 397
|
||||
Width = 67
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 12
|
||||
@ -306,13 +306,73 @@ object fClarifyIndent: TfClarifyIndent
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 79
|
||||
Height = 23
|
||||
Top = 364
|
||||
Top = 393
|
||||
Width = 257
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 15
|
||||
Style = csDropDownList
|
||||
TabOrder = 16
|
||||
TabOrder = 18
|
||||
end
|
||||
object eIndentTryFinallyExceptSpaces: TSpinEdit
|
||||
AnchorSideTop.Control = eIndentBeginEndSpaces
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = gbOptions
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 344
|
||||
Height = 23
|
||||
Top = 35
|
||||
Width = 50
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 20
|
||||
MaxValue = 10
|
||||
MinValue = -10
|
||||
TabOrder = 3
|
||||
end
|
||||
object cbIndentExtraTryBlockKeywords: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
AnchorSideTop.Control = eIndentTryFinallyExceptSpaces
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 37
|
||||
Width = 191
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Extra indent for try/finally/except'
|
||||
TabOrder = 2
|
||||
OnClick = cbIndentExtraTryBlockKeywordsClick
|
||||
end
|
||||
object cbIndentEndTryBlockAsCode: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
AnchorSideTop.Control = cbIndentLabels
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 422
|
||||
Width = 167
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Indent end try block as code'
|
||||
TabOrder = 19
|
||||
end
|
||||
object cbIndentExtraOrphanTryBlocks: TCheckBox
|
||||
AnchorSideLeft.Control = gbOptions
|
||||
AnchorSideTop.Control = cbIndentEndTryBlockAsCode
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 447
|
||||
Width = 193
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Extra indent for orphan try blocks'
|
||||
TabOrder = 20
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -38,9 +38,13 @@ type
|
||||
{ TfClarifyIndent }
|
||||
|
||||
TfClarifyIndent = class(TAbstractIDEOptionsEditor)
|
||||
cbIndentEndTryBlockAsCode: TCheckBox;
|
||||
cbIndentExtraOrphanTryBlocks: TCheckBox;
|
||||
cbIndentExtraTryBlockKeywords: TCheckBox;
|
||||
cbIndentCaseLabels: TCheckBox;
|
||||
cbIndentInterfaceGuid: TCheckBox;
|
||||
cbIndentLabels: TComboBox;
|
||||
eIndentTryFinallyExceptSpaces: TSpinEdit;
|
||||
Label2: TLabel;
|
||||
edtIndentSpaces: TSpinEdit;
|
||||
gbOptions: TGroupBox;
|
||||
@ -61,6 +65,7 @@ type
|
||||
lbIndentLabels: TLabel;
|
||||
procedure cbIndentBeginEndClick(Sender: TObject);
|
||||
procedure cbHasFirstLevelIndentClick(Sender: TObject);
|
||||
procedure cbIndentExtraTryBlockKeywordsClick(Sender: TObject);
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
|
||||
@ -119,6 +124,10 @@ begin
|
||||
cbIndentLabels.Items.Add(lisIndentLabelsIndentPrevLevel);;
|
||||
cbIndentLabels.Items.Add(lisIndentLabelslIndentToProcedure);
|
||||
cbIndentLabels.Items.Add(lisIndentLabelsIndentX0);
|
||||
|
||||
cbIndentExtraTryBlockKeywords.Caption := lisIndentTryFinallyExcept;
|
||||
cbIndentEndTryBlockAsCode.Caption := lisIndentEndTryBlockAsCode;
|
||||
cbIndentExtraOrphanTryBlocks.Caption := lisIndentExtraOrphanTryBlocks;
|
||||
end;
|
||||
|
||||
{-------------------------------------------------------------------------------
|
||||
@ -150,6 +159,12 @@ begin
|
||||
cbIndentVarAndConstInClass.Checked := IndentVarAndConstInClass;
|
||||
cbIndentInterfaceGuid.Checked := IndentInterfaceGuid;
|
||||
cbIndentLabels.ItemIndex := Ord(IndentLabels);
|
||||
|
||||
cbIndentExtraTryBlockKeywords.Checked := IndentExtraTryBlockKeyWords;
|
||||
eIndentTryFinallyExceptSpaces.Value := IndentExtraTryBlockKeyWordsSpaces;
|
||||
eIndentTryFinallyExceptSpaces.Enabled := IndentExtraTryBlockKeyWords;
|
||||
cbIndentEndTryBlockAsCode.Checked := IndentEndTryBlockAsCode;
|
||||
cbIndentExtraOrphanTryBlocks.Checked := IndentExtraOrphanTryBlocks;
|
||||
end;
|
||||
|
||||
cbIndentBeginEndClick(nil);
|
||||
@ -183,6 +198,12 @@ begin
|
||||
IndentVarAndConstInClass := cbIndentVarAndConstInClass.Checked;
|
||||
IndentInterfaceGuid := cbIndentInterfaceGuid.Checked;
|
||||
IndentLabels := TIndentLabels(cbIndentLabels.ItemIndex);
|
||||
|
||||
IndentExtraTryBlockKeyWords := cbIndentExtraTryBlockKeywords.Checked;
|
||||
IndentExtraTryBlockKeyWordsSpaces := eIndentTryFinallyExceptSpaces.Value;
|
||||
IndentEndTryBlockAsCode := cbIndentEndTryBlockAsCode.Checked;
|
||||
IndentExtraOrphanTryBlocks := cbIndentExtraOrphanTryBlocks.Checked;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -204,6 +225,11 @@ begin
|
||||
eFirstLevelIndent.Enabled := cbHasFirstLevelIndent.Checked;
|
||||
end;
|
||||
|
||||
procedure TfClarifyIndent.cbIndentExtraTryBlockKeywordsClick(Sender: TObject);
|
||||
begin
|
||||
eIndentTryFinallyExceptSpaces.Enabled := cbIndentExtraTryBlockKeywords.Checked;
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterIDEOptionsEditor(JCFOptionsGroup, TfClarifyIndent, JCFOptionIndentation, JCFOptionClarify);
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user