1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Formatting bug fixes.

This commit is contained in:
Sergey Prigogin 2011-04-24 01:40:59 +00:00
parent 6972073054
commit 5cba3bf285
2 changed files with 9 additions and 0 deletions

View file

@ -1606,6 +1606,7 @@ public class Scribe {
case Token.tRBRACE:
case Token.tLBRACE:
formatBrace = true;
lastLineComment.contiguous = false;
}
try {
printComment();

View file

@ -888,19 +888,27 @@ public class CodeFormatterTest extends BaseUITestCase {
assertFormatterResult();
}
//namespace ns1 {
//namespace ns2 {
//void foo() {
// int x; // comment
// int y; // comment
// // continuation of the previous comment
//// int z; <- comments starting from the beginning of line are not indented
//}
//}// namespace ns2
//}// namespace ns1
//namespace ns1 {
//namespace ns2 {
//void foo() {
// int x; // comment
// int y; // comment
// // continuation of the previous comment
//// int z; <- comments starting from the beginning of line are not indented
//}
//} // namespace ns2
//} // namespace ns1
public void testLineCommentMinDistanceFromCode() throws Exception {
fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_MIN_DISTANCE_BETWEEN_CODE_AND_LINE_COMMENT, "2");