Commit Graph

5485 Commits

Author SHA1 Message Date
Mikhail Pyltsin
45160db0df [java-highlighting] IDEA-352588 Support JEP 455: highlighting for switch with primitives
GitOrigin-RevId: 06636352b202037ec3400b2f9763e101d8ed6042
2024-04-29 21:17:42 +00:00
Mikhail Pyltsin
8416740b8c [java-dfa] Support JEP 455: IDEA-352186 dfa for primitives in patterns
GitOrigin-RevId: 2033b095f35f02222aa40f43d37e07b0019c4324
2024-04-29 21:17:42 +00:00
Mikhail Pyltsin
5679815962 [java-highlighting] IDEA-352677 Incorrect type inference for deconstruction patterns when the type is raw
GitOrigin-RevId: cfdb7e233f067e7dcc177a949aba7ae87c77a538
2024-04-29 20:11:33 +00:00
Mikhail Pyltsin
8b8df76dee [java-decompiler] IDEA-352102 support dumb mode in com.intellij.psi.impl.compiled.ClsModifierListImpl.setMirror
- simplified

GitOrigin-RevId: de9de919b756f0905be25d09a9908335a74415fe
2024-04-22 16:21:32 +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
Mikhail Pyltsin
795eecd6a7 [java-decompiler] IDEA-352102 support dumb mode in com.intellij.psi.impl.compiled.ClsModifierListImpl.setMirror
GitOrigin-RevId: 3d2e0562124a3fcc75c6f681a475dba59c15d69d
2024-04-18 20:19:06 +00:00
Tagir Valeev
6e1b6d24d3 [java] Alternative way to support for multi-release JAR root
Should fix KTIJ-29454 Performance Degradation in completion and highlighting Apr 13, 2024

GitOrigin-RevId: fec9f2a187c77c8af3ab21b3bc89c429d6737853
2024-04-18 10:40:18 +00:00
Piotr Tomiak
3a14f22bc7 WEB-64707 Flaky test com.intellij.tests.BootstrapTests: org.angular2.codeInsight.Angular2HighlightingTest.testTrUnderTemplate
GitOrigin-RevId: a46fed4f6d7e64a89e44cca76bd09c6c117b0abe
2024-04-17 16:21:14 +00:00
Tagir Valeev
deedad65a6 [java-analysis] JavaMultiReleaseUtil: use findChild directly to avoid parsing META-INF/versions
GitOrigin-RevId: 8583ded2c39c6c1e6c8e345a8d7f9cab1d875d74
2024-04-17 14:20:32 +00:00
Vladimir Krivosheev
52d1112027 JavaPsiFacadeImpl - connect with scope
GitOrigin-RevId: 5ad6524a201802d11518d17bb051a8999ec4bf76
2024-04-16 17:06:38 +00:00
Vladimir Krivosheev
b1167c581c cleanup - sort modifiers
GitOrigin-RevId: e733e90257ce8940d87dfd0a6d0e887f60c5330a
2024-04-16 12:48:35 +00:00
Tagir Valeev
36b14c80fd [java-indexing] PsiElementFinderImpl.processPackageDirectories: support MR-JARs
Should fix alternative resolve in MR-JARs in dumb mode
Should fix IDEA-350808 StreamEx can not be resolved

GitOrigin-RevId: 6fae6c419d8e01fb9e7d28904b8df9b94cabdcab
2024-04-12 14:55:57 +00:00
Mikhail Pyltsin
df6d77f795 [uast-inspection] IDEA-350483 IJ-CR-130570 New inspection LoggingGuardedByConditionInspection also deletes comments
- move commenter into UastCodeGenerationPlugin

GitOrigin-RevId: 8c0079fb1e3c0b7f4606bca547e40721c118b9c2
2024-04-09 13:05:17 +00:00
Sergei Tachenov
ea4d7f9f85 EA-1145457 Add NPE check in getClassIconOfKind
This function is only called in two places in PsiClassImplUtil.java,
and in both places it's expected to return a non-null value.
Since we have no way of figuring out why it returned null
(and it doesn't seem reasonably possible), let's try
to throw a more meaningful exception (since one is going
to be thrown anyway) and see what happens.

While we're at it, specify nullability for both input and output.

GitOrigin-RevId: 36523f24ab7218200d34deb82766bb580a8b6215
2024-04-08 16:34:07 +00:00
Bas Leijdekkers
89c8dc03ed [java] better error message on @interface throws/extends list not allowed (IDEA-350501)
GitOrigin-RevId: 1f89c42ac5ffda1d026f6e40cb922b08a095d1dc
2024-04-08 09:54:38 +00:00
Mikhail Pyltsin
719bb1619c [uast-inspection] IJ-CR-130570 IDEA-350483 New inspection LoggingGuardedByConditionInspection also deletes comments
- uast comment tracker

GitOrigin-RevId: d484939094c50bd5b7304d9703052f9841679c46
2024-04-03 20:02:45 +00:00
Bas Leijdekkers
afb2aef0a1 [java] better error message when extends/implements list not allowed (IDEA-350501)
GitOrigin-RevId: 3eee3e73fe57a8dc7bf10b9b30956e02a36c89d8
2024-04-03 14:14:22 +00:00
Bas Leijdekkers
0fc08dae0c [java] better error message when permits list not allowed (IDEA-350501)
GitOrigin-RevId: 93cc9241dd77e12df1baeda1d06538f3159a6e59
2024-04-03 14:14:17 +00:00
Bas Leijdekkers
e614239ca4 [java] better error message and quick-fix text on record constructor throws list (IDEA-350501)
GitOrigin-RevId: 50570e951ec901fe7619465352f725788032c8f2
2024-04-03 14:14:12 +00:00
Mikhail Pyltsin
94282b7d39 [java] optimize import for StatementParser.java
GitOrigin-RevId: be50c43ec68e8ff65369942278e3e7754f2ffe98
2024-03-20 17:10:36 +00:00
Tagir Valeev
2f2c4ee0d0 [java-stubs] ClsModifierListImpl: more flexible setMirror
Improves mirroring of annotations when there are discrepancies between stub-decompiler and fernflower, due to difference in behavior for TYPE_USE annotations

Fixes IDEA-347026 Error on class decomplier when decompiling type-use and non-type-use annotation

GitOrigin-RevId: 6dd31786fe174f17f419355c4f1e83b5508fceb6
2024-03-18 15:33:42 +00:00
Tagir Valeev
d18c733fe1 [java] Use more Java features
GitOrigin-RevId: d0690e949f311dc53bdfe5ff63140e2ef15e4d55
2024-03-14 19:34:40 +00:00
Tagir Valeev
40006e5d42 [java-psi] Mark TypeInfo as internal
GitOrigin-RevId: 0f6e63eaa5b6c3cd37bf3aec7dc6881633af7efb
2024-03-13 21:17:26 +00:00
Evgenii Ilichev
b9f22e5f03 [localization] move JavaErrorBundle.properties to the resources root
GitOrigin-RevId: fb490c30cd1093665c2c0ee2f3117bab5afa0526
2024-03-12 00:18:40 +00:00
Bas Leijdekkers
d19410735d [java] improve error message (IDEA-223692)
GitOrigin-RevId: df344c76be34232b3dc682d36b9d233ab2a6d54f
2024-03-10 15:30:11 +00:00
Mikhail Pyltsin
df26233a00 [java-execution] IDEA-346887 Java: unable to run application in dumb mode from line marker
- reuse `DumbService.getDumbAwareExtensions`

GitOrigin-RevId: 65712b768f9ea2dbe8f0390c659657f915410ffd
2024-03-04 11:01:35 +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
Tagir Valeev
807c36748d [java-stubs] TypeInfo: avoid hash lookup for irrelevant types
GitOrigin-RevId: 374614f593ecef6e6d4db964e82a5802c1e82f60
2024-02-24 12:21:42 +00:00
Tagir Valeev
ba44c9407e [java-stubs] Use parent StringBuilder to build annotation text
GitOrigin-RevId: 759ac9622c1b2c3110d277384898496cfaedb20d
2024-02-24 12:21:39 +00:00
Tagir Valeev
b7763b1106 [java] ClassFileViewProvider: restore isInnerClass(file, content) (necessary for Kotlin)
GitOrigin-RevId: db3950e5bbec302480c9078c5c61ef13d15c29c1
2024-02-21 10:41:26 +00:00
Tagir Valeev
140364707f [java-stubs] FirstPassData: use regionMatches to avoid allocations in visitSource
GitOrigin-RevId: 0b4fd37ec13526f560d3e78cce7379a8bfeeee6d
2024-02-21 10:41:02 +00:00
Tagir Valeev
a586b05b39 [java-stubs] Reuse ClassReader to get inner class flag
This allows avoiding repeating constant pool reading

GitOrigin-RevId: 1d21b7b4883b497bfb15bfceede482caaea6ff01
2024-02-21 10:40:57 +00:00
Aleksey Dobrynin
2fcfda59c0 [java, fix] handle invalid module names
GitOrigin-RevId: 2b2a88ae4536a47376ee5e9d21d418c7165e4d69
2024-02-16 11:31:17 +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
47a98d4500 [java] LanguageLevel#feature method; javadoc
GitOrigin-RevId: f3c57f7101b3ce7369c66b97411c897bdcd46d24
2024-02-15 13:23:21 +00:00
Dmitrii Gridin
aa3479c0b9 [java-stubs] ClsTypeParameterImpl: implement hasAnnotation
The default implementation delegates to `PsiClass` implementation
which delegates to the modifier list which is null for
type parameters

^IDEA-346155 Fixed

GitOrigin-RevId: 1015e64ae90d66f9762f1da478517b440401b146
2024-02-14 17:55:39 +00:00
Dmitrii Gridin
aeca7559c9 [java-stubs] ClsTypeParameterImpl: reformat code
GitOrigin-RevId: e63929aaeb60ea8698c3501068ea1f9473ff80ac
2024-02-14 17:55:36 +00:00
Mikhail Pyltsin
8813548cbb [java-highlighting] IJ-CR-125397 IDEA-344235 support calls with checked exceptions for instanceOf patterns
- reimplement, changing only mayCompleteNormallyVisitor

GitOrigin-RevId: 67be02c535ec3d5df7a9ec9cd77395305db27e14
2024-02-13 21:45:04 +00:00
Mikhail Pyltsin
35ff272201 Revert "[java-highlighting] IJ-CR-125397 IDEA-344235 support calls with checked exceptions for instanceOf patterns"
This reverts commit a6218b0150d17dc44940b392817e30c17f18adc0.

GitOrigin-RevId: 9283459df91e19bb1ad094a4101bdfebb865013b
2024-02-13 21:44:59 +00:00
Mikhail Pyltsin
aa94146c31 Revert "[java-highlighting] IDEA-344235 support calls with checked exceptions for instanceOf patterns"
This reverts commit 15d80e2f3028bd59c1ec9a73a7a3af4c1c5f1027.

GitOrigin-RevId: a770a8ce645fa6a578d5a923098d39456d7fd379
2024-02-13 21:44:54 +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
d0cf7b359a [java] IDEA-345498 Remove explicit Java 20-preview support and parenthesized patterns
GitOrigin-RevId: 8d646035979e3ec0a7de3c6f58a4e6ec9967bdbd
2024-02-12 19:12:36 +00:00
Mikhail Pyltsin
cf8999446b [java-generating] IDEA-345603 Generate -> override methods doesn't work with implicit classes
- allow to invoke everywhere in implicit classes
 - don't create {}
 - don't allow constructors

GitOrigin-RevId: 8f0b17b498035ffd1c20b26543de0a2d21eabf87
2024-02-09 14:45:39 +00:00
Tagir Valeev
8f28141888 [java] JavaFeature.JAVADOC_SNIPPETS
GitOrigin-RevId: ef0b325549f0d804d3d7549862663482e34e16fa
2024-02-08 10:08:24 +00:00
Tagir Valeev
2b41a7f753 [java] A little bit more of JavaFeature uses
GitOrigin-RevId: ffb3c336a16500a53000a8fbd6aa793fffd6befc
2024-02-08 10:08:19 +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
cd071eaae4 [java] IDEA-345355 Refactor HighlightingFeature (in progress)
Use more JavaFeatures; unify soft keyword processing in JavaLexer and in ForwardCompatibilityInspection

GitOrigin-RevId: f99ac1a35ec4b6b33716b2ace32ee0483f952c54
2024-02-08 10:07:43 +00:00
Tagir Valeev
d0d82eba52 [java] IDEA-345355 Refactor HighlightingFeature (in progress)
Declare new features: SERIAL_ANNOTATION, NESTMATES, ALWAYS_STRICTFP, COLLECTION_FACTORIES, INNER_NOT_CAPTURE_THIS, STRING_SWITCH
Use more features instead of explicit Java levels

GitOrigin-RevId: e90a96501c218ed44faebb7c882770b50477b6e1
2024-02-08 10:07:38 +00:00