Commit Graph

3490 Commits

Author SHA1 Message Date
Anna.Kozlova 12554167e7 inference on incomplete code (EA-90195 - AIOOBE: PsiTypesUtil.getParameterType) 2016-10-20 19:04:25 +02:00
peter 9ffa29ca2d doPostponedFormatting after formatting in completion after new (IDEA-CR-14717) 2016-10-20 18:16:36 +02:00
Anna.Kozlova 8952680a73 completion: infer Throwable for thrown bounds in completion so more candidates would be applicable (IDEA-162710) 2016-10-20 13:14:23 +02:00
Tagir Valeev 74ae9731a8 IDEA-162694 Improve "Merge filter chain" intention 2016-10-20 11:19:25 +07:00
peter 1831c53320 constructor completion: implement anonymous methods after arg live template (IDEA-CR-14717) 2016-10-19 19:27:57 +02:00
peter 5b863d7817 constructor completion: insert the chosen constructor and position the caret accordingly (IDEA-CR-14717) 2016-10-19 19:27:57 +02:00
Anna.Kozlova f26364eca1 new inference: erasure of type parameters with proper bounds (IDEA-162544) 2016-10-19 19:17:33 +02:00
peter 2824ee87e4 java completion: fix "{} ()" when choosing anonymous class constructor with parameters 2016-10-19 09:23:15 +02:00
Anna.Kozlova b815947ac2 provide fix all intention for local inspections paired to global tools (IDEA-162507) 2016-10-18 10:30:52 +02:00
Tagir Valeev ab6907ca07 IDEA-162696 Intention "Merge filter chain" does not add parentheses if necessary 2016-10-18 13:49:07 +07:00
Tagir Valeev ee1bd69c2e IDEA-162574 False positive 'Lambda can be replaced with method reference' 2016-10-18 12:53:15 +07:00
Tagir Valeev d807cd3b24 add missing StreamApiMigration test 2016-10-18 10:54:33 +07:00
Tagir Valeev 86eaaf22bf IDEA-160988 Add inspection to merge adjacent Stream API calls 2016-10-17 17:17:46 +07:00
Roman Shevchenko 221dff5bd7 Merge remote-tracking branch 'origin/master' 2016-10-14 19:08:58 +02:00
Roman Shevchenko 156a98a67b [java] automatic modules 2016-10-14 19:08:29 +02:00
Anna.Kozlova 614deb2e24 postfix completion: inplace introduce variable: ensure doc committed when handler is started inside writeAction
test: switch on inplace mode in tests
EA-86900 - RE: PostprocessReformattingAspect.beforeDocumentChanged
2016-10-14 09:57:28 +02:00
Roman Shevchenko 35be5f5b7b [java] package accessibility check for library classes 2016-10-13 16:57:54 +02:00
Anna.Kozlova 88b28233e8 variable array fix: don't create fix if it can't be applied when there is no variable in the context
EA-54266 - ISE: VariableArrayTypeFix.getText
2016-10-12 18:22:05 +02:00
Anna.Kozlova 5af6b0be16 defer assignment: choose anchor from same code block
EA-48621 - assert: CompositeElement.addChild
2016-10-12 14:04:38 +02:00
Anna.Kozlova 41c2429966 new inference: postpone unresolved variables in favor to variables with proper equals bound 2016-10-11 10:27:29 +02:00
peter 283613d591 IDEA-162322 Completion missing for field in copy constructor 2016-10-10 20:49:28 +02:00
Anna.Kozlova 44c7364228 extends type parameter: allow wildcards (IDEA-162229) 2016-10-10 14:19:25 +02:00
Tagir Valeev eaff2cebb6 fix invalid negative tests for quick-fixes 2016-10-10 18:24:14 +07:00
Tagir Valeev c844054768 IDEA-162190 Inspection to convert anonymous ThreadLocal subclass to ThreadLocal.withInitial 2016-10-10 15:21:24 +07:00
Anna.Kozlova 98094c72de lambda: ensure deep nested lambdas get target types from top level inference (IDEA-157314) 2016-10-07 13:55:01 +02:00
Anna.Kozlova b560ee5910 lambda highlighting: if return statement has problem, try to highlight only corresponding return even if containing inference failed 2016-10-07 13:55:01 +02:00
Tagir Valeev aa605118de LightQuickFixTestCase: Check whether <caret> is present in "before" files; wrong tests fixed 2016-10-07 16:34:42 +07:00
Tagir Valeev ebf320b288 Stream API migration various fixes
1. findFirst() scenario can pull previous assignment (not declaration) now
2. anyMatch() fix did not work if there's single assignment to non-variable (e.g. array element)
3. if non-adjacent return becomes unreachable after findFirst()/anyMatch(), it returned automatically now
2016-10-07 11:59:52 +07:00
Anna.Kozlova 62d25f9d05 new inference: provide incomplete inference results for lambda (IDEA-162035; IDEA-155230) 2016-10-06 16:21:05 +02:00
Tagir Valeev 0ad3891e96 IDEA-162157 Stream API migration: support counted for loop (both outer and flatMapped) 2016-10-06 17:59:25 +07:00
Anna.Kozlova ef162f71c7 fix testdata 2016-10-05 10:31:37 +02:00
Tagir Valeev 46f9ce3e03 fix cast introduction in LambdaCanBeMethodReferenceInspection#replaceLambdaWithMethodReference 2016-10-05 12:24:55 +07:00
Anna.Kozlova 031f71c5b3 redundant cast: don't highlight conditional with functional branches (IDEA-161971) 2016-10-04 18:45:14 +02:00
Anna.Kozlova 3332a677a6 allow functional interfaces in conditionals inside assignment or invocation contexts only 2016-10-04 18:45:14 +02:00
Andrey Starovoyt 2e7d6eb8af java: expression context for array.stream postfix template IDEA-157975 2016-10-04 16:54:06 +03:00
Anna.Kozlova e3f966a2ed @SuppressWarning for foreach and try-with-resources parameters 2016-10-04 11:07:24 +02:00
Tagir Valeev a53a0f3d61 StreamAPI migration: limited sorting support 2016-10-04 15:55:00 +07:00
Tagir Valeev 10c8616d19 StreamAPI migration: propose to use any/all/noneMatch if next return is not true/false (using || or &&) 2016-10-04 15:32:19 +07:00
Tagir Valeev 6723bcc1ea ExpressionUtils#getAssignment now returns simple assignments only (not compound assignments) 2016-10-04 14:16:08 +07:00
Tagir Valeev c6cf323132 ControlFlowUtils#statementBreaksLoop; StreamApiMigrationInspection#getInitializerUsageStatus simplified 2016-10-04 09:49:28 +07:00
Tagir Valeev 3c07adbe09 Stream API migration: replace with findFirst().ifPresent() chain 2016-10-03 12:43:45 +07:00
Tagir Valeev b53646340b Stream API migration: support nested anyMatch 2016-10-03 12:43:44 +07:00
Tagir Valeev df36bfcf5f IDEA-CR-14049 missing getType() added; support array initializers in Optional map 2016-09-30 16:53:43 +07:00
Tagir Valeev 355973cb56 IDEA-CR-13980: comments handling is simplified (they just extracted and placed before the condition) 2016-09-30 16:32:25 +07:00
Tagir Valeev 738994f1c0 IDEA-161925 Stream API migration: support toArray conversion, fixed mapping to initialized array, fixed final variable status, clean up in RefactoringUtil 2016-09-30 16:12:57 +07:00
Anna.Kozlova e052fabb42 conditional: ensure to convert type from parent to ll >= 1.8 so assignments would be correct, etc (IDEA-161854) 2016-09-30 09:33:28 +02:00
Tagir Valeev 7cb4480fd1 StreamApiMigrationInspection: references to non-final variables in intermediate operations were incorrectly handled sometimes 2016-09-30 10:23:12 +07:00
Tagir Valeev 5cbf3d5a9b StreamApiMigrationInspection: correctly handle anonymous classes/lambdas (IDEA-CR-14138) 2016-09-30 10:04:58 +07:00
peter 53867e057f IDEA-161862 Lambda Expressions not showing as implementations of an interface 2016-09-29 11:31:20 +02:00
Tagir Valeev b9a06d65b9 IDEA-161861 Stream API migration should handle cases where result variable is not declared just before the for loop 2016-09-29 15:54:08 +07:00