187 Commits
Author SHA1 Message Date
Mikhail Pyltsin 36f87ac0b6 [java] IDEA-354964 Migrate standard descriptors like JAVA_21 to TYPE_USE annotations
- fix tests
- fixes to show external annotations

GitOrigin-RevId: 79cde38663de10c2985b72e76e98372fef214b20
2024-06-26 20:34:48 +00:00
Alexandr Suhinin 360db06c21 [extract method] fix the flaky parameter name suggestion
GitOrigin-RevId: 1f278179d51e1dac3cb2992a3ec85c98ac208b31
2024-05-10 11:27:40 +00:00
Tagir Valeev d0cf7b359a [java] IDEA-345498 Remove explicit Java 20-preview support and parenthesized patterns
GitOrigin-RevId: 8d646035979e3ec0a7de3c6f58a4e6ec9967bdbd
2024-02-12 19:12:36 +00:00
Tagir Valeev 77d1d0ab2e [java-tests] Mock JDK 21 (downloaded from the repository); remove in-place mocks where possible
Part of IDEA-334171 Store MockJDK in artifact repository, rather than in Git

GitOrigin-RevId: 9c6214e3ead47cc164d20813f5a2b37136607213
2023-10-06 10:48:24 +00:00
Bas Leijdekkers a4cb2b8f6f Java: fix extract method missing throws clause on string template and add test (IJ-CR-115108)
GitOrigin-RevId: 5fcbd8eb55a8f03f1db1ce67daa850964dae63a4
2023-09-21 14:33:12 +00:00
Bas Leijdekkers 34afca4ec6 [extract method] control flow analysis for string templates (IDEA-331198)
to generate correct code when extracting string templates to a new method

GitOrigin-RevId: e32aa33df1b5edd98aab34d424db2ad3e613f617
2023-09-14 14:07:30 +00:00
Andrey Cherkasov 2862275a4d Add tests for record patterns
IDEA-305353
IJ-CR-97932

GitOrigin-RevId: 79870444b594d9dd4330b9bafe2caa6f504852d5
2022-11-07 10:52:07 +00:00
Andrey Cherkasov d8964f84f4 Extract method produces uncompilable code when extracting expression contains record or parenthesized pattern
IDEA-305353

GitOrigin-RevId: 618b01c030d12bbda1d3d88fdce792b0201175a3
2022-11-07 03:40:22 +00:00
Anna Kozlova fa4d7ba5a7 extract method: disable in sub-selection of annotation
e.g. in package-info.java there is no default class to choose as target

GitOrigin-RevId: 578998ac49f4da01a7365523938e5983d1a639f4
2020-03-23 11:32:35 +00:00
Tagir Valeev 186596b687 IDEA-231427 Extract method produces incompilable code when extracting expression that produces a pattern variable
GitOrigin-RevId: 3fbd29e6543e21af934c4de8899bd6ed5bda6965
2020-01-27 06:33:15 +00:00
Tagir Valeev 52ba5a3e10 Test for extract method containing pattern variable (IDEA-229901)
GitOrigin-RevId: 34ca9d82a66a7c3c71420b94ca9cbcd2fff7be68
2020-01-23 04:07:21 +00:00
Roman.Ivanov b36a94855a ExtractMethodProcessor: fix NPE extracting method from empty parenthesis: EA-214509
GitOrigin-RevId: 5fc2d19d08efca879d6e8174d0a8500eb7803dc5
2019-11-07 02:40:58 +00:00
Anna Kozlova f2d460469a extract method: disable array access folding by default for cases where access is performed under condition
pessimistic approach for now: even if the condition consists of array access only; do not depend on the order of found references

GitOrigin-RevId: 0d111aad6b69729404183520d1f4d01cba583a1c
2019-10-11 21:02:34 +00:00
Anna Kozlova aaddf8b092 fix testdata
GitOrigin-RevId: 3cd25abbb1369435030b57bc5a4c4d4e7d7108e9
2019-10-10 20:32:38 +00:00
Anna Kozlova 795fe39b6b extract method with folding: more precise unique name check
do not depend on the order of found references when search for name conflicts

GitOrigin-RevId: 2b18f253bf28fbc9ae6423a0cc38336ef33fb7fa
2019-10-10 20:02:12 +00:00
Tagir Valeev f8106e2581 Disable Extract method on annotation values
Fixes EA-214400 - assert: ExtractMethodProcessor.chooseTargetClass

GitOrigin-RevId: 3e1a01f069288f50e8ed90be3595136b0eddbeea
2019-10-10 07:31:57 +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 c9f0692714 ExtractMethod: support disjunction type variables
Fixes EA-143189 - Incorrect parameter 'java.io.IOException | java.lang.RuntimeException e'

GitOrigin-RevId: 3bbdebaa6f7110e4d86eb36c34fea2f8e09ce351
2019-05-28 11:06:44 +03:00
Dmitry Avdeev 83f21c7197 Merge remote-tracking branch 'origin/master'
GitOrigin-RevId: 211e84dab4063848c1d3d835a526271ee1466636
2019-05-07 17:03:19 +03:00
Dmitry Avdeev f9664fc455 IDEA-211555 Freeze on completion in XML file
do not process xincludes in ExtensionDomExtender

GitOrigin-RevId: d631dcd52d5bf500b61960473e16237008ad02a3
2019-05-07 17:02:41 +03:00
Alexey Kudravtsev 5910039653 attach JDK Annotations automatically on JDK creation to fix IDEA-211771
GitOrigin-RevId: 975cffd646b68abb31a61eb6ac50de264c428cdc
2019-05-03 03:07:50 +03:00
Pavel Dolgov aa1b72ba7a Java: Fixed modifiers when extracting method from default or private method in interface (IDEA-211141) 2019-04-18 16:28:01 +03:00
Bas Leijdekkers 65fb327b93 fix NPE in Java Extract Method (IDEA-199784) 2019-03-14 17:59:35 +01:00
Pavel Dolgov 0d8a4fd924 Java: Slightly increased the limit for size of subexpression that can be an extracted method's parameter (IDEA-181195) 2019-02-12 14:26:37 +03:00
Pavel Dolgov 6923397466 Java: Ignore bare method expression (without parentheses) when matching potential parameters of extracted method (IDEA-194264) 2018-12-14 17:59:33 +03:00
Pavel Dolgov 3dd5d7513f Java: Reworked introducing the parameters in duplicate fragments to support repeated argument values (IDEA-201024) 2018-10-23 15:49:40 +03:00
Pavel Dolgov c4460f61de Java: Trim surrounding whitespaces because they don't survive in the refactoring - test data fixed (IDEA-191738) 2018-10-22 13:06:25 +03:00
Pavel Dolgov 46eee24571 Java: Trim surrounding whitespaces because they don't survive in the refactoring (IDEA-191738) 2018-10-19 15:18:34 +03:00
Pavel Dolgov 8f53696f2f Java: Don't specify visibility for extracted method declared in an interface (IDEA-196426) 2018-08-02 16:29:56 +03:00
Pavel Dolgov 75384424e8 Java: Fixed extracting exact duplicates when signature change is rejected (IDEA-196228) 2018-07-31 15:40:39 +03:00
Pavel Dolgov 3e7bc47796 Java: Don't fold the whole extracted expression - simplified the fix (IDEA-195927) 2018-07-23 16:44:10 +03:00
Pavel Dolgov c0f7044cd0 Java: Don't fold the whole extracted expression (IDEA-195927) 2018-07-23 15:40:29 +03:00
Pavel Dolgov ff958e1fdd Java: Preserve comments when extracting method with duplicates (IDEA-194463) 2018-07-09 13:13:03 +03:00
Pavel Dolgov ab72ea0a3f Java: Even if changing the signature is not accepted by the user, it's OK to replace exact duplicates (IDEA-194709) 2018-07-02 17:37:04 +03:00
Pavel Dolgov 9dce85a4fe Java: Don't cast the argument to generic type because we already know that the actual type is assignable to it (IDEA-171284) 2018-06-29 13:27:21 +03:00
Pavel Dolgov abb41a2607 Java: Fixed return type when duplicate code is replaced with a call to the extracted method (IDEA-160546) 2018-06-27 13:25:32 +03:00
Pavel Dolgov f9558cb91a Java: Handle references with different qualifiers when extracting duplicate code (IDEA-193287) 2018-06-05 16:56:44 +03:00
Pavel Dolgov ea0b3c7fa9 Java: Update variable nullability only when DFA is completed successfully (IDEA-188416) 2018-05-18 13:17:08 +03:00
Pavel Dolgov 6385a9311f Java: Don't suggest to extract the trivial method that returns its parameter (IDEA-191899) 2018-05-15 15:33:22 +03:00
Pavel Dolgov c3717c3abd Java: Handle similar parameters of multiple parametrized duplicates (IDEA-191738) 2018-05-14 15:16:50 +03:00
Pavel Dolgov 1f0ed3d0ea Java: Recognize multiple parametrized duplicates when extracting a method (IDEA-188243) 2018-05-10 12:59:45 +03:00
Pavel Dolgov 7510e91887 Java: Don't fold parameters of extracted method when there are duplicates that might use unfolded parameters (IDEA-189023) 2018-04-19 18:09:06 +03:00
Pavel Dolgov b7f3c967e9 Java: Fixed extracting method from duplicates containing reused variables (IDEA-188894) 2018-03-28 12:33:31 +03:00
Pavel Dolgov e4b477fc6e Java: Fixed extracting method from duplicates containing reused variables (IDEA-188894) 2018-03-28 12:33:31 +03:00
Pavel Dolgov e0b966650e Java: Fixed duplicate matching for complex expressions (IDEA-188127) 2018-03-14 18:21:30 +03:00
Tagir Valeev 43b86a988e CodeEditUtil#removeChildren: fixed nextLeaf determination
Before when removing more than one element, nextLeaf was invalid as well. The invalidation check below did not work as parent might still exist (element might be relinked to dummy file)

Fixes IDEA-187531 "Add on demand static import" with intervening comment and an empty line breaks code
2018-03-03 15:47:21 +07:00
Pavel Dolgov fc25d52296 Java: Include trailing comments into selected fragment when extracting method (IDEA-180172) 2017-12-05 16:15:51 +03:00