codetools: indenter: if no examples found, use defaults

git-svn-id: trunk@22861 -
This commit is contained in:
mattias 2009-11-29 22:33:51 +00:00
parent a3eed789e4
commit 5c09cc4e34

View File

@ -1690,7 +1690,20 @@ begin
{$ENDIF}
if CheckPolicies(Policies,Result) then exit;
//GetDefaultIndentPolicy(ParentBlock.Typ,Block.Typ);
{$IFDEF VerboseIndenter}
DebugLn(['TFullyAutomaticBeautifier.GetIndent no examples found']);
{$ENDIF}
if SubTypeValid then
GetDefaultIndentPolicy(Block.Typ,SubType,Indent)
else
GetDefaultIndentPolicy(Block.Typ,bbtNone,Indent);
if Indent.IndentValid then begin
{$IFDEF VerboseIndenter}
DebugLn(['TFullyAutomaticBeautifier.GetIndent using default ',Indent.Indent]);
{$ENDIF}
inc(Indent.Indent,GetLineIndentWithTabs(Source,Block.StartPos,DefaultTabWidth));
Result:=true;
end;
end;
function TFullyAutomaticBeautifier.GetIndents(const Source: string;