Link Here
|
6203 |
"}\n"); |
6203 |
"}\n"); |
6204 |
} |
6204 |
} |
6205 |
|
6205 |
|
|
|
6206 |
/** |
6207 |
* @bug 304705: [formatter] Unexpected indentation of wrapped line comments when 'Never indent line comment on first column' preference is checked |
6208 |
* @test Verify that wrapped line comments are also put at first column |
6209 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=304705" |
6210 |
*/ |
6211 |
public void testBug304705() { |
6212 |
this.formatterPrefs.never_indent_line_comments_on_first_column = true; |
6213 |
String source = |
6214 |
"public interface Example {\n" + |
6215 |
"// This is a long comment with whitespace that should be split in multiple line comments in case the line comment formatting is enabled\n" + |
6216 |
" int foo();\n" + |
6217 |
"}\n"; |
6218 |
formatSource(source, |
6219 |
"public interface Example {\n" + |
6220 |
"// This is a long comment with whitespace that should be split in multiple line\n" + |
6221 |
"// comments in case the line comment formatting is enabled\n" + |
6222 |
" int foo();\n" + |
6223 |
"}\n"); |
6224 |
} |
6225 |
public void testBug304705b() { |
6226 |
this.formatterPrefs.never_indent_block_comments_on_first_column = true; |
6227 |
String source = |
6228 |
"public interface Example {\n" + |
6229 |
"/* This is a long comment with whitespace that should be split in multiple line comments in case the line comment formatting is enabled */\n" + |
6230 |
" int foo();\n" + |
6231 |
"}\n"; |
6232 |
formatSource(source, |
6233 |
"public interface Example {\n" + |
6234 |
"/*\n" + |
6235 |
" * This is a long comment with whitespace that should be split in multiple line\n" + |
6236 |
" * comments in case the line comment formatting is enabled\n" + |
6237 |
" */\n" + |
6238 |
" int foo();\n" + |
6239 |
"}\n"); |
6240 |
} |
6241 |
|
6206 |
} |
6242 |
} |