Commit Graph

436 Commits

Author SHA1 Message Date
Tagir Valeev
838cf2d73c [java-incomplete-model] Assume that any unresolved class-type is assignable to java.lang.Object
Partially improves inference in incomplete mode

GitOrigin-RevId: 1d9c7c75afd524ea02980be8f96c19fba1eaaf54
2024-06-25 13:54:11 +00:00
Tagir Valeev
a8788fa3b8 [java-highlighting] Do not try to resolve star-import if existing explicit import fails to resolve
Otherwise, wrong class may be resolved in incomplete project model
AnonymousHashCode.java changed, because java.lang.Object import was unresolved (no JDK configured) and we now refuse to resolve to same-package class if there's a suitable explicit import
beforeHierarchy.java/afterHierarchy.java changed, because the import was incorrect, and it prevented importing implicit java.lang.Exception
predicates2.java changed: incorrect import removed (now prevents importing java.lang.String)
MoveInnerProcessor changes: import refs should be rebound first; otherwise they disallow to rebind normal refs
SpringDataMongoDbQueryCompletionTest changed: erroneous import removed

GitOrigin-RevId: f380409c445306bb9b8aceb5fe4dce1351511283
2024-06-04 20:27:13 +00:00
Tagir Valeev
4228eb556f [java-refactoring] Cosmetic; use JavaFeatures
GitOrigin-RevId: 4a60e9012e90a77a7fd0c0c3bf73619e3f5c2c49
2024-03-16 12:47:07 +00:00
Yann Cébron
87a87cd16b [java] GuavaFluentIterableConversionRule: remove static init
GitOrigin-RevId: ea103e50f5bdd58fd51a588bedf87bd699710c74
2024-03-06 19:11:37 +00:00
Andrei.Kuznetsov
8539bcd407 IJPL-578 wait for indexes to be ready in tests after java language level change
GitOrigin-RevId: 89aa34d35c05284af90258b3208fb1198be8bc9e
2024-02-29 19:02:55 +00:00
Tagir Valeev
64327f79d6 [java-inspections] IDEA-346242 Add 'minimal java version' clause automatically to inspection descriptions, based on the required feature(s)
GitOrigin-RevId: 50a25148d4d36c46e9552b3123d1ef966b40a2c2
2024-02-15 15:28:00 +00:00
Tagir Valeev
ea2b70a2d1 [java] IDEA-345355 Refactor HighlightingFeature (in progress)
JavaFeature.EFFECTIVELY_FINAL

GitOrigin-RevId: d52ab73d7d24745b149b5a4704f1dee55e4179f0
2024-02-08 10:08:09 +00:00
Tagir Valeev
72890668ad [java] IDEA-345355 Refactor HighlightingFeature (in progress)
Rename STREAMS to STREAM_OPTIONAL; use features instead of isLanguageLevel8OrHigher

GitOrigin-RevId: 36f56560f6c7ca626a268d8b07da86497f2501a0
2024-02-08 10:08:04 +00:00
Tagir Valeev
340c4d40ba [java] IDEA-345355 Refactor HighlightingFeature (in progress)
JavaFeature.isAvailable moved to PsiUtil, as we cannot get PsiElement language level inside frontback-api module

GitOrigin-RevId: 8092b1f55f0d90af5bc570f2fb49cdf9ef94485a
2024-02-08 10:07:48 +00:00
Tagir Valeev
87c2a93f10 [java] IDEA-345355 Refactor HighlightingFeature (in progress)
Remove JavaFeature.isFeatureSupported() in favor of isAvailable()
Rename getLevel() into getMinimumLevel()
Avoid use of getMinimumLevel() where possible
Javadocs

GitOrigin-RevId: 4354821d8cfcf88cc1c3830b0e3cb3f221a5c122
2024-02-08 10:07:33 +00:00
Tagir Valeev
86d9d3a43e [java-refactoring] TypeMigration: migration rules for optional
GitOrigin-RevId: 5f7c1413476c7aea1b6282e86426e7ccf414c94b
2024-02-02 10:29:22 +00:00
Tagir Valeev
4e8623cb77 [java-refactoring] TypeMigrationTest: update to use latest JDK; cleanup and partially fix implementation
Tests T49 and T50 do not work with graph inference resolver. It looks like, the resolver was selected based on the JDK version, so updating JDK caused problems. For now, the problem is not solved.

GitOrigin-RevId: accb3a90954bdcb0d07953b9266216395a788855
2024-02-02 10:29:14 +00:00
Bas Leijdekkers
a9e8828ed9 Java: introduce VariableAccessUtils.getVariableReferences() convenience overload and use it
also adds javadoc

GitOrigin-RevId: b69dfea4b74880a67720c95d7a0695e69978bc24
2024-01-22 19:24:24 +00:00
Andrey Cherkasov
24adef8e2a Resolve warnings about 'protected' members in a 'final' classes
GitOrigin-RevId: 5d7c04b6371be1f2cc924a86614919ab6ee5b642
2023-12-14 17:36:45 +00:00
Andrey Cherkasov
019a6852f4 [java] Make extension classes final
GitOrigin-RevId: 1aae04982598568a111e8c78b9a71c9d2b4aa150
2023-12-13 20:02:09 +00:00
Aleksey Dobrynin
2968c44e55 Refactoring: use constants instead of strings
GitOrigin-RevId: a5132bfb7c7f57ac96c6f7b171447d783f2f9cdf
2023-11-28 17:29:28 +00:00
Tagir Valeev
3a999c1f58 [java] Disable Guava inspection by default
Likely, who wanted to migrate to Java 8 API, already migrated

GitOrigin-RevId: a124fb38121461b3131a8ebee19b63e97d5120e8
2023-10-12 16:48:37 +00:00
Georgii Ustinov
cbdda56f99 IDEA-332957 GuavaInspection false positive review refactor
GitOrigin-RevId: 32b819439b341b8b3170ae304304c339cfc9e753
2023-10-12 08:57:53 +00:00
Georgii Ustinov
7520f2516c Guava inspection predicate false positive #IDEA-332957 fixed
GitOrigin-RevId: aa2b1ab1baa9d97b42bb359eac5f30efd3f47ddb
2023-10-10 16:12:28 +00:00
Andrei Efanov
7fd8f8c401 refactor: introduce NotNull annotations to BaseElementAtCaretIntentionAction methods
GitOrigin-RevId: 20fde7acc6856d13b67d52d6b4841dfbc158e652
2023-08-22 17:10:53 +00:00
Bas Leijdekkers
78776e0ef8 Java Type Migration: care about precedence when casting and improve long literals (IJ-CR-107436)
GitOrigin-RevId: e4288f6aaf2c322b981f2eedfdd940abf7eb1c72
2023-06-06 10:01:07 +00:00
Bas Leijdekkers
bd06356746 Java Type Migration: fix boolean negation handling when converting to ThreadLocal (IJ-CR-107436)
GitOrigin-RevId: b543a7555da0229579b7512583e3cf306ffff6b7
2023-06-06 10:01:06 +00:00
Bas Leijdekkers
6a32849d22 Java Type Migration: avoid primitive wrapper when not necessary when converting to ThreadLocal (IJ-CR-107436)
GitOrigin-RevId: 6ec0ceecf3f84dbfc2a811c734f69ad956e774db
2023-06-06 10:01:05 +00:00
Bas Leijdekkers
361c110d24 Java Type Migration: remove piece of unnecessary code (IJ-CR-107436)
GitOrigin-RevId: a9bfd787f4ba943cead715bde601a7dc5ea26328
2023-06-06 10:01:04 +00:00
Bas Leijdekkers
e91500e822 Java: add cast when necessary in more places (IJ-CR-107436, IDEA-248610)
GitOrigin-RevId: 97431697ea4a59bb68a0d2309ad70d6bfe6e674f
2023-05-16 19:32:05 +00:00
Vladimir Krivosheev
227d75a1fc don't extend DynamicBundle
GitOrigin-RevId: 49cbebd629a92877dbeeffba8d97b0631fb9407e
2023-05-05 09:46:42 +00:00
Bas Leijdekkers
ee809ff4ba Java Type Migration: fix non-vararg call issue when migrating from vararg to array (IDEA-319141)
GitOrigin-RevId: 6df569696aad7c19f7f3226588124d585340dc5e
2023-05-04 10:20:21 +00:00
Bas Leijdekkers
087e06f05e Java Type Migration: do not propagate type changes when migrating to void (IDEA-159958)
GitOrigin-RevId: 39568be1be3f92b456b29b33086f85bbf6fa9878
2023-05-02 18:33:59 +00:00
Bas Leijdekkers
d6f1e6346b Java Type Migration: remove @return from JavaDoc when migrating to void (IDEA-159956)
GitOrigin-RevId: ec0c9d1c145df152c30bee4ad23191d1729c0641
2023-05-02 18:33:54 +00:00
Bas Leijdekkers
7abf301ded Java Type Migration: do not propagate migration to void (IDEA-159959)
GitOrigin-RevId: c32b7bbf7c7363844163089d0b19e81c89273ca2
2023-05-02 18:33:49 +00:00
Bas Leijdekkers
14390e675a Java Type Migration: avoid NPE when migrating enum type to something else (IDEA-225806)
GitOrigin-RevId: d71d68d9395c93d6346a247c7f207ae840e2fbad
2023-05-02 18:33:44 +00:00
Bas Leijdekkers
b856d0e423 Java Type Migration: support migrating from vararg to array type (IDEA-319141)
GitOrigin-RevId: 9eaf8b08ee75b816d90d4db76d3ee1e449e4d78c
2023-05-02 18:33:40 +00:00
Bas Leijdekkers
ed57b73a51 Java Type Migration: more advanced migration from non-array to array type and back (IDEA-319141)
GitOrigin-RevId: 78bb2d3f9ad9c26fbc65a79b23a896904ebd3523
2023-05-02 18:33:35 +00:00
Bas Leijdekkers
b716479a1c Java Type Migration: array -> vararg without problems (IDEA-319047)
GitOrigin-RevId: 0cc655e40ed1d6a74b79a56805389c72202f03b3
2023-04-27 10:21:54 +00:00
Bas Leijdekkers
8144ef9257 Java Type Migration: don't modify array creation when not needed (IDEA-319042)
GitOrigin-RevId: 495ce8f8abab0e57270492b64fe50a5a99382bd7
2023-04-27 10:21:53 +00:00
Bas Leijdekkers
63d0902a7f Java Type Migration: cleanup ThreadLocal conversion rule
GitOrigin-RevId: adb428623016a092b83a932ed66445fbd8400b27
2023-03-08 00:32:52 +00:00
Bas Leijdekkers
93a9db98dc Java Type Migration: add cast if necessary when converting to ThreadLocal (IDEA-248610)
GitOrigin-RevId: 15b83a4b1281356a007783e13d8a50e44870e6cf
2023-03-08 00:32:38 +00:00
Bas Leijdekkers
18c1ad1b54 Java Type Migration: enable intentions when the caret is after the last symbol of the variable identifier
GitOrigin-RevId: 2dc20b3b87c7cd2fa071485364e78462ba532f8c
2023-03-08 00:32:33 +00:00
Bas Leijdekkers
3005f89a02 Java Type Migration: reduce unnecessary visibility of methods
GitOrigin-RevId: 950e9850c0293e31f933e839bf25cbf127fa7a42
2023-03-08 00:32:30 +00:00
Bas Leijdekkers
b68439a0b3 Java: update intention description and example
GitOrigin-RevId: 22b8858e7c822bf1745ca644260703b5b2e7c599
2023-03-08 00:32:27 +00:00
Bas Leijdekkers
5b120de0b7 Java Type Migration: Fix "Convert to ThreadLocal" with subtypes (IDEA-230719)
GitOrigin-RevId: cfcfabbd08f1774900f15089d6fcf651756d743f
2023-03-08 00:32:24 +00:00
Bas Leijdekkers
a0e8b31187 Java Type Migration: warn on enum constant when the argument type can't be converted (IDEA-314701)
GitOrigin-RevId: c5f8a21262476077e456f6bf99c05622ba8c0006
2023-03-04 21:33:20 +00:00
Bas Leijdekkers
19cf134f75 Java Type Migration: sensible error message for failed vararg to non-vararg conversion (IDEA-314700)
GitOrigin-RevId: f7d1722c5a852fc130b1fb55eea6b5a3aaf65ec4
2023-03-04 21:33:17 +00:00
Bas Leijdekkers
570c1709b8 Java Type Migration: handle vararg parameters better (IDEA-310441)
GitOrigin-RevId: 9118f5554a59d78b38833e87cc8fb8c3b547fcbe
2023-03-01 18:05:52 +00:00
Bas Leijdekkers
92757b3b04 Java Type Migration: add warning for inconvertible foreach iterated value type
GitOrigin-RevId: eb2c676b7d13551a77a2ece84b235b9f0137646d
2023-03-01 18:05:49 +00:00
Bas Leijdekkers
d40c54bbd2 Java: do not change too much on migrating expression type used in compound string assignment (IDEA-310441)
GitOrigin-RevId: d0c2bb8d47427f266c1b87c36bccb8e500dea366
2023-03-01 18:05:46 +00:00
Bas Leijdekkers
886c37df33 Java: fix converting multi-dimensional arrays to atomic
GitOrigin-RevId: 43a811d589e04404cfe717e2b79e254be369ea23
2023-02-25 12:41:18 +00:00
Bas Leijdekkers
6ed4b62348 Java: "Convert to 'ThreadLocal'" intention should only be available on variable identifier
GitOrigin-RevId: e88c67e024292d317d553649e842462d8eae1e1e
2023-02-25 12:41:13 +00:00
Bas Leijdekkers
e2314b47c2 Java: update before/after for "Convert to atomic" intention
GitOrigin-RevId: 310f7fcaf2ba856283ca8e088ec57b79b981971e
2023-02-25 12:41:08 +00:00
Bas Leijdekkers
45ad12ce38 Java: fix preview for array and generic types (IJ-CR-103536)
for "Convert to atomic" intention

GitOrigin-RevId: 52390e868b0551dc61f8892b303b10350c28305c
2023-02-25 12:41:03 +00:00