Commit Graph

4309 Commits

Author SHA1 Message Date
Anna.Kozlova
1fc76eb779 calc types by applicability constraints if inference fails
include all inference variables for resolve and ignore additional constraints checks if the inference is going to failure; this way if (expr()) would get type of the 'standalone' expression instead of expression with boolean as expected type
2017-12-07 15:51:06 +01:00
Pavel Dolgov
307a7c774c Java: Preserve comment from removed redundant variable (IDEA-182669) 2017-12-06 20:36:00 +03:00
Pavel Dolgov
971db5a4d6 Java: Simplify side effects check (IDEA-182669) 2017-12-06 19:08:44 +03:00
Anna.Kozlova
6180b5b337 inference: check substituted intersection type during resolution 2017-12-06 14:54:24 +01:00
Alexey Kudravtsev
e07afa8f5c Date/Time in javadocs considered useless for readability 2017-12-06 15:11:04 +03:00
Tagir Valeev
ac8ad2c822 IDEA-183326 Comment disappears in stream to loop 2017-12-06 17:47:22 +07:00
Tagir Valeev
af2f419e5f ExpressionTypeMemoryState:isSuperStateOf to check additional field
Fixes IDEA-183267 Completion based on instanceof is gone
2017-12-06 17:19:53 +07:00
Tagir Valeev
f03d494538 StringConcatenationInLoopsInspection: add null-check for unknown variables
IDEA-183139 "String to StringBuilder" quick fix may cause NPE
2017-12-06 11:57:10 +07:00
Pavel Dolgov
6bc79aa7ed Java: Use InlineUtil for removing redundant variable (IDEA-182669) 2017-12-05 16:15:51 +03:00
Tagir Valeev
9567645279 LambdaUtil#isSafeLambdaReplacement; used in ComparatorCombinators
Fixes IDEA-183048 stream replacing issue
2017-12-05 17:55:13 +07:00
Tagir Valeev
1f6fd39289 ComparatorCombinatorsInspection: fix chain extraction for incomplete code 2017-12-05 17:09:20 +07:00
Roman Ivanov
ac83fab673 SortContentAction: sort in bare array initializers :IDEA-183183 2017-12-05 16:19:43 +07:00
Anna.Kozlova
7f91247966 surround with auto-closeable: ensure final is restored from existing var
otherwise with generateFinalLocals=true, non-final variables could be made final which leads to red code
2017-12-04 15:14:28 +01:00
Anna.Kozlova
7d71f6f236 preserve comments: surround with auto-closeable 2017-12-04 12:57:44 +01:00
Tagir Valeev
ff3d49c50d UnrollLoopAction: comment handling fixed 2017-12-04 17:45:10 +07:00
Tagir Valeev
6746c6e1d1 StreamApiMigration: fixed exception when void expression is used as method argument 2017-12-04 17:40:01 +07:00
Tagir Valeev
f38a359e18 IDEA-182988 Spurious collection cast on completion Set -> HashSet 2017-12-04 11:58:51 +07:00
peter
20cee42f50 migrate NormalCompletionTest to use jdk 9, add test for IDEA-88939 2017-12-02 08:47:00 +01:00
Anna.Kozlova
97535d8271 preserve comments: split declarations 2017-12-01 18:19:49 +01:00
peter
bf9a49d1be disable "create enum constant" when executing it would result in psi/text inconsistency 2017-11-30 17:34:24 +01:00
Anna.Kozlova
a683df3efd avoid search by offset in copy, use marker instead 2017-11-30 14:49:59 +01:00
Anna.Kozlova
7bccf6ebb2 preserve comments: merge sequential ifs 2017-11-29 12:12:54 +01:00
Anna.Kozlova
64364640a9 normalize declaration: don't include tree next after space 2017-11-29 12:12:54 +01:00
Tagir Valeev
8673ad67aa IDEA-182822 Raw type completion options are suggested when actual expression type is inferred 2017-11-29 17:59:35 +07:00
Pavel Dolgov
4ed027a1fe Java: Inline redundant returned variable after moving 'return' (IDEA-182669) 2017-11-29 12:59:41 +03:00
Pavel Dolgov
bb9fb0fbe6 Java: Simplify handling the comments by using CommentTracker (IDEA-182669) 2017-11-29 12:49:40 +03:00
Anna.Kozlova
873b4402da method info: walk up for resolved candidate (IDEA-181445) 2017-11-28 19:25:06 +01:00
Tagir Valeev
b435203ca2 IDEA-182759 CommentTracker already used exception 2017-11-28 12:57:49 +07:00
Anna.Kozlova
6811b80a39 split into declarations: preserve comments in normalizeDeclaration 2017-11-27 18:05:19 +01:00
Anna.Kozlova
6d20d8614a preserve comments: surround with auto-closeable 2017-11-27 18:05:19 +01:00
Anna.Kozlova
ab80e0dcdd preserve comments: extract if with end of line comments 2017-11-27 16:44:16 +01:00
Roman Shevchenko
f0b9a97b8c [tests] updates module-related testdata 2017-11-27 16:34:02 +01:00
Anna.Kozlova
3c84388f6f lvti: guard SOE (IDEA-181104) 2017-11-27 13:39:21 +01:00
Tagir Valeev
672a49df94 Fixed handling of comments in forEach migration 2017-11-27 16:54:55 +07:00
Tagir Valeev
5b36191d2c IDEA-182623 Replace with collect swallows comments 2017-11-27 15:22:26 +07:00
Tagir Valeev
5b8f3b2bfe StreamApiMigrationInspection: preserve comments on cleanUp limit/bufferedReader 2017-11-27 15:22:25 +07:00
Anna.Kozlova
679013c7ae preserve comments: anonym -> for comments inside parent new expression 2017-11-24 18:41:43 +01:00
Anna.Kozlova
8b287c2f4b preserve comments: extract if condition 2017-11-24 18:41:42 +01:00
peter
4d005013e6 CodeEditUtil.addChildren: avoid returning invalid AST 2017-11-24 16:55:59 +01:00
Anna.Kozlova
c4804ea189 comments based test data for remove arg fix
assume that argument with all comments inside should be deleted
2017-11-24 11:34:19 +01:00
Tagir Valeev
cb4f3f1a89 IDEA-182526 Move assignment to field declaration swallows comments 2017-11-24 11:17:26 +07:00
Tagir Valeev
e71ffcdb58 IDEA-182004 Collection.containsAll() can be simplified in certain cases
RedundantCollectionOperation: strings externalized, description fixed
2017-11-24 10:40:51 +07:00
Tagir Valeev
0393b4fe2f IDEA-182206 Simplification for Arrays.asList().sublist().toArray() 2017-11-23 11:52:59 +07:00
Anna.Kozlova
95a9e27bd8 preserve comments: concatenation to message format
compose tests into one
2017-11-22 19:42:59 +01:00
Anna.Kozlova
6507c89893 preserve comments for create switch intention 2017-11-22 19:42:58 +01:00
Anna.Kozlova
0bd1694079 preserve comments in invert if (IDEA-182500) 2017-11-22 19:42:58 +01:00
Tagir Valeev
d47671a183 Test for IDEA-181794 Suggest completion items with type casts in stream chains
The functionality was implemented automatically after a combination of earlier commits: 9fedf66f and 80e63e2
2017-11-22 14:33:42 +07:00
Tagir Valeev
80e63e20fc DFA: support partial streams and ::isInstance method reference
Fixes:
IDEA-182519 Support non-terminated Stream API chains in data flow
IDEA-182520 Support Xyz.class::isInstance in stream/optional chains
2017-11-22 14:23:00 +07:00
Anna.Kozlova
443fa52729 restore comments on convert to local (IDEA-178942) 2017-11-21 16:51:10 +01:00
Anna.Kozlova
d6b550aa66 convert to local for switch block: add decl before switch (IDEA-181440) 2017-11-21 16:51:09 +01:00