|
Lines 10-15
Link Here
|
| 10 |
* Ray V. (voidstar@gmail.com) - Contribution for bug 282988 |
10 |
* Ray V. (voidstar@gmail.com) - Contribution for bug 282988 |
| 11 |
* Robin Stocker - Bug 49619 - [formatting] comment formatter leaves whitespace in comments |
11 |
* Robin Stocker - Bug 49619 - [formatting] comment formatter leaves whitespace in comments |
| 12 |
* Mateusz Matela <mateusz.matela@gmail.com> - [formatter] Formatter does not format Java code correctly, especially when max line width is set - https://bugs.eclipse.org/303519 |
12 |
* Mateusz Matela <mateusz.matela@gmail.com> - [formatter] Formatter does not format Java code correctly, especially when max line width is set - https://bugs.eclipse.org/303519 |
|
|
13 |
* Mateusz Matela <mateusz.matela@gmail.com> - [formatter] follow up bug for comments - https://bugs.eclipse.org/458208 |
| 13 |
*******************************************************************************/ |
14 |
*******************************************************************************/ |
| 14 |
package org.eclipse.jdt.core.tests.formatter; |
15 |
package org.eclipse.jdt.core.tests.formatter; |
| 15 |
|
16 |
|
|
Lines 1904-1910
Link Here
|
| 1904 |
"@MessageDriven(mappedName = \"filiality/SchedulerMQService\",\n" + |
1905 |
"@MessageDriven(mappedName = \"filiality/SchedulerMQService\",\n" + |
| 1905 |
" activationConfig = {\n" + |
1906 |
" activationConfig = {\n" + |
| 1906 |
" @ActivationConfigProperty(propertyName = \"cronTrigger\",\n" + |
1907 |
" @ActivationConfigProperty(propertyName = \"cronTrigger\",\n" + |
| 1907 |
" propertyValue = \"0/10 * * * * ?\") })\n" + |
1908 |
" propertyValue = \"0/10 * * * * ?\")\n" + |
|
|
1909 |
" })\n" + |
| 1908 |
"@RunAs(\"admin\")\n" + |
1910 |
"@RunAs(\"admin\")\n" + |
| 1909 |
"@ResourceAdapter(\"quartz-ra.rar\")\n" + |
1911 |
"@ResourceAdapter(\"quartz-ra.rar\")\n" + |
| 1910 |
"@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n" + |
1912 |
"@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n" + |
|
Lines 8039-8047
Link Here
|
| 8039 |
"public class X07 {\n" + |
8041 |
"public class X07 {\n" + |
| 8040 |
"\n" + |
8042 |
"\n" + |
| 8041 |
" static final long[] jjtoToken = {\n" + |
8043 |
" static final long[] jjtoToken = {\n" + |
| 8042 |
" 0x7fbfecffL, };\n" + |
8044 |
" 0x7fbfecffL,\n" + |
|
|
8045 |
" };\n" + |
| 8043 |
" static final long[] jjtoSkip = {\n" + |
8046 |
" static final long[] jjtoSkip = {\n" + |
| 8044 |
" 0x400000L, };\n" + |
8047 |
" 0x400000L,\n" + |
|
|
8048 |
" };\n" + |
| 8045 |
"\n" + |
8049 |
"\n" + |
| 8046 |
"}\n" |
8050 |
"}\n" |
| 8047 |
); |
8051 |
); |
|
Lines 8070-8079
Link Here
|
| 8070 |
"\n" + |
8074 |
"\n" + |
| 8071 |
" static final long[] jjtoToken =\n" + |
8075 |
" static final long[] jjtoToken =\n" + |
| 8072 |
" {\n" + |
8076 |
" {\n" + |
| 8073 |
" 0x7fbfecffL, };\n" + |
8077 |
" 0x7fbfecffL,\n" + |
|
|
8078 |
" };\n" + |
| 8074 |
" static final long[] jjtoSkip =\n" + |
8079 |
" static final long[] jjtoSkip =\n" + |
| 8075 |
" {\n" + |
8080 |
" {\n" + |
| 8076 |
" 0x400000L, };\n" + |
8081 |
" 0x400000L,\n" + |
|
|
8082 |
" };\n" + |
| 8077 |
"\n" + |
8083 |
"\n" + |
| 8078 |
"}\n" |
8084 |
"}\n" |
| 8079 |
); |
8085 |
); |
|
Lines 8122-8128
Link Here
|
| 8122 |
"public class X09 {\n" + |
8128 |
"public class X09 {\n" + |
| 8123 |
" public Class[] getAdapterList() {\n" + |
8129 |
" public Class[] getAdapterList() {\n" + |
| 8124 |
" return new Class[] {\n" + |
8130 |
" return new Class[] {\n" + |
| 8125 |
" IWorkbenchAdapter.class };\n" + |
8131 |
" IWorkbenchAdapter.class\n" + |
|
|
8132 |
" };\n" + |
| 8126 |
" }\n" + |
8133 |
" }\n" + |
| 8127 |
"}\n" |
8134 |
"}\n" |
| 8128 |
); |
8135 |
); |
|
Lines 9303-9309
Link Here
|
| 9303 |
" * \"GeneralPage.DoubleClick\", resName, 1,\n" + |
9310 |
" * \"GeneralPage.DoubleClick\", resName, 1,\n" + |
| 9304 |
" * new String[][] {\n" + |
9311 |
" * new String[][] {\n" + |
| 9305 |
" * { \"Open Browser\", \"open\" },\n" + |
9312 |
" * { \"Open Browser\", \"open\" },\n" + |
| 9306 |
" * { \"Expand Tree\", \"expand\" } },\n" + |
9313 |
" * { \"Expand Tree\", \"expand\" }\n" + |
|
|
9314 |
" * },\n" + |
| 9307 |
" * parent);\n" + |
9315 |
" * parent);\n" + |
| 9308 |
" * </pre>\n" + |
9316 |
" * </pre>\n" + |
| 9309 |
" */\n" + |
9317 |
" */\n" + |
|
Lines 9335-9341
Link Here
|
| 9335 |
" /* INACTIVE */ { \"INACTIVE\", \"PARTLY_ACTIVE\", \"PARTLY_ACTIVE\" },\n" + |
9343 |
" /* INACTIVE */ { \"INACTIVE\", \"PARTLY_ACTIVE\", \"PARTLY_ACTIVE\" },\n" + |
| 9336 |
" /* PARTLY_ACTIVE */ { \"PARTLY_ACTIVE\", \"PARTLY_ACTIVE\",\n" + |
9344 |
" /* PARTLY_ACTIVE */ { \"PARTLY_ACTIVE\", \"PARTLY_ACTIVE\",\n" + |
| 9337 |
" \"PARTLY_ACTIVE\" },\n" + |
9345 |
" \"PARTLY_ACTIVE\" },\n" + |
| 9338 |
" /* ACTIVE */ { \"PARTLY_ACTIVE\", \"PARTLY_ACTIVE\", \"ACTIVE\" } };\n" + |
9346 |
" /* ACTIVE */ { \"PARTLY_ACTIVE\", \"PARTLY_ACTIVE\", \"ACTIVE\" }\n" + |
|
|
9347 |
" };\n" + |
| 9339 |
"}\n" |
9348 |
"}\n" |
| 9340 |
); |
9349 |
); |
| 9341 |
} |
9350 |
} |
|
Lines 9506-9512
Link Here
|
| 9506 |
" user,\n" + |
9515 |
" user,\n" + |
| 9507 |
" revision,\n" + |
9516 |
" revision,\n" + |
| 9508 |
" String.valueOf(delta),\n" + |
9517 |
" String.valueOf(delta),\n" + |
| 9509 |
" line });\n" + |
9518 |
" line\n" + |
|
|
9519 |
" });\n" + |
| 9510 |
" }\n" + |
9520 |
" }\n" + |
| 9511 |
"}\n" |
9521 |
"}\n" |
| 9512 |
); |
9522 |
); |
|
Lines 9609-9615
Link Here
|
| 9609 |
" IWorkbenchThemeConstants.INACTIVE_TAB_TEXT_COLOR),\n" + |
9619 |
" IWorkbenchThemeConstants.INACTIVE_TAB_TEXT_COLOR),\n" + |
| 9610 |
" new Color[] {\n" + |
9620 |
" new Color[] {\n" + |
| 9611 |
" colorRegistry.get(\n" + |
9621 |
" colorRegistry.get(\n" + |
| 9612 |
" IWorkbenchThemeConstants.INACTIVE_TAB_BG_START) },\n" + |
9622 |
" IWorkbenchThemeConstants.INACTIVE_TAB_BG_START)\n" + |
|
|
9623 |
" },\n" + |
| 9613 |
" new int[0],\n" + |
9624 |
" new int[0],\n" + |
| 9614 |
" true);\n" + |
9625 |
" true);\n" + |
| 9615 |
" }\n" + |
9626 |
" }\n" + |
|
Lines 9778-9784
Link Here
|
| 9778 |
" public char[][] getCompoundName() {\n" + |
9789 |
" public char[][] getCompoundName() {\n" + |
| 9779 |
" return EvaluationConstants.ROOT_COMPOUND_NAME;\n" + |
9790 |
" return EvaluationConstants.ROOT_COMPOUND_NAME;\n" + |
| 9780 |
" }\n" + |
9791 |
" }\n" + |
| 9781 |
" } },\n" + |
9792 |
" }\n" + |
|
|
9793 |
" },\n" + |
| 9782 |
" null);\n" + |
9794 |
" null);\n" + |
| 9783 |
" }\n" + |
9795 |
" }\n" + |
| 9784 |
" }\n" + |
9796 |
" }\n" + |
|
Lines 9983-9989
Link Here
|
| 9983 |
" return info.getLocal()\n" + |
9995 |
" return info.getLocal()\n" + |
| 9984 |
" .getType() == IResource.FILE;\n" + |
9996 |
" .getType() == IResource.FILE;\n" + |
| 9985 |
" }\n" + |
9997 |
" }\n" + |
| 9986 |
" } }),\n" + |
9998 |
" }\n" + |
|
|
9999 |
" }),\n" + |
| 9987 |
" // Conflicting changes of files will fail if the local is not\n" + |
10000 |
" // Conflicting changes of files will fail if the local is not\n" + |
| 9988 |
" // managed\n" + |
10001 |
" // managed\n" + |
| 9989 |
" // or is an addition\n" + |
10002 |
" // or is an addition\n" + |
|
Lines 10010-10016
Link Here
|
| 10010 |
" }\n" + |
10023 |
" }\n" + |
| 10011 |
" return false;\n" + |
10024 |
" return false;\n" + |
| 10012 |
" }\n" + |
10025 |
" }\n" + |
| 10013 |
" } }),\n" + |
10026 |
" }\n" + |
|
|
10027 |
" }),\n" + |
| 10014 |
" // Conflicting changes involving a deletion on one side will\n" + |
10028 |
" // Conflicting changes involving a deletion on one side will\n" + |
| 10015 |
" // aways fail\n" + |
10029 |
" // aways fail\n" + |
| 10016 |
" new AndSyncInfoFilter(new FastSyncInfoFilter[] {\n" + |
10030 |
" new AndSyncInfoFilter(new FastSyncInfoFilter[] {\n" + |
|
Lines 10029-10035
Link Here
|
| 10029 |
" && !base.equals(remote));\n" + |
10043 |
" && !base.equals(remote));\n" + |
| 10030 |
" }\n" + |
10044 |
" }\n" + |
| 10031 |
" }\n" + |
10045 |
" }\n" + |
| 10032 |
" } }),\n" + |
10046 |
" }\n" + |
|
|
10047 |
" }),\n" + |
| 10033 |
" // Conflicts where the file type is binary will work but are not\n" + |
10048 |
" // Conflicts where the file type is binary will work but are not\n" + |
| 10034 |
" // merged\n" + |
10049 |
" // merged\n" + |
| 10035 |
" // so they should be skipped\n" + |
10050 |
" // so they should be skipped\n" + |
|
Lines 10058-10066
Link Here
|
| 10058 |
" }\n" + |
10073 |
" }\n" + |
| 10059 |
" return false;\n" + |
10074 |
" return false;\n" + |
| 10060 |
" }\n" + |
10075 |
" }\n" + |
| 10061 |
" } }),\n" + |
10076 |
" }\n" + |
|
|
10077 |
" }),\n" + |
| 10062 |
" // Outgoing changes may not fail but they are skipped as well\n" + |
10078 |
" // Outgoing changes may not fail but they are skipped as well\n" + |
| 10063 |
" new SyncInfoDirectionFilter(SyncInfo.OUTGOING) });\n" + |
10079 |
" new SyncInfoDirectionFilter(SyncInfo.OUTGOING)\n" + |
|
|
10080 |
" });\n" + |
| 10064 |
" }\n" + |
10081 |
" }\n" + |
| 10065 |
"}\n" |
10082 |
"}\n" |
| 10066 |
); |
10083 |
); |
|
Lines 10111-10117
Link Here
|
| 10111 |
" { 104, 20 },\n" + |
10128 |
" { 104, 20 },\n" + |
| 10112 |
" { 108, 21 },\n" + |
10129 |
" { 108, 21 },\n" + |
| 10113 |
" { 12, 1856 },\n" + |
10130 |
" { 12, 1856 },\n" + |
| 10114 |
" { 13, 1920 } }, };\n" + |
10131 |
" { 13, 1920 } },\n" + |
|
|
10132 |
" };\n" + |
| 10115 |
"}\n" |
10133 |
"}\n" |
| 10116 |
); |
10134 |
); |
| 10117 |
} |
10135 |
} |
|
Lines 10252-10258
Link Here
|
| 10252 |
" UNKNOWN,\n" + |
10270 |
" UNKNOWN,\n" + |
| 10253 |
" UNKNOWN,\n" + |
10271 |
" UNKNOWN,\n" + |
| 10254 |
" UNKNOWN,\n" + |
10272 |
" UNKNOWN,\n" + |
| 10255 |
" UNKNOWN } };\n" + |
10273 |
" UNKNOWN }\n" + |
|
|
10274 |
" };\n" + |
| 10256 |
"\n" + |
10275 |
"\n" + |
| 10257 |
"}\n" |
10276 |
"}\n" |
| 10258 |
); |
10277 |
); |
|
Lines 10298-10304
Link Here
|
| 10298 |
" \"READ_POTENTIAL\",\n" + |
10317 |
" \"READ_POTENTIAL\",\n" + |
| 10299 |
" \"UNKNOWN\",\n" + |
10318 |
" \"UNKNOWN\",\n" + |
| 10300 |
" \"UNKNOWN\",\n" + |
10319 |
" \"UNKNOWN\",\n" + |
| 10301 |
" \"UNKNOWN\" }, };\n" + |
10320 |
" \"UNKNOWN\" },\n" + |
|
|
10321 |
" };\n" + |
| 10302 |
"\n" + |
10322 |
"\n" + |
| 10303 |
"}\n" |
10323 |
"}\n" |
| 10304 |
); |
10324 |
); |
|
Lines 10346-10352
Link Here
|
| 10346 |
" \"READ_POTENTIAL\",\n" + |
10366 |
" \"READ_POTENTIAL\",\n" + |
| 10347 |
" \"UNKNOWN\",\n" + |
10367 |
" \"UNKNOWN\",\n" + |
| 10348 |
" \"UNKNOWN\",\n" + |
10368 |
" \"UNKNOWN\",\n" + |
| 10349 |
" \"UNKNOWN\" }, };\n" + |
10369 |
" \"UNKNOWN\" },\n" + |
|
|
10370 |
" };\n" + |
| 10350 |
"\n" + |
10371 |
"\n" + |
| 10351 |
"}\n" |
10372 |
"}\n" |
| 10352 |
); |
10373 |
); |
|
Lines 10387-10393
Link Here
|
| 10387 |
" \"1234567890123456789012345678901234567890\" },\n" + |
10408 |
" \"1234567890123456789012345678901234567890\" },\n" + |
| 10388 |
" /* Comment 3 */ {\n" + |
10409 |
" /* Comment 3 */ {\n" + |
| 10389 |
" \"ABCDEFGHIJKLMNOPQRSTUVWXYZ______________\",\n" + |
10410 |
" \"ABCDEFGHIJKLMNOPQRSTUVWXYZ______________\",\n" + |
| 10390 |
" \"ABCDEFGHIJKLMNOPQRSTUVWXYZ______________\" }, };\n" + |
10411 |
" \"ABCDEFGHIJKLMNOPQRSTUVWXYZ______________\" },\n" + |
|
|
10412 |
" };\n" + |
| 10391 |
"\n" + |
10413 |
"\n" + |
| 10392 |
"}\n" |
10414 |
"}\n" |
| 10393 |
); |
10415 |
); |
|
Lines 10639-10642
Link Here
|
| 10639 |
|
10661 |
|
| 10640 |
// K_COMPILATION_UNIT is tested by FormatterRegressionTests#test512() and #test643() |
10662 |
// K_COMPILATION_UNIT is tested by FormatterRegressionTests#test512() and #test643() |
| 10641 |
} |
10663 |
} |
|
|
10664 |
/** |
| 10665 |
* @bug 458208: [formatter] follow up bug for comments |
| 10666 |
* @test test a space is not added after a lambda expression in parenthesis |
| 10667 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=458208" |
| 10668 |
*/ |
| 10669 |
public void testBug458208() throws Exception { |
| 10670 |
String source = |
| 10671 |
"package p;\n" + |
| 10672 |
"import java.util.function.IntConsumer;\n" + |
| 10673 |
"class TestInlineLambda1 {\n" + |
| 10674 |
" {\n" + |
| 10675 |
" IntConsumer op = (x -> {} );\n" + |
| 10676 |
" }\n" + |
| 10677 |
"}\n"; |
| 10678 |
formatSource(source, |
| 10679 |
"package p;\n" + |
| 10680 |
"\n" + |
| 10681 |
"import java.util.function.IntConsumer;\n" + |
| 10682 |
"\n" + |
| 10683 |
"class TestInlineLambda1 {\n" + |
| 10684 |
" {\n" + |
| 10685 |
" IntConsumer op = (x -> {\n" + |
| 10686 |
" });\n" + |
| 10687 |
" }\n" + |
| 10688 |
"}\n" |
| 10689 |
); |
| 10690 |
} |
| 10642 |
} |
10691 |
} |