Commit Graph

104 Commits

Author SHA1 Message Date
Tagir Valeev f801cdb18f Do not split try when expression is in the first resource without catch/finally
It's unnecessary and otherwise try-block is automatically unwrapped
(see com.intellij.psi.impl.source.tree.java.PsiTryStatementImpl.deleteChildInternal) causing EA-235365 - PIEAE: LazyParseablePsiElement.getContainingFile

GitOrigin-RevId: 4ea3e54f8ea27854e23537a8de22f2923feaf842
2020-07-20 05:04:11 +00:00
Tagir Valeev 056c5c57f5 Testdata fixed after CodeBlockSurrounder update
GitOrigin-RevId: 52503300404d69cbc12239080e745d53ba5c450b
2020-07-08 11:00:38 +00:00
Tagir Valeev ada7cbea8b TerminalOperation: support parentheses in downstream collectors
GitOrigin-RevId: e3c63a4672b1527d57c0403d837cba453333c8cd
2020-02-11 10:36:25 +00:00
Tagir Valeev 3806f7df31 Redundant files removed (left after merging several tests together)
GitOrigin-RevId: 15755e36cbdfefdf493ce28c9b2155e7b2daa7d6
2019-10-14 11:04:47 +00:00
Rustam Vishnyakov 123242c4b2 EditorConfig documentation test
GitOrigin-RevId: fd52ace3d7a32ecd02c2c5ab90e077967604c15e
2019-06-16 04:03:21 +03:00
Egor Zhdan c1813cfb52 Cleanup: NotNull/Nullable
GitOrigin-RevId: b8e892f32ea84c2115973155dba7127b892cc36e
2019-06-16 04:02:08 +03:00
Anna Kozlova 91f7445298 constructor reference: don't ignore constructor parameters during method reference inference (IDEA-185578)
GitOrigin-RevId: e836468e05db28157713e9edd3c70382f8ecdebc
2019-06-13 03:15:49 +03:00
Egor Zhdan 39d2d77155 Cleanup: NotNull/Nullable
GitOrigin-RevId: b8e892f32ea84c2115973155dba7127b892cc36e
2019-06-13 03:14:35 +03:00
Tagir Valeev c5617ef120 SourceOperation: avoid copying final field to bound variable
GitOrigin-RevId: fd750ded28fac7a89e41c22610298fe9a23cc25b
2019-05-29 11:09:30 +03:00
Aleksey Pivovarov 322db66a12 Recover after problematic merge
This commit reverts 65a557bb38f6ac03afa9aabaf02cb8d99fc68a91
                    3f5cfd958d9b6b54393c15983ac94f519c37fe61

GitOrigin-RevId: 8fb8ccbb17d0e217a83f265c185a943b0f5a7ed6
2019-05-03 01:52:21 +03:00
Nicolay Mitropolsky 9b850726ee [uast-groovy] UInjectionHost support
GitOrigin-RevId: 49ec454d1831796fa63b77fdc965f61985bf877e
2019-05-03 01:47:46 +03:00
Vladimir Plyashkun c33e69a545 CPP-16098 - Lags during inplace rename typing
- reverted some of the changes

GitOrigin-RevId: c7c07b80a76c29794ef31e0e916e62f7f302917a
2019-05-03 01:47:14 +03:00
Leonid Bushuev 34be4bbf7d Apply the change from Develar: cleanup - specify UTF_8 charset explicitly
GitOrigin-RevId: 3f5cfd958d9b6b54393c15983ac94f519c37fe61
2019-05-03 01:46:11 +03:00
Vladimir Plyashkun 61a3e18b78 Merge branch 'master' into vplyashkun/inplace_rename_lags
GitOrigin-RevId: aaecc2a32e4e42de827efb45b8df733874a722e4
2019-05-03 01:41:29 +03:00
Leonid Bushuev 970dc0fe32 Remove unnecessary downcasting
GitOrigin-RevId: b91110977db6e5b08d9f4aaffa8496d305d698e2
2019-05-03 01:40:23 +03:00
Vladimir Plyashkun 2d9369d983 CPP-16098 - Lags during inplace rename typing
- changed behaviour in safe way by introducing new method to check that particular expression does not depend
  on committed PSI

GitOrigin-RevId: f5ec732613cdafdcef8a1d48eb8d04135c634047
2019-05-03 01:39:50 +03:00
Leonid Bushuev 338ad6db56 SQL code style per dialect: UI: fix indent editor
GitOrigin-RevId: 3cb00f5c500523717c42f404b2f38fd1822d6db0
2019-05-03 01:39:18 +03:00
Vladimir Plyashkun e3ca319824 CPP-16098 - Lags during inplace rename typing
- call `commitDocument` explicitly in cases when `calculateQuickResult` can redirect it's calculation to heavy `calculateResult`

GitOrigin-RevId: 41f0c47c57f4528d7d7a25208024ec28bb8c2e12
2019-05-03 01:38:12 +03:00
Leonid Bushuev dc1a52762e SQL code style per dialect: UI
GitOrigin-RevId: 9b1b3e745d4c8acef5a4a1018714e004e5423519
2019-05-03 01:37:38 +03:00
Vladimir Plyashkun d712ac9901 CPP-16098 - Lags during inplace rename typing
- removed `commitDocument` call when `isQuick` argument is passed
- pass `element` or `null` to `equalsToText` call (since there is not real need to take it for text comparison)

GitOrigin-RevId: 27c5e1a2f484fc56d41dfd210832ae94c9a9b7ab
2019-05-03 01:37:04 +03:00
Leonid Bushuev 9f35a30458 SQL code style per dialect: UI
GitOrigin-RevId: 72cca4d6a23a5e2aa2089c03932ab2e9d08bfa48
2019-05-03 01:36:24 +03:00
Tagir Valeev 9af3284048 StreamToLoopInspection: simplify getEffectiveQualifier usage; support unqualified Iterable.forEach, Map.forEach
Review ID: IDEA-CR-46452

GitOrigin-RevId: 7622f0f1274d9f23bfaef88096b3eedd2b4d18a6
2019-04-28 14:53:13 +03:00
Tagir Valeev e13567df50 Better comment handling in ternary->if conversion & stream-to-loop 2019-04-19 11:45:55 +07:00
Tagir Valeev 9e1982a819 ExpressionUtils#getQualifierOrThis -> getEffectiveQualifier, nullable now (cannot construct this expression for outer anonymous class)
Fixes EA-140652 - assert: JavaParserUtil.parseFragment
2019-04-18 13:04:43 +07:00
Tagir Valeev 8545659a0a StreamToLoop test: ternary in return is supported now 2018-11-11 18:05:27 +07:00
Tagir Valeev eda6bb3c28 FunctionHelper#registerReusedElements: pass qualifier only
Because ::xyz part is not actually reused, comments from there are not preserved.
2018-11-08 17:30:50 +07:00
Tagir Valeev e79ea86e18 EnsureCodeBlock: support or-chains in return/lambdas 2018-10-18 19:21:37 +07:00
Tagir Valeev f12b4848c6 RefactoringUtil#ensureCodeBlock: support &&-chains in returns/lambdas (IDEA-199811)
Also implementation extracted to package-private class
2018-10-03 13:46:47 +07:00
Tagir Valeev 46ffa7b2cc Testdata fixed 2018-10-03 10:55:33 +07:00
Tagir Valeev 49e8a5a7ff IDEA-199811 RefactoringUtil#ensureCodeBlock: support while conditions; support && chains in if-then and while 2018-10-02 16:36:15 +07:00
Tagir Valeev 85f0872d9b StreamToLoop: support parentheses inside flatMap 2018-09-19 12:26:21 +07:00
Tagir Valeev b7688efea7 TerminalOperation: check arguments count for "collectingAndThen" collector.
Fixes EA-127467 - AIOOBE: TerminalOperation.fromCollector
2018-09-17 09:30:59 +07:00
Tagir Valeev 1e73838ca1 StreamToLoop: disallow peek which cannot finish normally as the result will not be compilable 2018-09-07 17:02:26 +07:00
Tagir Valeev 0ee4ea1fad IDEA-195573 groupingBy test 2018-07-29 09:25:38 +07:00
Tagir Valeev 9d96fb9a63 IDEA-195573 Support collectingAndThen in Stream-to-loop (for now only if downstream is collection-based) 2018-07-29 09:14:48 +07:00
Tagir Valeev a6643bdab2 StreamToLoopInspection: handle labeled expression statement (found by property testing) 2018-07-27 13:09:38 +07:00
Tagir Valeev 1325835ce7 StreamToLoop: support parenthesized collectors 2018-07-06 13:58:52 +07:00
Tagir Valeev 2217968c28 StreamToLoop: support functions in parentheses 2018-07-06 13:58:36 +07:00
Tagir Valeev 49a1e9e78a afterCommentInBlock: space restored (IDEA-CR-34134) 2018-06-26 15:46:35 +07:00
Tagir Valeev 1a38128af4 StreamToLoop: do not trim trailing whitespace for block lambdas
Fixes trailing line comment handling
2018-06-26 12:36:58 +07:00
Roman.Ivanov 5076e08145 set SPACE_BEFORE_COLON_IN_FOREACH true by default, fix tests 2018-06-26 12:04:00 +07:00
Roman.Ivanov ae37e14386 fix foreach formatting in tests 2018-06-05 11:58:44 +07:00
Roman.Ivanov 5858ba478c fix tests for foreach formatting 2018-06-05 11:31:17 +07:00
Tagir Valeev c76d9aba62 StreamToLoopInspection: support Map.forEach()
Fixes IDEA-190440 Convert usage of java.util.Map.forEach() to for (... entrySet()) loop
2018-04-19 12:12:40 +07:00
Tagir Valeev c1f2c5c380 StreamToLoop: special handling of max().orElse(MIN_VALUE), etc. 2018-03-12 15:24:01 +07:00
Tagir Valeev ebbdbbe432 StreamToLoop: special handling of skip(1) 2018-03-12 15:24:00 +07:00
Tagir Valeev 0da4fd17f3 IDEA-187214 Stream to loop inspection: support Java 10 toUnmodifiableList/Set/Map 2018-02-27 10:57:08 +07:00
Tagir Valeev d5f9284f2e ExpressionUtils#isSimpleExpression: disable for non-final fields 2018-02-05 15:53:39 +07:00
Tagir Valeev d7f09f6cdd StreamToLoop: support array slice (Arrays.stream(arr, from, to)) 2017-09-18 17:30:53 +07:00
Tagir Valeev 6e87cb9bfd RefactoringUtil#ensureCodeBlock enhanced and used in Surround with try-catch
Fixes IDEA-178781 "Surround with try-catch" QuickFix for "Unhandled exception" in a field initializer
Enables stream-to-loop in field initializer
Fixes stream-to-loop in for initializer
Disables stream-to-loop in for update
2017-09-12 13:34:43 +07:00