Commit Graph

69 Commits

Author SHA1 Message Date
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
be6a068d76 [java-refactoring] Better vararg handling in change signature
1. Properly handle non-vararg call sites
2. Update callsites when vararg type was changed to non-vararg or vice versa (without reordering, etc.)
Fixes IDEA-318626 Change signature incorrectly wraps/unwraps arguments when changing between varargs and arrays

GitOrigin-RevId: 3372a144be4363fef2c40e8968a07d8ed6b916a6
2023-04-28 09:47:08 +00:00
Andrey Cherkasov
9e8bae7d62 [resolve] Implement resolve for record patterns in for-each loops (IDEA-308746)
GitOrigin-RevId: 9ad6a7b00b10cf78a62166540135b569f69b727e
2022-12-26 13:39:21 +00:00
Andrey Cherkasov
3d2c425834 [java-refactorings] Change signature: parenthesized and record patterns can be deconstruction components
IDEA-303509

GitOrigin-RevId: abd79e52bd0160dc5d50f10e032a12d47f9f5b5a
2022-10-25 18:21:20 +00:00
Andrey.Cherkasov
cb15e5e392 [java-refactorings] The "Change record signature" refactoring should update patterns
IDEA-298724

GitOrigin-RevId: 37d9268274a074ccdcda3ce3a5c96b496c38b23e
2022-08-15 22:50:25 +00:00
Anna Kozlova
b41dcfd4c8 [java] change signature: ensure record components receive canonical types (IDEA-290735)
GitOrigin-RevId: 2e8fcd227d611c4575f7b7d63db54a22add14cfa
2022-03-22 13:43:12 +00:00
Anna Kozlova
724ed16f6f [java] replace default catch block template (IDEA-161593)
`throw e` won't fix the compilation error, comment - is not really better than empty catch block.

GitOrigin-RevId: ea002c332900b032392e766f3dd13fe3258ad49c
2022-01-14 20:39:23 +00:00
Roman Ivanov
6612867356 [java] fix test when formatting disabled: formatting enabled forcefully
GitOrigin-RevId: 7057f002ab5c6125d0051e72ea1d01f051203732
2021-12-28 12:13:39 +00:00
Roman Ivanov
d6f3b1ec85 [java] format javadoc after change signature
fixes IDEA-281568, IDEA-139879, IDEA-55288

GitOrigin-RevId: c0a83cf3288ee5c78ed8c53dd7bae73fc3de59dd
2021-12-13 13:30:47 +00:00
Anna Kozlova
9aa8d7ff80 [javadoc] do not add @param tag if no param tags were present before (IDEA-233885)
GitOrigin-RevId: 78226bdcf86b24dfa92358ae5240139b4dd199d7
2021-12-08 20:28:33 +00:00
Anna Kozlova
775f470ab2 [javadoc] do not add @return tag if it was missed but potentially applicable before (IDEA-231355)
GitOrigin-RevId: 052d2c2ac89d1e0872aa2b5da9a70c82cd2d9cac
2021-12-08 20:28:30 +00:00
Anna Kozlova
bf1ec8868c java change signature: don't warn if delete parameters in hierarchy (IDEA-254255)
GitOrigin-RevId: fd8b56048348b3220d360711acdb3585bb10747a
2020-11-02 17:28:52 +00:00
Tagir Valeev
90e778536b IDEA-230807 Change Signature refactoring inserts annotations for return type fully-qualified
GitOrigin-RevId: 97c3ae10bdcca6c2f9517e187691880516b71cbc
2020-04-02 04:03:25 +00:00
Tagir Valeev
cf8c8f4b88 Fix NPE when record header is missing (assume empty header)
EA-230210 - NPE: JavaChangeSignatureUsageProcessor.processPrimaryMethod

GitOrigin-RevId: 4df16311e5e94018ffbca8156116c0da7b979dfc
2020-03-31 05:04:05 +00:00
Tagir Valeev
218a25f776 LightTypeElement#getText: include annotations
Otherwise JavaChangeInfoImpl.fillOldParams thinks that old parameter type has no annotation, so if we removed an annotation, it's considered unchanged
Fixes IDEA-235090 "Change signature" action removing @NotNull does nothing

GitOrigin-RevId: 419990f23330090fc5bd8f92500328db7bd5e15b
2020-03-18 07:01:42 +00:00
Tagir Valeev
e08eb714bd IDEA-229843 Change signature refactoring for records
Known problems: when removing record component getter is not removed; getter/field usages are not reported

GitOrigin-RevId: 3babf3e316209232be416a28b52e77ab470fe2a3
2020-02-11 08:45:32 +00:00
Anna.Kozlova
f38dd8aee2 change signature: fix reorder & making varargs at one step (IDEA-153052) 2018-12-28 16:26:28 +01:00
Anna.Kozlova
df9d11e89d change signature: don't unwrap try-with-resources with non-empty resource list (IDEA-202731) 2018-11-23 11:30:45 +01:00
Anna.Kozlova
415a6deda3 change signature: update @return doc on return type change (IDEA-201405) 2018-11-13 18:37:38 +01:00
Tagir Valeev
16bfca9219 IDEA-192602 Convert @Contract annotation on Java method signature change 2018-05-24 17:55:44 +07:00
Anna Kozlova
227d80b202 ensure parameter list contains parenthesis (IDEA-187777)
lambda parameter list can have no parenthesis for the case when no explicit type is specified and one parameter is used. When next parameter is added or the one is deleted, parenthesis should be added
2018-03-07 08:02:42 +01:00
Anna.Kozlova
008710be3a change signature: detect javadoc for moved&renamed parameter (IDEA-175363) 2017-07-05 18:32:08 +02:00
Anna.Kozlova
36eee39712 change signature: add visibility conflicts in hierarchy (IDEA-84645)
make method '...': use change signature to perform modification in the hierarchy (IDEA-119015)
2017-06-30 19:54:36 +02:00
Anna.Kozlova
af59ff1487 change signature: move declarations out of try/catch block (IDEA-169213) 2017-03-07 14:57:35 +01:00
Anna.Kozlova
91291a4d94 change signature: call to super in class/field initializer
EA-93569 - IAE: MethodSignatureUtil.isSuperMethod
2017-01-05 19:01:34 +01:00
Anna.Kozlova
81e49151ff don't insert braces around single lambda parameter 2016-12-06 12:35:48 +01:00
Anna.Kozlova
12542833ff change signature: refresh type element after normalizeDeclaration for old style arrays 2016-11-15 18:11:31 +01:00
Anna Kozlova
fe7045debb change signature: conflict if deleted parameter is used in method body, excluding javadoc (IDEA-157603) 2016-06-30 21:02:38 +03:00
Anna Kozlova
4b1ff8c516 change signature: add warning if new signature duplicates method in overrider (IDEA-157659) 2016-06-30 21:02:38 +03:00
Anna Kozlova
41998a977e change signature: show conflicts if delegated method has same erasure as initial one (IDEA-157672) 2016-06-30 21:02:38 +03:00
Anna.Kozlova
2a9a2e6568 change signature: remove @Override if only overrider was changed (IDEA-154669) 2016-04-13 21:11:02 +02:00
Anna Kozlova
18e74c0b96 method reference -> lambda: remove redundant qualifier 2016-02-25 17:25:55 +01:00
Anna Kozlova
8e5d9f60af change signature: don't expand method reference if parameters/exceptions were not changed (IDEA-152116); support method rename through change signature 2016-02-24 21:05:13 +01:00
Anna Kozlova
aa00a3b1ba change signature: support changing signature of the method referenced by some method reference (IDEA-152114) 2016-02-24 21:05:13 +01:00
Anna Kozlova
3fd8dfd38c change signature: convert method reference to lambda if SAM method signature was changed (IDEA-150138) 2016-01-13 16:54:58 +01:00
Anna Kozlova
b56e7e0c20 change signature: propagate parameters change to lambda expressions (IDEA-150138) 2016-01-13 16:54:58 +01:00
Anna Kozlova
a6bd93a9c7 change signature: fix search for tags to remove in unsorted array (IDEA-147535) 2015-11-06 16:21:29 +01:00
Anna Kozlova
a69c1bc650 change signature AIOOBE 2015-10-14 11:12:27 +02:00
Anna Kozlova
51af5a6312 change signature: ensure propagation works for inheritors (IDEA-142350) 2015-07-08 20:37:17 +03:00
Yaroslav Lepenkin
9f82306ea5 Added possibility not to add FQN in javadocs if class was imported (IDEA-121121 ) [CR-IC-6907]
Now three options is available: use FQN always, never, or when not imported. Last is used by default.
Converted and moved boolean legacy setting from CommonCodeStyle settings into JavaCodeStyleSettings.
2014-12-02 12:14:01 +02:00
Anna Kozlova
8a80f671c2 leave foreign params untouched (IDEA-119700) 2014-05-26 18:07:52 +04:00
Roman Shevchenko
2805c474e3 IDEA-103174 (type annotations in change signature) 2014-03-13 14:13:10 +01:00
peter
fdee76603c IDEA-117332 Change signature refactoring should warn about @Contract conflict 2014-02-21 15:38:38 +01:00
Yaroslav Lepenkin
2bcd0fb291 IDEA-110654 Change Signature inserts unnecessary new line in comment block 2013-11-21 13:45:44 +04:00
Anna Kozlova
3069f9ae10 IDEA-111735 Change Signature refactoring should not insert generics types into javadoc 2013-08-09 17:36:45 +02:00
Anna Kozlova
b685972a85 change signature: highest visibility should not return PUBLIC all at once (IDEA-111739) 2013-08-09 14:21:27 +02:00
anna
ec8876bed5 change signature: propagate params fix (IDEA-110601) 2013-07-24 18:59:30 +02:00
anna
58e9f5ffd8 change signature: reorder params with javadoc without * (IDEA-110332) 2013-07-16 12:30:05 +02:00
anna
924523869c testdata fixed 2013-05-06 21:21:52 +02:00
anna
320f89f28c change signature: fix param name hides field (IDEA-98123) 2012-12-31 11:32:58 +01:00