Commit Graph

51 Commits

Author SHA1 Message Date
Mikhail Pyltsin
4bc43b46f4 [java-highlighting] IDEA-323955 Record patterns support available only for Java 20 preview. Fix compiler errors and tests
GitOrigin-RevId: 5f856519e56e61818e95cf63766fb6a54c6283ad
2023-07-05 12:09:22 +00:00
Mikhail Pyltsin
4882e88dbf [java] support comparing when method is a first operand
GitOrigin-RevId: 64895b894c8dee5c178bfb336a4f2f30872a13c4
2023-04-13 13:06:16 +00:00
Tagir Valeev
5ab495db61 [java-intention] Intersection type test for IDEA-314907
GitOrigin-RevId: 90316415e2fff0e298ee2026f1e21f278c896c0d
2023-03-21 17:24:02 +00:00
Tagir Valeev
31990e349d [java-intention] More tests for IDEA-314907
GitOrigin-RevId: 2ca51ee0d02ff7d36cd59efb8ce6b81af2372ea7
2023-03-20 17:26:01 +00:00
Tagir Valeev
fb57f4c33f [java-intention] When creating a new method, declare it with fresh generic type to allow more flexible inference
Fixes IDEA-314907 code generation: return type not recognized by idea when it is a generic type

GitOrigin-RevId: 878d6f9d48315fdadb499a65dc8cfe5db57234d7
2023-03-18 08:10:31 +00:00
Andrey Cherkasov
4bbd7cf012 Predict boolean type for 'when' expression of switch pattern
IDEA-274106

GitOrigin-RevId: 3f41806bc5eceea7efa2c10bc149f231b4d42262
2022-11-07 03:40:28 +00:00
Bart van Helvert
8780aa8862 [java-intentions] Improve create property from usage preview
GitOrigin-RevId: 6e9389c6d8b88bfa91de6c658cfc51039bfeefca
2022-11-02 12:49:31 +00:00
Bart van Helvert
e5fd0db64d [java-intentions] Improve create method preview
GitOrigin-RevId: 9121bbda07694cdacab3508a83a08ba10e465d28
2022-11-02 12:49:28 +00:00
Anna Kozlova
4bb02e9e68 create from usage: don't go through polyadic to deep (IDEA-244730)
GitOrigin-RevId: f7ab010a75203486f0c967ae5ba7c69db81ad812
2020-07-10 09:53:37 +00:00
Tagir Valeev
7315560413 Fixes according to review IDEA-CR-1967
GitOrigin-RevId: 291843a9ecd55948c4f94844aec63c6057d1cb40
2020-07-02 04:37:52 +00:00
Tagir Valeev
2d1a6a067b GenericsUtil#simplifyExtendsFinalClass (IDEA-24201)
GitOrigin-RevId: 758c1e9c3be3c016093d84bf0617ef0b030161b1
2020-06-26 07:29:05 +03:00
Anna.Kozlova
f2b9476d0f disable create method from usage/change signature based on void argument (IDEA-205710) 2019-01-31 18:22:13 +01:00
Daniil Ovchinnikov
0ebd593531 [java] static modifier of created method should depend on containing class (IDEA-203737) 2018-12-12 13:26:00 +03:00
Daniil Ovchinnikov
e110fd2ee7 [java] don't group "Create from usage" fixes in tests 2018-12-12 13:25:59 +03:00
Anna.Kozlova
5cec08212e create method from usage: guess return types by context of the same method calls (IDEA-199042) 2018-09-19 13:56:49 +02:00
Daniil Ovchinnikov
47bedfb488 [jvm-lang] java: return if no method is found after reformat IDEA-188113 2018-03-12 21:40:30 +03:00
Daniil Ovchinnikov
872ddb5d0e [jvm-lang] rename create getter/setter actions
- _Create Getter_ -> _Create read-only property 'foo' in 'Bar'_
- _Create Setter_ -> _Create write-only property 'foo' in 'Bar'_

Action names are now consistent with _Create property 'foo' in 'Bar'_.
2018-02-15 16:00:36 +03:00
Daniil Ovchinnikov
544ee7980f [jvm-lang] java: port _Create getter/setter from usage_ actions
- extract PropertyRenderer for reusing;
- make them work with type parameter guesser.
2018-02-13 01:15:09 +03:00
Daniil Ovchinnikov
3151924a52 [jvm-lang] java: don't create private abstract methods (IDEA-186499) 2018-02-12 19:25:20 +03:00
Daniil Ovchinnikov
6e0f6897c9 [jvm-lang] group 'Create method' and 'Create field' actions 2018-02-02 17:07:57 +03:00
Daniil Ovchinnikov
e08521fb91 [jvm-lang] update Java-to-Java Create Method from usage tests 2017-09-06 21:24:13 +03:00
Daniil Ovchinnikov
87fa214435 [java] add tests for "Create abstract method" 2017-09-06 19:02:21 +03:00
Anna Kozlova
e747d52bf5 create method from usage: treat polyadic expressions as for completion by containing expression (IDEA-151432) 2017-05-18 13:25:30 +03:00
Anna Kozlova
94dd554c0c don't use void in non-free method calls (IDEA-172958) 2017-05-16 21:33:01 +03:00
Anna.Kozlova
c482c21b29 create from usage: ensure type parameters are extracted from wildcards (IDEA-169857) 2017-03-20 11:45:14 +01:00
Anna Kozlova
93fa3ed8c8 expected type by prefix expression should be calculated by parent (IDEA-166819) 2017-01-20 12:58:32 +03:00
Tagir Valeev
eaff2cebb6 fix invalid negative tests for quick-fixes 2016-10-10 18:24:14 +07:00
Anna Kozlova
d7f768366b fix testdata 2015-11-02 15:29:42 +01:00
Anna Kozlova
5d98d49ecf ensure denotable types 2015-10-28 16:05:05 +01:00
Andrey Starovoyt
b20fc1c936 live templates: incorrect adding generic parameter IDEA-134434 2014-12-23 18:18:43 +03:00
Dmitry Avdeev
466b4e442b Create from usage: sentence capitalization 2014-12-06 12:06:31 +03:00
Anna Kozlova
91f505e2f7 create static method from usage in interface (IDEA-127563) 2014-07-21 19:19:14 +02:00
Anna Kozlova
fcd50614bb name suggestions for static non-final fields should escape _ (IDEA-123441) 2014-04-04 17:55:26 +02:00
anna
be9e2fa9f7 testdata fixed 2013-05-06 20:55:21 +02:00
anna
299e587bc4 create from usage: do not suggest to create static methods in interfaces (IDEA-98147) 2012-12-28 15:32:08 +01:00
anna
9a237f0b59 test data fixed 2012-09-27 12:25:59 +02:00
anna
d1fbf297bc method ref: isAssignable check; resolve (initial) 2012-09-25 19:47:04 +02:00
anna
d2af36382c method ref: create method from usages accept method ref in argument 2012-09-25 19:47:00 +02:00
Anna Kozlova
1bdca6d4e5 create method from usage: do not qualify already qualified ref (IDEA-91041) 2012-09-11 17:34:00 +04:00
Anna Kozlova
f324594bc3 lambda: create method from usage with lambda arg (IDEA-90957) 2012-09-03 18:27:56 +04:00
anna
f3f98b6f54 create property:both getter nad setter from usage (IDEA-73186); return cursor to the initial state 2012-07-12 21:01:39 +02:00
anna
d18b86df35 create method from usage: create type params for static methods created in generics classes as class type params won't be accessible (IDEA-87688) 2012-07-05 16:13:21 +02:00
anna
433f988b40 create from usage: extract used type params from deep levels (IDEA-87564) 2012-07-04 19:47:43 +02:00
Maxim.Medvedev
764a7bd65c copyright in testdata 2012-05-16 12:26:08 +04:00
Maxim.Medvedev
e5b412d4c3 'create groovy method from usage' position caret at the beginning of selection 2012-05-16 10:45:35 +04:00
anna
4814482749 insert template: do not handle [] twice (IDEA-69106)
(cherry picked from commit 2b98c3ab3529a3b1a0f34a3e3e4f62d393ce4d61)
2011-05-03 17:34:34 +02:00
anna
61f2714f06 create method from usage: allow to reuse parent class type args (IDEA-64683) 2011-02-10 17:21:59 +01:00
anna
edc0799f69 create method from usage: create method type params if needed (IDEA-55505) 2010-11-12 19:43:54 +03:00
anna
db9fc5a09b assert statement: description should be of string type (IDEA-58067) 2010-08-27 20:19:49 +04:00
anna
5c430dd73a create getter from usage: return type fixed when field with name already exist 2010-07-26 11:56:35 +04:00