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

« back to all changes in this revision

Viewing changes to src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpIndentEngineStack.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:
129
129
                                indentBuilder = new StringBuilder ();
130
130
                                if ((inside & (Inside.Attribute | Inside.ParenList)) != 0) {
131
131
                                        if (size > 0 && stack[sp].inside == inside) {
132
 
                                                indentBuilder.Append (stack[sp].indent);
133
 
                                                if (stack[sp].lineNr == lineNr)
134
 
                                                        n = stack[sp].nSpaces;
 
132
                                                while (sp >= 0) {
 
133
                                                        if ((stack[sp].inside & Inside.FoldedOrBlock) != 0)
 
134
                                                                break;
 
135
                                                        sp--;
 
136
                                                }
 
137
                                                if (sp >= 0) {
 
138
                                                        indentBuilder.Append (stack[sp].indent);
 
139
                                                        if (stack[sp].lineNr == lineNr)
 
140
                                                                n = stack[sp].nSpaces;
 
141
                                                }
135
142
                                        } else {
136
143
                                                while (sp >= 0) {
137
144
                                                        if ((stack[sp].inside & Inside.FoldedBlockOrCase) != 0) {
142
149
                                                        sp--;
143
150
                                                }
144
151
                                        }
145
 
                                        if (PropertyService.Get ("OnTheFlyFormatting", false)) {
 
152
//                                      if (PropertyService.Get ("OnTheFlyFormatting", false)) {
146
153
                                                indentBuilder.Append ('\t');
147
 
                                        } else {
148
 
                                                indentBuilder.Append (' ', nSpaces - n);
149
 
                                        }
 
154
//                                      } else {
 
155
//                                              indentBuilder.Append (' ', nSpaces - n);
 
156
//                                      }
150
157
                                } else if (inside == Inside.MultiLineComment) {
151
158
                                        if (size > 0) {
152
159
                                                indentBuilder.Append (stack[sp].indent);