Commit Graph

760 Commits

Author SHA1 Message Date
Aleksey Dobrynin
2dd8312cf2 [java, jigsaw, index] prioritize newest Java descriptor in multi-release JARs (IDEA-365082)
(cherry picked from commit 10d03d5095264cf4e708b6154b4f4a90ea683155)

IJ-CR-156911

GitOrigin-RevId: 9af80db882a95d952565b74db2aa6e82e5dc6716
2025-04-30 10:56:32 +00:00
Tagir Valeev
da0b41afe9 [java-modules] JavaModuleSearch as a facade for JavaModuleNameIndex
GitOrigin-RevId: b8c1be32c0e2b053e098d3339b1f47d4d8d68635
2025-02-11 09:57:16 +00:00
Vladimir Krivosheev
154e1b1445 update bazel files
GitOrigin-RevId: fdb2c5a8fbaaa72b4fba7053f4178f89e2ff48d5
2025-02-08 11:42:47 +00:00
Tagir Valeev
0e57ef0ef0 [java-core] Extract JavaPsiModuleUtil with minimized dependencies; new module intellij.java.codeserver.core
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)

GitOrigin-RevId: 328779172e877b737a68624fa09ea88cf5fd1954
2025-02-07 16:16:32 +00:00
Vladimir Krivosheev
32eeb4ee9f update bazel files
GitOrigin-RevId: 524d4c1ce8590184de334693be7d6a207d8682f7
2025-02-05 12:27:57 +00:00
Leonid Shalupov
40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00
Andrey Zaytsev
5448b658b3 [wobbler] unused import
GitOrigin-RevId: 9543d2ff0778710331aa57cebece94a4377ff5c4
2025-02-01 16:06:30 +00:00
Andrey Zaytsev
bea9799042 [wobbler] add new method to FileIndexFacade and use it in JavaSourceFilterScope, removing the hack of indirect check for the absence of RootManager
GitOrigin-RevId: 2aedb15dc624ead46672f48658e6bdb8423d5091
2025-02-01 16:06:30 +00:00
Andrey Zaytsev
76a0e8cdea [wobbler] move additional java stub index out of community
GitOrigin-RevId: 4c57346e93b44dc284d1cde81f55ebe160839942
2025-02-01 16:06:30 +00:00
Andrey Zaytsev
e28fe78235 [wobbler] get kotlin-src -> java-src resolve working
GitOrigin-RevId: be35003debe792017e51d7792f1b1b09d2fe075b
2025-02-01 16:06:29 +00:00
Andrey Zaytsev
f3e3f0c4dd [wobbler] get resolution to jdk working
GitOrigin-RevId: 98f16eb5685309cfe15faf92adf1969b7f5a22a6
2025-02-01 16:06:29 +00:00
Tagir Valeev
91672cf103 [java-highlighting] checkDuplicateTopLevelClass -> ClassChecker
Also: ImplicitClassSearch
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)

GitOrigin-RevId: eb3db22e952c6f17228b6b98beeb94e6da507612
2025-01-09 18:51:18 +00:00
Vladimir Krivosheev
0bc1cf1557 update bazel files
GitOrigin-RevId: 7320d3eff3aba093692ce66839c720ece6d7c4db
2024-12-30 11:28:24 +00:00
Vladimir Krivosheev
7b9ec58009 do not export intellij.database.connectivity.tests
GitOrigin-RevId: a1ef44dfa34cde110c9e6cad19d11b5e3019ab72
2024-12-28 21:45:55 +00:00
Vladimir Krivosheev
051ed2529b cleanup
GitOrigin-RevId: 6fa4f979e0a6641885e2225eb985b13713373ac5
2024-12-26 14:56:01 +00:00
Vladimir Krivosheev
98799639aa do not use _test as lib - test targets do not support this
GitOrigin-RevId: f2f49db4294b6a64040dbbd5f1d95e972cbd70a3
2024-12-15 18:32:30 +00:00
Tagir Valeev
050920691a [java-analysis] javaSimplePropertyGist: remove the getter/setter name restriction
Now, index can map getter/setter -> field for any name, not only with get/set/is prefix. This is already done for bytecode index, now for source index as well
Follow-up for IDEA-364131

GitOrigin-RevId: c8c0e09d94a12bfedf575f5aa3f2d79dabe34834
2024-12-04 15:17:36 +00:00
Vladimir Krivosheev
17916c90f8 libraries -> lib, resources, opt-in, test deps
GitOrigin-RevId: db66ee95dcb0f0553b40c9cc56cd6afed8634cdd
2024-11-27 13:53:42 +00:00
Alexey Kudravtsev
9cef099839 propagate @Unmodifiable to more methods calling ContainerUtil, to enable data-flow inspection to highlight more warnings
GitOrigin-RevId: 01d3c976ffd35c3290433d0cd6c0f2d59df894f1
2024-11-27 12:57:34 +00:00
Alexey Kudravtsev
6cb319cbbc more immutable collections: mark transitive callees of ContainerUtil.filter() as Unmodifiable to help uncover "immutable is passed where mutable is expected" bugs via "data flow problems" inspection, fix some found bugs
GitOrigin-RevId: c9b57bd0bd8fadcbaf7cca373c2aefbf562ecd4b
2024-11-18 16:57:58 +00:00
Andrzej Głuszak
cbca664f6c [bazel] Second attempt at generating tests
GitOrigin-RevId: 7763c9994b7c311310b83b98a542775feb00ed68
2024-11-09 11:06:41 +00:00
Tagir Valeev
7e4f411a3d [java] Move PropertyUtil to java-analysis-impl
GitOrigin-RevId: d66b7dbea6a325adc212aa2c58312f9d7e64ee3d
2024-10-24 16:36:51 +00:00
Ilya Kirillov
8f34a2a79f [java] allow providing exclusions for PsiShortNamesCache by specific languages
It will be additionally used in the following commit

KTIJ-30842

GitOrigin-RevId: 8370a2ef5157b8c4afff45cfbf6c1e563cb9cd82
2024-08-15 17:53:01 +00:00
Max Medvedev
c57b418673 cleanup JavaSuperClassNameOccurenceIndex.java
GitOrigin-RevId: f9ac89cf7ba2494112de5595d851132b981bfe2a
2024-08-14 14:05:32 +00:00
Peter Gromov
f9fcfadb11 JavaBinaryPlusExpressionIndex, JavaNullMethodArgumentIndex, PropertyCodeReferenceIndex: check for content substrings
GitOrigin-RevId: a2b31c05cb7380354592539b59653e27c66f0a0a
2024-08-11 11:16:44 +00:00
Ilya Kirillov
3e42f78fcc [kotlin] Do not use resolve/LC in go to class/symbol for Kotlin
Instead, implement the functionality via Kotlin declarations. Previously, it worked in a mixed mode: some declarations were provided via LC, some via Kotlin declarations.

Additionally, this change makes Kotlin "go to symbol/class" fully dumb-aware.

New behavior:
- All declarations are now provided via plain Kotlin declarations.
- No Light Classes are used:
  - To avoid using LC, `PsiShortNamesCache` is adapted in a way that it can ignore `PsiShortNamesCache` implementations which are explicitly marked as producing generated declarations instead of existing Java-based PSI like `PsiClass`, `PsiMethod`, etc.
    - `KotlinShortNamesCache` is marked as such, so it's ignored.
- As no resolve is used, all Kotlin contributors work in dumb mode.
- For facade declarations, like callables (functions or properties) from a facade or a facade class itself, new Kotlin contributors create new `PsiElementBasedNavigationItem`:
   - It points to the original Kotlin declaration (or to a `KtFile` in the case of a facade class itself).
   - In go to class/symbol action, duplicated declarations are merged with the original ones, so they are used only for text search purposes.
     - It's reflected in the tesdata updates
- `GotoSymbolModel2.getFullName` is updated so it can handle not only `PsiElement` but also a `PsiElementNavigationItem`
- Behaviour of qualified name is stabilized:
  - Previously, it produced `(in Container).Foo` for LC-based classes and `Container.Foo` for plain Kotlin classes.
  - Now, it always produces `Container.Foo`
       - It's reflected in the tesdata updates

^KTIJ-30913 fixed
^KTIJ-30842 fixed

GitOrigin-RevId: c671f6e161dd530e19e8abbbc7046f1cd121908d
2024-08-09 19:06:53 +00:00
Tagir Valeev
229eff0461 Raw type and other warnings fixed
GitOrigin-RevId: cde52de8987d2a995c4d2861f3b77356d79f3dd4
2024-06-28 16:52:24 +00:00
Bart van Helvert
7a3729260a [java] Make implicit class index final
GitOrigin-RevId: 053e62b390ad3835b64295214551ae9b5fc1f24e
2024-06-26 18:23:10 +00:00
Tagir Valeev
4dcafc063c [java] IDEA-350754 Java wildcard imports not recognized when class is located in multi-release JAR
GitOrigin-RevId: 669f22c7f718a83129cf9c88d89a55ba3df2126a
2024-04-16 16:24:07 +00:00
Tagir Valeev
3122a1801c [java-indexing] JavaVersionBasedScope: remove unused field
GitOrigin-RevId: ff42a273bdaff82ffd8807837b69b6909b6a5270
2024-04-11 14:46:20 +00:00
Tagir Valeev
47a98d4500 [java] LanguageLevel#feature method; javadoc
GitOrigin-RevId: f3c57f7101b3ce7369c66b97411c897bdcd46d24
2024-02-15 13:23:21 +00:00
Tagir Valeev
c3b35ef889 [java] Rename methods to avoid mentioning explicit Java version
GitOrigin-RevId: a2d0fcf924b19d88462cbae662f6bc50fac51903
2024-02-13 15:29:35 +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
Daniil Ovchinnikov
f687028e37 IJPL-639 don't request service in MethodTextOccurrenceProcessor.<clinit>
GitOrigin-RevId: 4ba4b6ba7d07e1200d0e2d2bad305ba17481d7ca
2024-02-12 15:32:09 +00:00
Vladimir Krivosheev
1c5f802ea3 do not use guava immutable map (part 2)
GitOrigin-RevId: a30122e0670b70932eed14da4c391317153c5024
2024-02-10 19:46:05 +00:00
Andrey Cherkasov
1a62d88764 Cleanup: use light services
^IDEA-254577

GitOrigin-RevId: 01afb3f2166f8713cd4599f37d43ecf7f4d2944c
2024-01-23 06:03:51 +00:00
Alexandr Suhinin
79653f2633 CR-101244 clean up: remove redundant overriding methods
GitOrigin-RevId: d4d165c6280b7bead925940c82b20f5300c7750a
2024-01-20 15:47:17 +00:00
Tagir Valeev
c74bfa2e57 [java] IDEA-341317 Navigation into multi-release JARs
GitOrigin-RevId: 43612b6950fca72ab58af9b1eb5dc4940f90c501
2023-12-19 16:48:57 +00:00
Tagir Valeev
b262b8affe Minor warnings fixed
GitOrigin-RevId: 8e52edaa2770b151e52e754aca7095d97f7d80ec
2023-12-14 12:10:57 +00:00
Andrey Cherkasov
019a6852f4 [java] Make extension classes final
GitOrigin-RevId: 1aae04982598568a111e8c78b9a71c9d2b4aa150
2023-12-13 20:02:09 +00:00
Mikhail Pyltsin
3f86cf9292 [java-highlighting] IDEA-339935 JEP 463
- rename unnamed classes to implicitly declared classes

GitOrigin-RevId: 2c6d7f16a1dc6d2371b8f8b5f5675246c9bc99f9
2023-12-11 15:49:28 +00:00
Elena Shaverdova
9e77f9bb03 IDEA-331326 Create FUS event for stub index inconsistency
GitOrigin-RevId: 8194bd9128dd7639655b335bed6747d6ce046b14
2023-11-22 20:56:50 +00:00
Tagir Valeev
eec03c8b24 [java-analysis] ReadableExternalAnnotationsManager: warning fixed
GitOrigin-RevId: 8a210a692ebd86dc57eab3f8d1b819213c9116d4
2023-11-06 19:11:52 +00:00
Andrey Cherkasov
094b9fc6c1 The "Simplifiable service retrieving" inspection: cleanup
Merge-request: IJ-MR-116656
Merged-by: Andrey Cherkasov <Andrey.Cherkasov@jetbrains.com>

GitOrigin-RevId: d42dd51ec49b4176265baf2bb69df04a964418a3
2023-10-17 13:36:11 +00:00
Louis Vignier
ed300a6ffc [java] Delete superfluous override
IJ-CR-115084

GitOrigin-RevId: 5fd39d816682125a3a893aa240790641e88e2de6
2023-10-11 19:07:58 +00:00
Louis Vignier
329f346fcd [java] Use correct scope to check unnamed class configuration validity
IJ-CR-115084

GitOrigin-RevId: 65e3a76dfe73b670bee43e7be2a3565f06b327d2
2023-10-11 19:07:54 +00:00
Louis Vignier
619640a0ca [java] Add stub index for unnamed classes
#IDEA-331209

GitOrigin-RevId: bf52092b67108e81fc148f7e223ac802f0214fdf
2023-09-28 18:34:14 +00:00
Tagir Valeev
9513c10254 [java-indexing] ConstructorReferencesSearchHelper: fix search in non-physical files
GitOrigin-RevId: b97c3008706df137ddefb451ad5ca57aa2c7f011
2023-09-27 11:27:10 +00:00
Louis Vignier
7da0863c33 [java] Remove JavaUnnamedClassIndex
The index made tests fail, reverting until a better solution is found.

IJ-CR-115084

GitOrigin-RevId: 5b4ca90aa8059e70c656d3e9ff80868940670736
2023-09-19 05:49:03 +00:00
Louis Vignier
f90a3ca248 [java] Try to fix reentrant indexing in JavaUnnamedClassIndex
#IDEA-331209

GitOrigin-RevId: 7e1e8eecb616498c69b15cb0a7cf6b264ddcaae0
2023-09-19 05:48:55 +00:00