Browse Source

Updated formatting factory options.

newNRvisualizers
Mike Krüger 14 years ago
parent
commit
639f6b9191
  1. 36
      ICSharpCode.NRefactory.CSharp/Formatter/FormattingOptionsFactory.cs

36
ICSharpCode.NRefactory.CSharp/Formatter/FormattingOptionsFactory.cs

@ -183,6 +183,13 @@ namespace ICSharpCode.NRefactory.CSharp
IndexerArgumentWrapping = Wrapping.WrapIfTooLong, IndexerArgumentWrapping = Wrapping.WrapIfTooLong,
NewLineAferIndexerOpenBracket = false, NewLineAferIndexerOpenBracket = false,
IndexerClosingBracketOnNewLine = false, IndexerClosingBracketOnNewLine = false,
IfElseBraceForcement = BraceForcement.DoNotChange,
ForBraceForcement = BraceForcement.DoNotChange,
ForEachBraceForcement = BraceForcement.DoNotChange,
WhileBraceForcement = BraceForcement.DoNotChange,
UsingBraceForcement = BraceForcement.DoNotChange,
FixedBraceForcement = BraceForcement.DoNotChange
}; };
} }
@ -345,6 +352,13 @@ namespace ICSharpCode.NRefactory.CSharp
IndexerArgumentWrapping = Wrapping.WrapIfTooLong, IndexerArgumentWrapping = Wrapping.WrapIfTooLong,
NewLineAferIndexerOpenBracket = false, NewLineAferIndexerOpenBracket = false,
IndexerClosingBracketOnNewLine = false, IndexerClosingBracketOnNewLine = false,
IfElseBraceForcement = BraceForcement.DoNotChange,
ForBraceForcement = BraceForcement.DoNotChange,
ForEachBraceForcement = BraceForcement.DoNotChange,
WhileBraceForcement = BraceForcement.DoNotChange,
UsingBraceForcement = BraceForcement.DoNotChange,
FixedBraceForcement = BraceForcement.DoNotChange
}; };
} }
@ -353,17 +367,17 @@ namespace ICSharpCode.NRefactory.CSharp
/// </summary> /// </summary>
public static CSharpFormattingOptions CreateAllman() public static CSharpFormattingOptions CreateAllman()
{ {
var baseOptions = CreateSharpDevelop(); var baseOptions = CreateKRStyle();
baseOptions.AnonymousMethodBraceStyle = BraceStyle.EndOfLine; baseOptions.AnonymousMethodBraceStyle = BraceStyle.NextLine;
baseOptions.PropertyBraceStyle = BraceStyle.EndOfLine; baseOptions.PropertyBraceStyle = BraceStyle.NextLine;
baseOptions.PropertyGetBraceStyle = BraceStyle.EndOfLine; baseOptions.PropertyGetBraceStyle = BraceStyle.NextLine;
baseOptions.PropertySetBraceStyle = BraceStyle.EndOfLine; baseOptions.PropertySetBraceStyle = BraceStyle.NextLine;
baseOptions.EventBraceStyle = BraceStyle.EndOfLine; baseOptions.EventBraceStyle = BraceStyle.NextLine;
baseOptions.EventAddBraceStyle = BraceStyle.EndOfLine; baseOptions.EventAddBraceStyle = BraceStyle.NextLine;
baseOptions.EventRemoveBraceStyle = BraceStyle.EndOfLine; baseOptions.EventRemoveBraceStyle = BraceStyle.NextLine;
baseOptions.StatementBraceStyle = BraceStyle.EndOfLine; baseOptions.StatementBraceStyle = BraceStyle.NextLine;
baseOptions.ArrayInitializerBraceStyle = BraceStyle.EndOfLine; baseOptions.ArrayInitializerBraceStyle = BraceStyle.NextLine;
return baseOptions; return baseOptions;
} }
@ -372,7 +386,7 @@ namespace ICSharpCode.NRefactory.CSharp
/// </summary> /// </summary>
public static CSharpFormattingOptions CreateWhitesmiths() public static CSharpFormattingOptions CreateWhitesmiths()
{ {
var baseOptions = CreateSharpDevelop(); var baseOptions = CreateKRStyle();
baseOptions.NamespaceBraceStyle = BraceStyle.NextLineShifted; baseOptions.NamespaceBraceStyle = BraceStyle.NextLineShifted;
baseOptions.ClassBraceStyle = BraceStyle.NextLineShifted; baseOptions.ClassBraceStyle = BraceStyle.NextLineShifted;

Loading…
Cancel
Save