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:
parent
6972073054
commit
5cba3bf285
2 changed files with 9 additions and 0 deletions
|
@ -1606,6 +1606,7 @@ public class Scribe {
|
|||
case Token.tRBRACE:
|
||||
case Token.tLBRACE:
|
||||
formatBrace = true;
|
||||
lastLineComment.contiguous = false;
|
||||
}
|
||||
try {
|
||||
printComment();
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue