Commit Graph

876 Commits

Author SHA1 Message Date
Tagir Valeev 16ddd276ed IDEA-167088 Stream API migration: support simple joining cases 2017-01-25 12:46:01 +07:00
Bas Leijdekkers acc75fbbff make class abstract too on making method abstract (IDEA-23358) 2017-01-24 14:41:56 +01:00
Tagir Valeev 2d57e55143 StreamToLoopInspection: support groupingBy(..., counting()/summingInt()/summingLong()/summingDouble()/mapping(summing...)) 2017-01-24 17:56:19 +07:00
Tagir Valeev 1820f2db99 StreamToLoopInspection: allow custom sources when option is set 2017-01-24 15:34:50 +07:00
Tagir Valeev ed51fbe99b LambdaRefactoringUtil#convertToLambda: check context when deciding whether to add qualifier 2017-01-24 13:56:26 +07:00
Tagir Valeev 8f904a0d06 IDEA-166827 Quick-fix to insert SAM-method call 2017-01-23 12:55:51 +07:00
Tagir Valeev 305c101ca6 StreamToLoop: fixed method references unwrap when functional interface type parameter is captured wildcard with upper bound 2017-01-20 17:52:44 +07:00
Anna Kozlova 62d2417879 don't qualify with this in static context (IDEA-166793) 2017-01-20 12:58:34 +03:00
Anna Kozlova 93fa3ed8c8 expected type by prefix expression should be calculated by parent (IDEA-166819) 2017-01-20 12:58:32 +03:00
Anna Kozlova f28bfb5bcb redundant type arguments: check all methods applicability till top level (IDEA-166696) 2017-01-20 12:58:32 +03:00
Tagir Valeev 327e51962b IDEA-166814 Stream API migration: support more post-loop steps 2017-01-19 14:14:20 +07:00
Anna Kozlova e323aa8b9c lambda -> method ref: don't transform by default array access qualifiers (IDEA-166740) 2017-01-18 19:11:49 +03:00
Anna Kozlova 560b5b0265 provide accessibility and static modifier fixes for method references (IDEA-166707) 2017-01-18 16:55:38 +03:00
Tagir Valeev cbd273dda8 StreamApiMigration: minor fixes in FindFirst scenarios 2017-01-18 13:52:12 +07:00
Tagir Valeev 4c07a74eb5 CommentTracker: better whitespace handling 2017-01-18 13:52:11 +07:00
Tagir Valeev a363362459 StreamApiMigration: automatically simplify IntStream.range().mapXyz chains; IndexedContainer#getElementType: do not erase 2017-01-16 17:43:50 +07:00
Tagir Valeev 8924fda614 StreamToLoopInspection: fixed unqualified reference to stream() method handling 2017-01-16 14:44:34 +07:00
Tagir Valeev 4aaa6a4cc2 IDEA-166636 A bunch of bugs in TrivialFunctionalExpressionUsageInspection (Method call can be simplified) 2017-01-16 12:52:08 +07:00
Anna Kozlova 1700f14d67 create class from new: put caret on name (IDEA-166356) 2017-01-13 16:24:36 +01:00
Pavel Dolgov 93e109126a Java: Simplified handling the parentheses in the quick-fix Collection.toArray() (IDEA-163341) 2017-01-13 12:43:30 +03:00
Pavel Dolgov 85e93b585f Java: When generating return statement where the returned type is a type parameter array (like T[]) don't suggest Collection.toArray() (IDEA-163341) 2017-01-13 12:22:32 +03:00
Pavel Dolgov 83b5637a43 Java: Don't offer the quick-fix Collection.toArray() for type parameter arrays (like T[]) (IDEA-163341) 2017-01-13 12:22:32 +03:00
Tagir Valeev 67964b82d4 ForCanBeForeachInspection: fixed incorrect merge conflict resolution; ForCanBeForeachInspectionFixTest merged with ForCanBeForeachFixTest 2017-01-13 14:19:41 +07:00
Tagir Valeev 1638590aad ExpressionUtils#getQualifierOrThis; ForCanBeForeachInspection & WhileCanBeForeachInspection fixed to handle unqualified calls in nested classes; cosmetics; tests for ForCanBeForeachInspection quick fix 2017-01-13 13:28:31 +07:00
Anna Kozlova 7d8df26aed surround with array fix: ensure result is free from generics array creation error (IDEA-166489; IDEA-166490) 2017-01-12 16:57:35 +01:00
Tagir Valeev 5b04785164 IDEA-166499 Stream API migration: support array filling in a loop 2017-01-12 17:37:10 +07:00
Tagir Valeev 5a599cdffd IDEA-166424 Guava create collections , nonsupport replace with stream API 2017-01-12 11:55:44 +07:00
Tagir Valeev 347bd66e81 StreamApiMigrationInspection: enable flatMap with primitive type change 2017-01-12 11:18:29 +07:00
Tagir Valeev 0957d52585 Convert for-loop with Collections.addAll: support primitive types; switch off when count expression is used; wrong contracts removed 2017-01-12 11:04:58 +07:00
Pavel Dolgov 26a7739891 Java: Implemented the quick-fix Collection.toArray() that is offered in the context where an array is required but a collection is provided (IDEA-163341) 2017-01-11 16:43:18 +03:00
Anna.Kozlova 23c0f28705 change signature: don't ask about covariant overrides when types are equal, e.g. when super type is changed based on override method return type
type annotations: ensure annotations are cloned so invalidating initial type doesn't break the consequence refactoring
EA-93296 - PIEAE: PsiUtilCore.ensureValid
2017-01-11 12:58:26 +01:00
Pavel Dolgov af46d7d411 Java: When generating return statement where the returned type is a primitive array don't suggest Collection.toArray() (IDEA-163341) 2017-01-11 12:33:51 +03:00
Tagir Valeev 1ee8a1fbfe IDEA-166211 Convert for-loop with Collections.addAll inside into Java 8's stream API calls chain 2017-01-11 15:57:54 +07:00
Tagir Valeev b3a181a091 StreamApiMigrationInspection: refactoring of collect scenarios: CollectTerminal interface extracted and used; all forEach scenarios moved to ForEachMigration; cosmetics 2017-01-11 14:37:50 +07:00
Pavel Dolgov 6b7992b4ce Java: When generating return statement where the returned type is an array suggest Collection.toArray() if there's no better option (IDEA-163341) 2017-01-10 12:37:42 +03:00
Tagir Valeev 3738e54fee StreamApiMigration: add parentheses if necessary when .stream() can be omitted (fix for EA-93812). 2017-01-10 09:42:03 +06:00
Tagir Valeev 38db92f734 UseBulkOperationInspection: register BulkMethodInfo via extension points; JPA classes extracted 2016-12-30 17:48:49 +07:00
Tagir Valeev 5e742cdfac StreamToLoopInspection: reuse final variable as non-final (removing "final" keyword) (IDEA-CR-17006) 2016-12-30 15:09:55 +07:00
Tagir Valeev a613a9253d UseBulkOperationInspection: qualifier expression checked; arrays support fixed for CrudRepository.save 2016-12-30 14:02:55 +07:00
Tagir Valeev 01d7ee7d3c IDEA-165942 Inspection to replace method call in a loop with bulk operation 2016-12-30 13:01:31 +07:00
Tagir Valeev 2c57d04054 StringConcatenationInLoopsInspectionFix: fixed parenthesized append (IDEA-165968), fix renamed to "Convert variable ''{0}'' from String to {1}" 2016-12-28 13:40:03 +07:00
Tagir Valeev d707262f9d StreamToLoop: merge sorted().toArray() and sorted().collect(Collectors.toList()) into single step 2016-12-27 17:47:44 +07:00
Tagir Valeev 54eb6ce6af StreamToLoop: support condition inside flatMap 2016-12-27 14:40:01 +07:00
Tagir Valeev 96cf01152f StreamToLoop/ToPrimitiveArrayTerminalOperation: reassign final array making it possible to reuse existing variable 2016-12-27 13:58:09 +07:00
Tagir Valeev ae5d133904 StreamToLoopInspection: sorted() operation (currently for non-primitive streams only) 2016-12-27 13:13:53 +07:00
Tagir Valeev fb12495825 StreamToLoopInspection: unwrap && and || chains; copy return statement in found/not found places; do not eagerly evaluate non-trivial ternary branch 2016-12-27 12:38:05 +07:00
Tagir Valeev c9c574e428 StreamToLoopInspection: preserve comments; CommentTracker: now possible to delete element first and only after that register unchanged parts. 2016-12-23 18:09:43 +07:00
Tagir Valeev 1e33755e09 StreamToLoopInspection: reuse existing variable if we should reassign it in loop, but it's possible to use it as non-final 2016-12-23 13:30:08 +07:00
peter 66b8d67f53 IDEA-165067 Unwrapping 'if' leads to non-compilable code 2016-12-22 14:06:29 +01:00
Tagir Valeev 9cae3c25fa IDEA-165790 Stream API migration: support distinct() with collect(toList()) 2016-12-22 16:33:06 +07:00