Commit Graph

113 Commits

Author SHA1 Message Date
Tagir Valeev
ad40c945e2 [java-inspections] More quickfixes to ModCommand
GitOrigin-RevId: ccc6093d680712cb81c1325d997fb2771b61a0be
2023-06-25 19:05:51 +00:00
Tagir Valeev
4c29ff02f6 [java-inspections] TrivialFunctionalExpressionUsageInspection: solve naming conflicts instead of keeping the block
Keeping the block does not work correctly for blocks with return statement

GitOrigin-RevId: d14e22e793840d74957928a8d7748275db4929ef
2023-04-24 11:48:09 +00:00
Tagir Valeev
78c8e66901 [java-inspection] Support multi-line single-return lambdas in StreamToLoopInspection
Part of IDEABKL-7718
Fixes IDEA-317735

GitOrigin-RevId: 120245c2b1f4abb464d52c43dd39078a83f4bbcd
2023-04-17 10:53:11 +00:00
Bas Leijdekkers
9a44d02318 Java: better name suggestions for boxed types, filter out common bad names and add special cases for common methods
GitOrigin-RevId: 2bf3977d2873bd133ac6acb85df54aece740f428
2023-02-14 13:53:56 +00:00
Bas Leijdekkers
185db7d9f0 Java: enable "Past participle variants suggested when introducing variables" by default
GitOrigin-RevId: 5ca40786a583fecc4313330ca633c0075126a567
2023-02-11 00:15:28 +00:00
Bas Leijdekkers
3c556d8fe0 Java: ignore "as" and "to" prefixes to generate better variable names (IJP-1469)
GitOrigin-RevId: 12cde9892bece40321b4655e7d32b75bd43748e8
2023-01-26 00:04:15 +00:00
Tagir Valeev
7e1064ea3c [java-intentions] More preview tests; minor fixes
GitOrigin-RevId: 22a46c15d8900d8a31514846755a013f6a67ad42
2022-07-29 17:55:13 +00:00
Tagir Valeev
f2e0304c8d [java-inspections] IDEA-284183 "Replace 'forEach' call with loop" generates red code in case of wildcards with Map
GitOrigin-RevId: 77f0fc7d530aed988653aa726be1244c9a3941f9
2021-12-20 07:01:16 +00:00
Tagir Valeev
d35974faf8 [java-inspections] IDEA-255926 Support streams generated by StreamSupport StreamToLoopInspection
Only for non-parallel streams

GitOrigin-RevId: 08b517f557f0c376cc504ac654a9353a66ae9014
2020-11-24 04:36:33 +00:00
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