Commit Graph

2898 Commits

Author SHA1 Message Date
Mikhail Pyltsin
aec277cf21 IJ-CR-137428 [java-completion] IDEA-355252 Don't suggest deconstruction with incorrect name
- extend VariableNameGenerator

GitOrigin-RevId: b6c1455ff9e01ae898219410cba45a5c5c669703
2024-06-21 13:47:15 +00:00
Mikhail Pyltsin
73bbc5d00d [java-completion] IDEA-355252 Don't suggest deconstruction with incorrect name
GitOrigin-RevId: 9bdb1273f507054c479eaa86597eadaf4568a9dd
2024-06-20 17:53:33 +00:00
Marat Dinmukhametov
24900db474 [microservices] IDEA-353802 Added documentation
GitOrigin-RevId: 2562ba8b8d80860dc0718edff65f20e9766b1ae7
2024-06-19 12:59:38 +00:00
Tagir Valeev
0037baab23 [java-incomplete-model] Do not report potentially convertible ==/!= comparisons
GitOrigin-RevId: 71b3f3c3edda0ffd112c314f6a5b5b0e2cb29ee6
2024-06-07 16:43:16 +00:00
Pavel Kirpichenkov
9ea82d1a98 [Kotlin][Java inference] Apply use site scope for j.l.Object
With KMP projects it's possible that a class can reside in a common
module with no JDK available. Trying to use class' resolve scope
for creating java.lang.Object type in this case will result in an
incorrect type. Use site scope from a type comes from a JVM module
which has a JDK available.

KTIJ-28461

GitOrigin-RevId: b19fe424ce4f7745e7f6aad7c5a34bb3912f5a56
2024-06-07 15:35:18 +00:00
Marat Dinmukhametov
cfe75d3aa7 [microservices] IDEA-353802 The ability to provide custom isMain
This allows us to remove kotlin-specific checks for the main method from the common side

GitOrigin-RevId: 4a3fca78220bdc0e67abfe96c5ea219aa350027e
2024-06-05 17:09:26 +00:00
Mikhail Pyltsin
5cdb566ad8 [java-inspection] IDEA-352587 Support JEP 455: Improve conversion from if to switch
GitOrigin-RevId: 30a1ee985af322459781882e4e792ecb6478ea67
2024-05-24 21:18:43 +00:00
Mikhail Pyltsin
f1642ef3bb Revert "[java-highlighting] IDEA-352727 Incomplete model with lombok"
This reverts commit ea0f6f9c

GitOrigin-RevId: c9f49f0bcf193ce593a6b9fbea9600d0f507fa9d
2024-05-24 21:18:39 +00:00
Mikhail Pyltsin
3183b72cb2 Revert "IJ-CR-134196 [java-highlighting]IDEA-352727 Incomplete model with lombok"
This reverts commit 537fa533381ca5db2cba1e19cae3ca402c31f8e6.

GitOrigin-RevId: 1b2fbc0e6d184e7317cbac02f67458c2f663ccd8
2024-05-24 21:18:30 +00:00
Mikhail Pyltsin
9ff8676d0f IJ-CR-134196 [java-highlighting]IDEA-352727 Incomplete model with lombok
- skip unused import in incomplete mode

GitOrigin-RevId: 537fa533381ca5db2cba1e19cae3ca402c31f8e6
2024-05-23 11:30:38 +00:00
Tagir Valeev
478d1f479b [java-psi] Reduce code duplication around captureToplevelWildcards
GitOrigin-RevId: 38c529bcce4a3dc7761c3eef9a43a425a9eccc01
2024-05-23 10:43:05 +00:00
Tagir Valeev
43cead82a1 [java-psi] Optimize PsiClassType.hasParameters
GitOrigin-RevId: 666e0e9d97e0cc0d0b95c84863be6c8bf157d02c
2024-05-23 10:43:00 +00:00
Tagir Valeev
f23bd6e698 [java-analysis] PsiClassType.equals: cache wildcard capturing
Optimize partially IDEA-353780 Syntax Analysis hangs forever with complex use of Java generic parameters

GitOrigin-RevId: 8ef87b3ffafa1aa3996f39a69c4aebbaa4dc2197
2024-05-22 09:55:41 +00:00
Tagir Valeev
3f46270d18 [java-analysis] PsiSubstitutor.hasRawSubstitution
Optimize partially IDEA-353780 Syntax Analysis hangs forever with complex use of Java generic parameters

GitOrigin-RevId: 3b6d77db8353c21e0d09c9c28d551c1edd6c5e1d
2024-05-22 09:55:24 +00:00
Mikhail Pyltsin
1b026e0b7f IJ-CR-133924 [java-test] EA-1144109 Fix IndexNotReadyException for other languages
- new JvmLanguageDumbAware introduced

GitOrigin-RevId: 4bdd0195d5defd407e6d2804b528a79b018b50eb
2024-05-20 01:21:32 +00:00
Marat Dinmukhametov
c9372a4ec8 [kotlin] KTIJ-29075 Available kotlin run configuration in dumb mode
GitOrigin-RevId: bd99306e5794a7f4c483c6f664f5d52204a462e2
2024-05-17 10:55:29 +00:00
Mikhail Pyltsin
f1f4179b44 IJ-CR-132827 [java-completion] IDEA-352185 Support JEP 455: completion for primitives in patterns
- make PRIMITIVE_TYPES unmodified

GitOrigin-RevId: e7febe03880e2e580c674a6632c203aa6d74246f
2024-05-14 12:54:03 +00:00
Mikhail Pyltsin
de02a19083 [java-highlighting] IDEA-352727 Incomplete model with lombok
GitOrigin-RevId: ea0f6f9cf44d704d4ae7e45fa3ba262c1496ffa4
2024-05-13 16:29:12 +00:00
Mikhail Pyltsin
48fc0dcf51 [java-completion] IJ-CR-132827 IDEA-352185 Support JEP 455: completion for primitives in patterns
- add more comments
- extract primitive types

GitOrigin-RevId: 25a7335deeeb3b9a9c4fc4e71c6e4b7cc18999de
2024-05-08 14:24:34 +00:00
Alexey Kudravtsev
02dcc5107b introduce utility method DumbService.isUsableInCurrentContext; replace usages
GitOrigin-RevId: 5ef82623debf3474bd9ed67829346f3d0f9967a3
2024-05-03 18:14:12 +00:00
Georgii Ustinov
4daf0e509c [Java. Code Formatting] Add better whitespace detection for AdjustWhitespaceLineTextBlockReformatPostProcessor
IDEA-271085

GitOrigin-RevId: 9b77c8be1713797b705fe5860b826a9d36dcb2d9
2024-05-03 11:47:55 +00:00
Tagir Valeev
e74c8aa5e2 [java-psi] LambdaUtil.copyWithExpectedType: make more robust by avoiding textual type representation
Canonical type representation might be incorrect when the type is an unqualified reference to a non-static inner type when the outer type is generic

GitOrigin-RevId: 5a3a2698ac57f426738bae2fea019946d49a135c
2024-04-22 09:41:07 +00:00
Tagir Valeev
84c8c278ed [java-analysis] PsiTypesUtil.isDenotableType: avoid non-physical element creation to improve the performance
GitOrigin-RevId: 2e89eaaaad4aa6e722c0c712e97827c78be6c0d8
2024-04-22 09:41:02 +00:00
Yuriy Artamonov
ed4b509b66 [java] IDEA-341622 Better cache NullableNotNullManager#findEffectiveNullabilityInfo for library methods
GitOrigin-RevId: ecc23faa48a12ae14ad91be62d0a2216eca74e7a
2024-04-21 17:28:15 +00:00
Tagir Valeev
053d59f113 [java-psi] Move JavaLexer utility methods to PsiUtil to make them accessible from java-psi-api
GitOrigin-RevId: 88a728c1d021f703dc9f882e1f9213cd8477ed7a
2024-04-19 17:41:51 +00:00
Tagir Valeev
5ae32b3ec9 [java-analysis] LambdaUtil.isSafeLambdaReplacement: check all calls in-between; check applicability
Fixes IDEA-350194 Inspection QuickFix results in compilation error

GitOrigin-RevId: fb83bfcb4e4aef9dc87a5c84de6d08202dd52ec6
2024-04-16 19:06:42 +00:00
Mikhail Pyltsin
2c28b8d64f [java-run] IDEA-351297 Could not direct run classes with main method defined in their super classes as of 2024.1
- behavior before 22 was unspecified, but it supports static for classes (not interfaces)

GitOrigin-RevId: cf12f4c46708bdb994604170c11997c2498f84aa
2024-04-15 17:21:05 +00:00
Bas Leijdekkers
f96bb8f6d4 [java] define "type parameters" element kind
GitOrigin-RevId: 883cd7f25b3ca5a3eac311b3c9b8b90fc3334653
2024-04-03 14:14:32 +00:00
Bas Leijdekkers
e39319e784 [java] define "permits list" element kind (IDEA-350501)
GitOrigin-RevId: bd1126512effdbf9e202d7cb68c5ab15ad78d761
2024-04-03 14:14:02 +00:00
Bart van Helvert
96690d8ae4 [java] Fix false positive for local classes with super call in constructor
#IDEA-350324 Fixed

GitOrigin-RevId: 32f487b6ec841c26dbb73ec8931a9f0f6863a3d9
2024-03-29 21:00:54 +00:00
Mikhail Pyltsin
75f080da26 [java-tests] IDEA-348322 Java: Add the ability to launch tests in Dumb mode
Merge-request: IJ-MR-128894
Merged-by: Mikhail Pyltsin <Mikhail.Pyltsin@jetbrains.com>

GitOrigin-RevId: 68a6972f96f46855ecce100a84f85ef03d60e6e4
2024-03-29 16:31:09 +00:00
Tagir Valeev
aed276dfd3 [java-inspections] Use LocalRefUseInfo in more contexts to avoid extra PSI traversals
GitOrigin-RevId: 0dae53843eebe7232460cad1c809223342824cd2
2024-03-20 14:22:13 +00:00
Alexey Kudravtsev
65d8ef970d cleanup. notnull
GitOrigin-RevId: b8f0fa900d8acee91c99aa67ff11b20eaee993fb
2024-03-19 18:27:53 +00:00
Victoria.Petrakovich
c086c60c1e K2 IDE: port UsePropertyAccessSyntaxIntention – turn it to the inspection
KTIJ-28409 K2 IDE: port UsePropertyAccessSyntaxIntention

Merge-request: IJ-MR-125578
Merged-by: Victoria Petrakovich <Victoria.Petrakovich@jetbrains.com>

GitOrigin-RevId: bca92cabd37d3d9f926cef4afba58962f586a89e
2024-03-19 17:04:03 +00:00
Tagir Valeev
d18c733fe1 [java] Use more Java features
GitOrigin-RevId: d0690e949f311dc53bdfe5ff63140e2ef15e4d55
2024-03-14 19:34:40 +00:00
Vladimir Krivosheev
72efd72cf0 reduce the usage of kotlinx-immutable-collections
GitOrigin-RevId: f5a8cc34ffff305e2793ea2a109156dcde4014b0
2024-03-11 02:16:11 +00:00
Aleksey Dobrynin
d9e11e9153 [java, completion] refactoring: simplify code, add javadoc, add localization IJ-CR-127501
GitOrigin-RevId: e5adf605b24e8f74932f98c805d926ea4ef5d200
2024-03-01 22:56:33 +00:00
Mikhail Pyltsin
4385321f3d [java-execution] IDEA-346887 Java: unable to run application in dumb mode from line marker
GitOrigin-RevId: 0f7945c0e2ed9513dd4cb62aca453b52cc737d5e
2024-03-01 17:38:42 +00:00
Nikolay Chashnikov
f70df02556 [java] API: add PsiUtil.isLanguageLevel*OrHigher methods back as deprecated to restore binary compatibility
This also simplifies migration to the new API.

GitOrigin-RevId: d6b1e1bb061978980a6ae645d2e4c20f8425f95e
2024-02-15 19:26:43 +00:00
Tagir Valeev
92ac3066cb [java] JavaFeature.OVERRIDE_INTERFACE; isLanguageLevel6OrHigher usages removed
GitOrigin-RevId: 5d1bedeee34435ecbfc0d4bda6245a50c9ac24d7
2024-02-15 17:28:26 +00:00
Tagir Valeev
6e80ef3cc7 [java] Use Java 5 features
GitOrigin-RevId: 7db6edf696525b8d22dadf66fe12bd867068a6eb
2024-02-15 17:28:22 +00:00
Tagir Valeev
bf85acba82 [java] More JavaFeature uses
Also: new JavaFeatures (ASSERTIONS, ENUMS, PRIVATE_INTERFACE_METHODS)

GitOrigin-RevId: f073845a77730b486afa56317e2c12ff044f5425
2024-02-12 19:12:43 +00:00
Tagir Valeev
2aa52eea2d [java] IDEA-345517 Feature-based support of unsupported preview language levels
GitOrigin-RevId: 3037d36588c239d6236ba64a7df2bf2a3b51cba4
2024-02-12 19:12:39 +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
Yann Cébron
084b4bb75a [java/jvm] mark EPs as PossiblyDumbAware
GitOrigin-RevId: e91e26dabe85c81567c8cf94fde710e5df5908ba
2024-02-12 16:51:39 +00:00
Mikhail Pyltsin
096dbf66d4 [java-highlighting] IJ-CR-125398 IDEA-341846 Code with instanceof for a local class inside a generic function is red
- improve comment

GitOrigin-RevId: 151397030435c29af9b0a5ee5aaaf25bdf16555a
2024-02-09 14:45:41 +00:00
Mikhail Pyltsin
2e7a1b0249 [java-generating] IDEA-345563 Generate -> toString for implicitly declared classes uses file name for class name
- add class name to chooser

GitOrigin-RevId: efc3b498f4c81cc36a76fdb3a33163fecee472e0
2024-02-09 11:43:37 +00:00
Aleksey Dobrynin
42b88e37cf [java, highlighting] jigsaw#isAccessible: support "--add-exports" option. IDEA-345277
GitOrigin-RevId: 0ef641d506f3c6d9cf3968f015370483e5789569
2024-02-09 10:00:17 +00:00
Tagir Valeev
7f9b23e06f [java] PsiUtil#getDeclaredLanguageLevel: support Kotlin light classes
GitOrigin-RevId: c6af6dba4d9550a930007bbe875a0a54b5717140
2024-02-08 10:08:34 +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