Commit Graph
79 Commits
Author SHA1 Message Date
Anna.Kozlova 596b751e24 introduce variable: prefer expr type to expected when possible(IDEA-175248) 2017-07-03 16:53:16 +02:00
Anna.Kozlova 026d0b10eb introduce variable in local class results to introduced field (IDEA-175213) 2017-06-30 18:07:25 +02:00
Anna Kozlova 494a9af18a allow extract variable after expr statement (IDEA-173708) 2017-06-28 16:10:44 +02:00
Anna Kozlova 52b2493e19 introduce variable: allow extraction to field, etc (IDEA-CR-21940) 2017-06-16 19:14:28 +03:00
Anna Kozlova fb3295db37 introduce variable/occurrences: allow to walk up through anonymous
the current behavior is not transitive as occurrences inside anonymous when selected outside were detected (IDEA-174339)
2017-06-15 13:52:55 +03:00
Anna.Kozlova fd89b0ed18 introduce variable: distinguish lambda parameters but allow param free expressions (IDEA-163785) 2016-11-10 17:47:28 +01:00
Anna.Kozlova 8a276d0bf4 introduce variable: allow introduction of expression from inside for loop if independent from loop vars (IDEA-162911) 2016-10-21 14:52:31 +02:00
Anna Kozlova b5e8d2c9dd introduce variable: allow to search in lambda parent scope for occurrences as occurrences in loops or branches are suggested this way and searching from the top scope finds occurrences in lambdas as well (IDEA-159368) 2016-08-12 09:21:55 +03:00
Anna.Kozlova ad86a5171d introduce variable: suggest upper bound of captured wildcard 2016-07-20 20:42:49 +02:00
Anna Kozlova 2d142cdfd7 discard converting from string to primitive during extract refactorings (IDEA-157549; IDEA-157987) 2016-06-29 16:18:27 +03:00
Anna Kozlova 7968b2bbbb apply capture conversion for captured wildcard bound according to the direct supertype of parameterized type specification (IDEA-157586) 2016-06-22 15:24:15 +03:00
Anna.Kozlova 44a7f43a10 introduce variable: remove redundant type cast (IDEA-153665) 2016-04-29 14:41:28 +02:00
Anna.Kozlova 0100d6fab5 allow variable introduction inside lambda chain with expression -> block lambda conversion 2016-04-14 16:26:10 +02:00
Anna.Kozlova 1545f58d8d make type denotable: ensure that array type is not created over wildcard 2016-03-17 18:04:01 +01:00
Anna Kozlova a19f41e6c6 extract: collect classes to search for available methods from intersections/captures, etc (IDEA-57404) 2015-12-28 10:27:00 +01:00
Anna Kozlova 6fe7ef3c12 extract: don't reject super types based on calling of final methods - they could be called on inheritors without problems (IDEA-149121) 2015-12-28 10:27:00 +01:00
Anna Kozlova 05b90b10a3 introduce: shrink selection to exclude whitespaces and comments (IDEA-149120) 2015-12-28 10:27:00 +01:00
Anna Kozlova 9697949fe1 make variable type A<? super B&C> denotable (IDEA-57518; IDEA-57273) 2015-12-09 22:03:56 +01:00
Anna Kozlova dd38082794 least upper bound: pull unbounded wildcard up so types Number & Comparable<? extends Number & Comparable<?>> are produced instead of Number & Comparable<? extends Comparable<?>>
inferred type in bounds check cleanup: accept that inference result is not within its bounds and give the inference the second chance
2015-12-09 11:25:11 +01:00
Anna Kozlova c45f4e0aa0 fix testdata 2015-11-23 11:26:34 +01:00
Anna Kozlova 583b5af087 introduce variable: remove reference to created variable if declaration was inserted inside loop body (IDEA-146842) 2015-10-27 19:35:17 +01:00
Anna Kozlova 0b63f8295c introduce variable: ensure extracted variable from multiple occurrences put inside lambda body (IDEA-146250) 2015-10-12 15:08:23 +02:00
Anna Kozlova 21fd57c89f expected variable type: make type denotable (IDEA-136958) 2015-03-25 20:04:56 +01:00
Anna Kozlova 9b4cacf341 functional interface suggester: check return types and try to infer 2014-12-12 19:28:55 +01:00
Anna Kozlova e767382757 functional interface suggester: accept non exact method references 2014-12-11 17:20:11 +01:00
Anna Kozlova a23fdf8c97 introduce variable: exclude classes with not acceptable @since tag from suggestion 2014-12-10 16:05:55 +01:00
Anna Kozlova 57a097f90c introduce variable: common api (IDEA-94609; IDEA-125286; IDEA-131965; IDEA-131930) 2014-11-17 12:11:35 +01:00
Anna Kozlova 0ca896928f infer generic functional types by lambda's formal parameters and exact method refs 2014-11-03 19:13:05 +01:00
Anna Kozlova e887542c3e suggest correctly shaped functional types if extracting functional expression without context: initial (IDEA-125510) 2014-11-03 15:08:48 +01:00
Anna Kozlova a6e35cfd57 calculate void/value lambda compatibility based on valid, non-modified lambda expression 2014-10-27 15:40:01 +01:00
Anna Kozlova a56e52d868 put new variable inside lambda body: check lambda-related types only after lambda body is fixed (EA-62133 - IOE: PsiJavaParserFacadeImpl.createStatementFromText) 2014-10-24 18:36:22 +02:00
Anna Kozlova 3881c4a953 shorten refs in new expression (IDEA-129602)
(cherry picked from commit 616e3a99b68439b3e867052aa251e6084a639d77)
2014-10-17 21:04:52 +02:00
Anna Kozlova fe7b903e50 testdata fixed 2014-04-01 17:29:11 +02:00
Roman Shevchenko b9b76dca15 java: type annotations 2014-03-04 10:53:04 +01:00
Roman Shevchenko aea523f98a Cleanup (deprecated code; formatting) 2014-02-26 17:56:06 +01:00
Anna Kozlova cf00d70317 delete old inference strategy for java 8 2014-02-21 18:55:56 +01:00
anna 2e24dd4343 testdata for IDEA-115210 2013-12-05 17:14:35 +01:00
anna d1985af4a7 disable introduce variable from part of literal expression which is not a string 2013-12-05 10:20:57 +01:00
anna 2b49ac9eb4 introduce variable inside lambda: do not step out of lambda block 2013-11-29 21:12:28 +01:00
anna 19ac5df6f2 IDEA-117252 Extract variable bug 2013-11-29 18:24:22 +01:00
anna 4b36fa12fa introduce variable: forbid to replace write occurrences which occur after read; insert declaration after write usage (IDEA-117204) 2013-11-28 20:21:41 +01:00
anna 8e189439ca test for IDEA-105455 2013-04-16 14:58:55 +02:00
anna baa13dac16 introduce variable: suggest method reference expression (IDEA-102852) 2013-03-11 14:53:34 +01:00
Anna Kozlova f4d9788a79 copy flag to reformat when de-qualify 2013-01-21 16:46:23 +04:00
anna 7da45fd74f introduce variable: normalize declaration when necessary (IDEA-94494) 2012-11-08 20:58:56 +01:00
anna 6e0e9009df method ref: hide spaces around dbl colon by default 2012-09-27 12:26:00 +02:00
anna 9c4f5ddb11 method refs: test data fixed according to code style 2012-09-26 20:37:21 +02:00
anna 71eb8ec93e method ref: introduce method ref variable; accept method ref type separately 2012-09-25 19:47:03 +02:00
anna 6e2ed54422 expected types with prefix/postfix invalid expr fixed (EA-39226 - assert: ExpectedTypesProvider.createInfoImpl) 2012-09-19 12:08:49 +02:00
Anna Kozlova 614b14316b introduce variable from one line lambda transforms body to code block (IDEA-91122) 2012-09-06 19:17:11 +04:00