Commit Graph

12701 Commits

Author SHA1 Message Date
Mikhail Pyltsin
f474d8047b IJ-CR-145218 [java-inspections] IDEA-201932 Provide inspection to highlight redundant creation operations in java date time api
- combine into one inspection
- fix messages

GitOrigin-RevId: d4e064948f8c730c4d68c58e6c9b1277c6b66b4d
2024-09-27 17:12:29 +00:00
Bart van Helvert
690f1167ff [java] Don't suggest generating broken overload constructors
In implicit and anonymous classes, constructors can't be declared. #IDEA-359731 Fixed

GitOrigin-RevId: 76e978d04052dffd955bfac6c1016fa707201b29
2024-09-27 16:07:34 +00:00
Tagir Valeev
087825794e [java] IDEA-359811 Support experimentally container annotation @NotNullByDefault
GitOrigin-RevId: 0f02149f8f9313357bab47e7d62d6f1ccfea6f9b
2024-09-27 10:37:49 +00:00
Tagir Valeev
9d989b2b7f [java-refactoring] Inline Parameter: do not erroneously report top-level non-static class references
Fixes IDEA-356746 Confusing warning when I inline array method parameter

GitOrigin-RevId: 1964db1b4a09ec7eb1bcbbcd05fcb445862f06b4
2024-09-26 13:53:17 +00:00
Bas Leijdekkers
6c2a3df811 Java: generated equals(), hashCode() and toString() can now use getters in records as well (IDEA-359692)
GitOrigin-RevId: d94b6278d61e5a0497a402c8201e31d9165691ab
2024-09-25 21:53:25 +00:00
Bas Leijdekkers
7fbe663b37 Java: don't add instance check when generating equals() (IDEA-357686)
GitOrigin-RevId: 21a0555c2fe6be705fe4d510c8d8d08238af4585
2024-09-25 21:53:25 +00:00
Tagir Valeev
ca9649997b [java-inspections] Properly report 'not applicable on locals' warnings
IDEA-355699 Warning when annotating array elements as nullable with JSpecify

GitOrigin-RevId: ca9a3e0ea2ef3aa01d31afcaff2f92193af14dbe
2024-09-25 11:10:24 +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
34006d311d [java-annotations] Type annotations for reflection
GitOrigin-RevId: 8a38692e45db2775c4ccee3b3cfcd40864b47224
2024-09-25 08:04:53 +00:00
Tagir Valeev
208b57b0b7 [java-inspections] ProtectedMemberInFinalClass: do not report if hierarchy is unresolved
GitOrigin-RevId: 62796075b86adbf9fb26b81e46cbeb9aa0ea831f
2024-09-25 08:04:53 +00:00
Aleksey Dobrynin
fe9767c257 [java, run configurations]support excluded module-info.java in compiler settings for application execution IDEA-359628
GitOrigin-RevId: 429ffefddc2d8b4b0d3cea96d955cc3ecf229821
2024-09-24 14:48:18 +00:00
Bas Leijdekkers
ba54dfd721 Java: care about generic class when replacing constructor with builder (IDEA-359490)
GitOrigin-RevId: 7aab29e572eb6da07d2fec202c886500fd944f6a
2024-09-24 10:04:30 +00:00
Bas Leijdekkers
84a8688289 Java: don't forget import when replacing constructor with builder (IDEA-359490)
GitOrigin-RevId: d013e469de340783918cbb4a3909a701594f683d
2024-09-24 10:04:30 +00:00
Bas Leijdekkers
c3189981f6 Java: accept more patterns (IJ-CR-144289)
GitOrigin-RevId: c0692f8c924b32988ec98aae86c1ad9b466cb45a
2024-09-24 10:04:30 +00:00
Bas Leijdekkers
b847b27f2c Java: add test for absence of stack overflow in parser
GitOrigin-RevId: 749b12334eb59f3f2ffeb88eef4605232e7e8330
2024-09-24 10:04:30 +00:00
Bas Leijdekkers
3e7bc7ef47 Java: reduce call stack usage in the parser for extremely large else-if chains (IDEA-305898)
GitOrigin-RevId: 9d7be3efbe108e604fbd67ce03c7fdfe23c3fb3a
2024-09-24 10:04:30 +00:00
Mikhail Pyltsin
f73a4d96be [java-inspections] IDEA-201932 Provide inspection to highlight redundant creation operations in java date time api
GitOrigin-RevId: 6b246167dda52272122d356c3f6a787eab5a2542
2024-09-20 14:10:17 +00:00
Tagir Valeev
c3ecaaa190 [java-dfa] More annotations; annotations for comparators; warn on nullity violation from methodref return
GitOrigin-RevId: d0b1a4967d361f409d4d25562c595e2812fc8044
2024-09-19 19:06:26 +00:00
Tagir Valeev
f7a5a79a2e [javadoc-tests] Test for external type annotations (IDEA-231901); bump default level to 21
GitOrigin-RevId: 184754528a776dbd7545cecb7da625840e2cbffe
2024-09-19 19:06:26 +00:00
Tagir Valeev
be4f6cd282 [java-inspections] Redundant keySet()/values(): support entrySet(); avoid warning inside Map implementations (IDEA-346005)
GitOrigin-RevId: ebf925ab3ff7c1357248a65201fe654aada0f4e8
2024-09-19 19:06:26 +00:00
Mikhail Pyltsin
abb1899900 [java-inspections] IDEA-357009 new option to configure custom classes for IncorrectMessageFormatInspection
GitOrigin-RevId: ab026ee405f78ff29519afb0db62449a682b5bd3
2024-09-19 12:20:53 +00:00
Tagir Valeev
a1eecbd0ae [java] External type annotations (IDEA-231901): remove them on variable introduction
Also bumped test project descriptor

GitOrigin-RevId: fd519a34b01abbb9de135f1c39fc1cb02c8de891
2024-09-18 20:27:35 +00:00
Tagir Valeev
35c9c6ca5a [java-dfa] Basic support for Unmodifiable type annotation
GitOrigin-RevId: 4bc07e2533efa45356ba26b89c065b453a40d253
2024-09-18 20:27:35 +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
Mikhail Pyltsin
3001c41aed [java-inspections] IDEA-357938 try to infer logging type inside methods for StringConcatenationArgumentToLogCallInspection
GitOrigin-RevId: a09f433bdc1cbed3c81ee4fab6f4986b5ada4271
2024-09-18 14:42:24 +00:00
Mathias Boulay
0cdf89293d fix(jdoc): inline mk structs break detection
GitOrigin-RevId: 0cb1adbd59262523ce59767fee5f33e78234bd9f
2024-09-18 14:34:29 +00:00
Georgii Ustinov
2da97bd1ae [Java. Code Completion] Simplify lambda expression for Logger completion test
IDEA-359199

GitOrigin-RevId: f250bb6713f003ec06875ef149551de602573836
2024-09-18 06:25:24 +00:00
Mathias Boulay
fef6778210 fix,test(jdoc): Stabilize spaces in test files
GitOrigin-RevId: 0c6b8c8ca44e90bdc80764b5fa1d8f2656762100
2024-09-17 16:28:17 +00:00
Mathias Boulay
b7d5b6900c feat(javadoc-handler): basic typing assistance
GitOrigin-RevId: 500c7ede653a91d1ea67c85efc2248657c35ccab
2024-09-17 16:28:17 +00:00
Mathias Boulay
d6d13853e6 feat(javadoc-handler): auto insert end of code fence
GitOrigin-RevId: 24c855a125c859bcc80f43c93a7d6c57ec9e3586
2024-09-17 16:28:17 +00:00
Mathias Boulay
027d4fb022 fix(javadoc-handler): insert leading tokens before start of comment
GitOrigin-RevId: 2fc351433f7841f9753d67e2a8d925a9991a1716
2024-09-17 16:28:17 +00:00
Mathias Boulay
68242cd5b9 fix(javadoc-gen): @code tag rendering full line
Turns out there was another edge case that the ones from the Youtrack issues.

GitOrigin-RevId: 6bccd3d0aa4fc121059558b847ba90731d9c8962
2024-09-17 16:28:17 +00:00
Mathias Boulay
e05667345c fix(javadoc): Missing character on new lines within snippets
#IDEA-358874 Fixed

GitOrigin-RevId: e03874f588e31c106d3a25518c05e0850b3fcd24
2024-09-17 16:28:17 +00:00
Tagir Valeev
ac0c57748b [java-inspections] IDEA-346005 Add new inspection: Unnecessary keySet() call
GitOrigin-RevId: d1f1db0ae939017a8550b91cd8742dc222a8db99
2024-09-17 07:28:39 +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
Georgii Ustinov
507ae5bd17 [Java. Logging] Simplify logic of JvmLoggerCompletionContributor
IDEA-359199

GitOrigin-RevId: 946fcfa18dedd03905e6f8a638ae0a86c3515b75
2024-09-16 12:19:41 +00:00
Yuriy Artamonov
47f1c44a90 [java] IJPL-158521 Actions: fix ellipsis in messages for Java actions
GitOrigin-RevId: bfce0d6efa8747660c4b9af3d8defbfa47e4509a
2024-09-15 14:50:09 +00:00
Georgii Ustinov
f7ff124bf1 [Java. Logging] Improve completion for logger
IDEA-359199

GitOrigin-RevId: a3162b75c3fa4ed32b3b17bcbf0753cf01fe72db
2024-09-14 14:51:59 +00:00
Bas Leijdekkers
5c06f74975 Java: don't report non-private field as assigned not accessed when it is implicitly read and written (IDEA-357404)
GitOrigin-RevId: 943ef6961c19510e5d4291367293424a87499487
2024-09-13 16:40:26 +00:00
Aleksey Dobrynin
f590114d83 [java, highlighting] Fix module conflict highlighting for exported packages IDEA-352819
GitOrigin-RevId: d4479fb863280674ae8960c930e6e8b1628b7321
2024-09-13 06:24:34 +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
c22a9186f9 [java-inspections] Support simple chaining in NotNullFieldNotInitializedInspection
Fixes IDEA-145194 Do not report 'Not-null fields must be initialized' when field is initialized indirectly

GitOrigin-RevId: c3bae51deaedbbbb4d035e5d7d3b55f2ca9b8c03
2024-09-11 20:52:54 +00:00
Tagir Valeev
8ed70be46d [java-inspections] IDEA-359031 Preview API use warning: ignore imports
GitOrigin-RevId: d9ba762be3f03f60372a70471f4c04efc26a9a66
2024-09-11 12:08:36 +00:00
Tagir Valeev
9092a09789 [java-intentions] BindFieldsFromParameters: disable for existing field if static or type doesn't match
GitOrigin-RevId: ad1d93533626f5e76a3f53c5ab25b06a5aa07f1e
2024-09-10 23:44:56 +00:00
Tagir Valeev
0f2865b919 [java-intentions] DefineParamsDefaultValueAction: better check of possible signature conflicts
GitOrigin-RevId: 5eb26ee62852e2e5e6188e740b807c775ded0277
2024-09-10 23:44:55 +00:00
Mathias Boulay
055ce7ad56 Fix(JavaDoc): fix markdown construct being unaffected inside legacy docs
GitOrigin-RevId: 25beb0f37329a1b98a511144558c291b5c284398
2024-09-09 18:26:13 +00:00
Tagir Valeev
ad5122e632 [java-completion] Use var when preferred
Fixes IDEA-212766 Java Postfix completions should use Java 10 var keyword if possible (for, fori, cast, ...)

GitOrigin-RevId: 58813cb4f7ecfbaf6da5fd51237a7e778313fff2
2024-09-09 17:41:44 +00:00
Mikhail Pyltsin
d72eba89a1 [java-completion] IDEA-357258 Java 23: .switch postfix completion is not supported for primitive data types
GitOrigin-RevId: ae848584ee81611bde2e1201c79923c2e170f6e6
2024-09-09 15:21:29 +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
Bas Leijdekkers
c47a581888 Java: merge two tests
GitOrigin-RevId: 3811faf0c478ae7e9e2c7ff40da645ef41312d09
2024-09-06 13:43:06 +00:00