~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Core/MonoDevelop.Projects.Dom/DomRegion.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
        [Serializable]
34
34
        public struct DomRegion : IComparable, IComparable<DomRegion>
35
35
        {
36
 
                public readonly static DomRegion Empty = new DomRegion (-1, -1, -1, -1);
 
36
                public readonly static DomRegion Empty = new DomRegion (0, 0, 0, 0);
 
37
                DomLocation start, end;
37
38
                
38
39
                public bool IsEmpty {
39
40
                        get {
40
 
                                return Start.Line < 0;
 
41
                                return Start.Line < 1;
41
42
                        }
42
43
                }
43
44
 
44
45
                public DomLocation Start {
45
 
                        get;
46
 
                        set;
 
46
                        get { return start; }
 
47
                        set { start = value; }
47
48
                }
48
49
 
49
50
                public DomLocation End {
50
 
                        get;
51
 
                        set;
52
 
                }
53
 
                
54
 
                public DomRegion (int startLine, int endLine) : this (startLine, -1, endLine, -1)
55
 
                {
56
 
                }
57
 
                
58
 
                public DomRegion (int startLine, int startColumn, int endLine, int endColumn) : this ()
59
 
                {
60
 
                        this.Start = new DomLocation (startLine, startColumn);
61
 
                        this.End   = new DomLocation (endLine, endColumn);
62
 
                }
63
 
                
64
 
                public DomRegion (DomLocation start, DomLocation end) : this (start.Line, start.Column, end.Line, end.Column)
65
 
                {
 
51
                        get { return end; }
 
52
                        set { end = value; }
 
53
                }
 
54
                
 
55
                public DomRegion (int startLine, int endLine) : this (startLine, 1, endLine, 1)
 
56
                {
 
57
                }
 
58
                
 
59
                // the call to the empty construtor is required for the windows build
 
60
                public DomRegion (int startLine, int startColumn, int endLine, int endColumn) : this()
 
61
                {
 
62
                        this.start = new DomLocation (startLine, startColumn);
 
63
                        this.end   = new DomLocation (endLine, endColumn);
 
64
                }
 
65
                
 
66
                public DomRegion (DomLocation start, DomLocation end) : this()
 
67
                {
 
68
                        this.start = start;
 
69
                        this.end   = end;
66
70
                }
67
71
                
68
72
                public static DomRegion FromInvariantString (string invariantString)