~ubuntu-branches/ubuntu/lucid/monodevelop/lucid

« back to all changes in this revision

Viewing changes to src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicy.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-02-02 11:39:59 UTC
  • mfrom: (1.2.6 upstream) (1.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100202113959-s4exdz7er7igylz2
Tags: 2.2.1+dfsg-1
* New upstream release
* debian/control:
  + Standards version 3.8.4 (no changes needed)
* debian/patches/remove_support_for_non_debian_functionality.patch,
  debian/patches/remove_support_for_soft_debugger.patch,
  debian/patches/remove_support_for_moonlight.patch,
  debian/rules:
  + Split patch into two pieces, to make it easier to enable either
    SDB or Moonlight support with a rebuild
* debian/monodevelop-moonlight.install,
  debian/monodevelop-debugger-sdb.install,
  debian/control:
  + Create packaging data for the Soft Debugger addin and Moonlight addin -
    and comment them out of debian/control as we can't provide them on
    Debian for now

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
                RemoveBracesForSingleLine
47
47
        }
48
48
        
 
49
        public enum ArrayInitializerPlacement {
 
50
                AlwaysNewLine,
 
51
                AlwaysSameLine
 
52
        }
 
53
        
49
54
        public class CSharpFormattingPolicy : IEquatable<CSharpFormattingPolicy>
50
55
        {
51
56
                public CSharpFormattingPolicy Clone ()
250
255
                #endregion
251
256
                
252
257
                #region Force Braces
 
258
                [ItemProperty]
253
259
                public BraceForcement IfElseBraceForcement {
254
260
                        get;
255
261
                        set;
256
262
                }
257
263
                
 
264
                [ItemProperty]
258
265
                public BraceForcement ForBraceForcement {
259
266
                        get;
260
267
                        set;
261
268
                }
262
269
                
 
270
                [ItemProperty]
263
271
                public BraceForcement ForEachBraceForcement {
264
272
                        get;
265
273
                        set;
266
274
                }
267
275
                
 
276
                [ItemProperty]
268
277
                public BraceForcement WhileBraceForcement {
269
278
                        get;
270
279
                        set;
271
280
                }
 
281
                
 
282
                [ItemProperty]
272
283
                public BraceForcement UsingBraceForcement {
273
284
                        get;
274
285
                        set;
275
286
                }
276
287
                
 
288
                [ItemProperty]
277
289
                public BraceForcement FixedBraceForcement {
278
290
                        get;
279
291
                        set;
310
322
                        get;
311
323
                        set;
312
324
                }
 
325
                
 
326
                [ItemProperty]
 
327
                public ArrayInitializerPlacement PlaceArrayInitializersOnNewLine {
 
328
                        get;
 
329
                        set;
 
330
                }
313
331
                #endregion
314
332
                
315
333
                #region Spaces
609
627
                        PlaceCatchOnNewLine = false;
610
628
                        PlaceFinallyOnNewLine = false;
611
629
                        PlaceWhileOnNewLine = false;
 
630
                        PlaceArrayInitializersOnNewLine = ArrayInitializerPlacement.AlwaysSameLine;
612
631
 
613
632
                        BeforeMethodCallParentheses = true;
614
633
                        BeforeMethodDeclarationParentheses = true;
664
683
                        foreach (PropertyInfo info in typeof (CSharpFormattingPolicy).GetProperties ()) {
665
684
                                object val      = info.GetValue (this, null);
666
685
                                object otherVal = info.GetValue (other, null);
667
 
                                if (!val.Equals (otherVal))
 
686
                                if (!val.Equals (otherVal)) {
 
687
                                        Console.WriteLine ("!equal");
668
688
                                        return false;
 
689
                                }
669
690
                        }
 
691
                        Console.WriteLine ("== equal");
670
692
                        return true;
671
693
                }
672
694
        }