Commit Graph

5624 Commits

Author SHA1 Message Date
Tagir Valeev
d2b1f518c8 [java-refactoring] IDEA-360614 Replace with single implementation: no downcast when 'this' is used
(cherry picked from commit f2ea406a5cf229cf9e63b6c2b53b9d86f245a6d9)

IJ-CR-150207

GitOrigin-RevId: 0eec797e7e9d105bf594aabd85533bd5c5395dd1
2024-11-26 19:12:59 +00:00
Bas Leijdekkers
441dded643 Java: fix can be simpler (IJ-CR-149100)
(cherry picked from commit ee348aabdcfea05468f214d3da513da75fe6a4fd)

IJ-CR-149100

GitOrigin-RevId: 969055ee74f435babd80bfaa7cfc342f149ffe12
2024-11-13 15:13:23 +00:00
Bas Leijdekkers
7178d5454c Java: correctly qualify method call when it is inlined from static interface method (IDEA-362625)
(cherry picked from commit 2f32664c77558fc4507a8a6ecc327f6c91b7d815)

IJ-CR-149100

GitOrigin-RevId: e224c59e90ff32687ebc67a278d1e63b52095fbd
2024-11-13 15:13:23 +00:00
Tagir Valeev
feb2ee9625 Warnings fixed (mostly redundant cast)
GitOrigin-RevId: 63bdb7f359a1a2cd37cb6a691b3d94db8ba3ce02
2024-10-11 08:10:27 +00:00
Nikolay Chashnikov
dbd47232c7 [java] API cleanup: mark deprecated unused API for removal (IJPL-156972)
GitOrigin-RevId: 5c2121d84e0d0517b6ef056bb0de6e78a468b760
2024-10-10 23:55:42 +00:00
Mikhail Pyltsin
112da55ce6 [java-decompiler] IDEA-346312 adapt patch 004
- sort inner classes by methods
- fix tests
- use actual time
- simple refactoring
- don't use STANDARDIZE_FLOATING_POINT_NUMBERS by default

GitOrigin-RevId: f079077ebf0752c15c2f9308093026dff7717c50
2024-10-10 09:55:48 +00:00
Tagir Valeev
8ea673ff41 [java-analysis] PsiSubstitutorImpl: better preserve context; more tests
GitOrigin-RevId: 4765f00cf6a5eafe902b9fae73c450f475e3d8c8
2024-10-08 20:08:05 +00:00
Bas Leijdekkers
1ce2fdbcb5 Java: presentation provider for record components (IDEA-360262)
GitOrigin-RevId: b3fef1fe5d58659efea5b21eb458d7c2880ba9a7
2024-10-07 17:17:27 +00:00
Mikhail Pyltsin
a55780f84d [java-highlighting] IDEA-345960 fix unnecessary java error messages
- there are doubles with JavaPsiBundle but all of that are suppressed due to external usages

GitOrigin-RevId: 656f3187c12d8d19025b58c43afa25293b4975e6
2024-10-07 11:42:34 +00:00
Bas Leijdekkers
dfae4a26c2 Java: "Generate overloaded constructor with default parameter values" for records (IDEA-360071)
GitOrigin-RevId: a20fd5478241de404df3243f1b8b9a7d1a73829e
2024-10-02 20:13:41 +00:00
Bart van Helvert
941408d4c8 [java] Don't replace identifier for implicit class constructors
Such constructors are not valid. The class name is used to create the constructor name, but this name is not available here, resulting in an NPE. #IDEA-359731

GitOrigin-RevId: 4d7798045f820315a4ca5bd8a66e786c4da58976
2024-09-27 16:07:34 +00:00
Tagir Valeev
c6a9e0df14 [java-stubs] Cosmetic
GitOrigin-RevId: a4282a6608377fa0be89d8abb94b61ef6dc6e16b
2024-09-27 11:18:02 +00:00
Mikhail Pyltsin
8cccdff168 IJ-CR-145483 [java-highlighting] IDEA-359527 Class 'MyRecord' must implement abstract method 'value()' in 'MyInterface' in implicit class
- use `getContextOfType`

GitOrigin-RevId: 0f0c943c04e2e9c17dd0f66b884ff8f3a16ba455
2024-09-25 17:11:30 +00:00
Mikhail Pyltsin
bff9894b8b [java-highlighting] IDEA-359527 Class 'MyRecord' must implement abstract method 'value()' in 'MyInterface' in implicit class
- incorrect accessibility in implicit records with light members

GitOrigin-RevId: f55453f1c212d785e7b5fde78c4e0fbc4870ce86
2024-09-25 09:24:37 +00:00
Tagir Valeev
f6e20dab03 [java-inlays] Support external type annotation inlays
Part of IDEA-231901 Support TYPE_USE in external annotations

GitOrigin-RevId: 0474e537913e85c49331c2f3f64feaf3947083bb
2024-09-24 11:13:21 +00:00
Tagir Valeev
3361aba5cb [java] ClsReferenceParameterListImpl: use plain order instead of reversed order for type parameters
GitOrigin-RevId: f3a7729ed3b6bb1f466e44ed98f1ac09b942ae55
2024-09-21 17:52:33 +00:00
Bart van Helvert
cf770b3acf [uast] Make light parameter type building lazy in K2
Computing the type can be slow, and clients might not even need to access the type.

GitOrigin-RevId: 22df309ed18d77f07ae7d2dd2dcc994c79541f0b
2024-09-21 16:50:02 +00:00
Tagir Valeev
6e23889cc9 [java] Syntax of typePath changed; annotations for collection factories
GitOrigin-RevId: 178882a91d4e6cff0ec317739b107fadb0d07047
2024-09-19 19:06:26 +00:00
Tagir Valeev
b50767f679 [java] Basic support for external type annotations
Only in XML directly; no editing UI for now; no inlays for now; only for libraries (Cls), currently no intent to extend to sources (Psi)
Part of IDEA-231901 Support TYPE_USE in external annotations

GitOrigin-RevId: 672ed09f57ffc40b61e8fe4dd33d0f9acdac92dc
2024-09-18 20:06:30 +00:00
Tagir Valeev
1d83886b74 [java] ExternalAnnotationsManager.findExternalAnnotations: NotNull
GitOrigin-RevId: cbd3821a7d6d43d7a0c77039312b612ee0137b73
2024-09-18 12:08:08 +00:00
Tagir Valeev
33a3a3d3d9 [java] Less raw types
GitOrigin-RevId: 0bb21ea1ab22c45d79e74e8c839c6b8495a9036a
2024-09-18 12:08:08 +00:00
Tagir Valeev
6e2074418d [java] Reduce service requests in external annotation query
GitOrigin-RevId: a0472dfc29ca08e256f64c603d8a25c347c29d4b
2024-09-18 12:07:43 +00:00
Bas Leijdekkers
cb7ac04d17 Java: handle classes without a qualified name better (IJ-CR-144804)
GitOrigin-RevId: 88ee8c15122aaca6028b591d8538e18de0882643
2024-09-16 18:13:55 +00:00
Tagir Valeev
05de6a6bdb Less raw types
GitOrigin-RevId: 2a6e712b4017cf1ead7870543e562acb654fbeaf
2024-09-16 11:23:15 +00:00
Tagir Valeev
5cc7875bbc [java] Remove unused CompositeInstructionClientVisitor.java
GitOrigin-RevId: c95fedf0b01f3f4d3ea6404a15b0a4cdccf9a805
2024-09-13 11:01:30 +00:00
Bas Leijdekkers
c40e983f98 Java: rename method correctly if the name conflicts with javadoc reference (IDEA-355643)
GitOrigin-RevId: c1ae53780e8ec3a56834dd32ecd9bc19cfd222fb
2024-09-12 18:27:21 +00:00
Tagir Valeev
dbfdbb4d40 [java-stubs] TypeAnnotationContainer: properly report annotation owner from generated annotations
Fixes IDEA-354380 Erroneous null warning when using jspecify 0.3 NonNull bounds in generics
The wrong owner caused malfunction of a condition inside DfaPsiUtil.getElementNullability. As a result, we weren't able to merge declared nullability with instantiation-based nullability for compiled code

GitOrigin-RevId: 3ae900174cb7d34a801f07d9644997c85d257b9f
2024-09-12 15:11:36 +00:00
Tagir Valeev
b134b6c346 [java-stubs] JavaClassElementType: parameterize better
GitOrigin-RevId: 0f5e7c62a9844ba81eb038fb3e0c293772684560
2024-09-12 15:11:36 +00:00
Bas Leijdekkers
3eace12483 Java: avoid unnecessary regex compilation and matching
GitOrigin-RevId: c58621b89c1594d24e7ea23d6dab6f86d7a80112
2024-09-12 09:51:54 +00:00
Tagir Valeev
473076118f [java] getTypeParameterIndex: NotNull
GitOrigin-RevId: 40c014f3395e2d654d005ecd04cd21ca3805fde9
2024-09-10 23:44:55 +00:00
Mathias Boulay
2cfd03bd80 fix(JavaDoc-gen): compilation on backport, Better rendering, respect IDE options
Fixes IDEA-354610, IDEA-353932
Partially addresses IDEA-352642

fix(JavaDoc-format): handle indent on markdown

fix(JavaDoc-backport): fix compilation

GitOrigin-RevId: 5d1705da21be59ec0bc92a1b35bdf986a3227064
2024-09-09 12:59:51 +00:00
Lev Leontev
4478324e2a IDEA-358871 honor exclusion in CoreJavaDirectoryService#getPsiClasses
GitOrigin-RevId: 19fa5bfadef763431bcf025773127cb58f01f850
2024-09-06 19:39:11 +00:00
Tagir Valeev
ec5666b7cc [java] IDEA-358832 Newer java.lang classes should not be resolved on older language level
GitOrigin-RevId: de3f26ca24a881d0daf5eeb7349a5b22058ef40d
2024-09-06 12:04:27 +00:00
Mathias Boulay
245479dba8 fix(JavaDoc): escaped brackets spacing, reference link with 2+ args
Links like [String#copyValueOf(char\[\], int, int)] won't have an additional space for no reason
Links like [String#copyValueOf(char\[\], int, int)] can now be clicked on for navigation purposes.

GitOrigin-RevId: 42cb742a641b767a82820f5d01a9baff4e78811e
2024-09-04 15:20:28 +00:00
Tagir Valeev
8b073a6842 [java-stubs] Bump ClassFileStubBuilder.STUB_VERSION
Looks necessary after [java-stubs] TypeInfo: remove special processing of unqualified Object and String

GitOrigin-RevId: 65ca6722d3f0fd1658cc54382b28a78524e20d05
2024-09-03 12:37:37 +00:00
Tagir Valeev
bab02f85ff Remove redundant casts
GitOrigin-RevId: 0ac4441bd3207f090a7d2f1b8e6718fdadaf3553
2024-09-02 21:01:25 +00:00
Mathias Boulay
286567da08 fix(JavaDoc): Collapsed markdown comments with wrong suffixes
Not perfect at all, it should be able to rely on the commenter API instead.

GitOrigin-RevId: f41d181e9f27905bca1156912b7850f5a96ba943
2024-09-02 16:39:21 +00:00
Mathias Boulay
d4e45d6061 tweak(JavaDoc): Disable some inspections on older javadoc
Some inspections are pointless to check, related to javadoc tags.

GitOrigin-RevId: b7bb8bba4b51f1d90678705af3da8e5e5c4a4907
2024-09-02 16:39:21 +00:00
Tagir Valeev
145cb49135 [java-stubs] TypeInfo: remove special processing of unqualified Object and String
They are useless for Cls stubs and de-facto rarely used in Psi stubs but may cause bugs like IDEA-356054 Unable to open file when contents references inner class of "Object"

GitOrigin-RevId: da7cf23835e93a19a615e4c5d18e99d31528e1a7
2024-09-02 12:18:12 +00:00
Mathias Boulay
19b9a28603 fix(JavaDoc): Refactoring misplaced tags
GitOrigin-RevId: 313091e94f8b65d379615f91dca7b975428aeeba
2024-09-02 10:36:29 +00:00
Mikhail Filippov
bf43f2fc01 IJPL-150165 bump Kotlin language and API version
GitOrigin-RevId: a59dc8ca214a5047773fccf1cf28a1e1b07acf68
2024-08-30 22:15:55 +00:00
Bas Leijdekkers
f198a23cdf Java: don't evaluate enum constants as constants expressions
GitOrigin-RevId: c5d703ce78b569a3bdab9e8e9dcc2e95bdadd07f
2024-08-29 19:03:09 +00:00
Bas Leijdekkers
ed81723f17 Java: don't evaluate constant for incomplete expressions
GitOrigin-RevId: 15542db6b8631edbc96bd7ea9cc2b1a975fcbcbb
2024-08-29 19:03:09 +00:00
Bas Leijdekkers
8827db8d65 Java: remove enum functionality from constant evaluator
GitOrigin-RevId: edcb80e7ddeee3a45b83c98cf77f3c56fd850298
2024-08-29 19:03:09 +00:00
Alexey Kudravtsev
8dea809c37 cleanup
GitOrigin-RevId: 840fc5a04665f2560a76447f394151270ead2774
2024-08-29 17:34:57 +00:00
Mathias Boulay
d03ded346a fix(JavaDoc): Inline code block support
GitOrigin-RevId: ac902221d848139b9a92559b0f61558cfb259319
2024-08-29 16:55:53 +00:00
Mathias Boulay
2bd10fba65 fix(JavaDoc): Html code support in tags
GitOrigin-RevId: b4d6a52b9e5a8f292a41b5b94e93b6bfd16364b9
2024-08-29 16:55:53 +00:00
Mathias Boulay
2750d267ea fix(JavaDoc): better language highlight on codeblock
GitOrigin-RevId: 2445935a3c083ecca24d899a300d02c08378f525
2024-08-27 18:12:21 +00:00
Mathias Boulay
d69bdfe6a4 fix(JavaDoc): illegal character on escaped array types
GitOrigin-RevId: dd8098159715bd42510d807077d2679b365c546f
2024-08-27 17:29:56 +00:00
Alexey Kudravtsev
baa254d5eb IJPL-160883 Apply ChangeLocalityDetector even if PSI reference or declaration is changed
do not disable ChangeLocalityDetector produced scope when the reference was changed in languages other than Java/Kotlin, because the rules might be different there. Instead, move that logic inside the java/kotlin ChangeLocalityDetectors

GitOrigin-RevId: 4aafa966186fe038c25e0a2512c80ba1b1d93eeb
2024-08-26 17:04:03 +00:00