Commit Graph

21659 Commits

Author SHA1 Message Date
Mikhail Pyltsin
d97f659b90 [java-inspection] IDEA-340970 don't offer fix if yield statement is broken
GitOrigin-RevId: 414d7230cd3887b5a92664582a42c8775ccf753a
2023-12-14 19:49:20 +00:00
Mikhail Pyltsin
94c9f55c96 [java-completion] IDEA-278391 Completion in switch: incorrect replacement by constant and default labels
- forSwitchLabel is aware of PsiErrorElement

GitOrigin-RevId: 5e91a1acd7839378684183e82c6fdc765e1b9abc
2023-12-14 19:49:16 +00:00
Mikhail Pyltsin
ed67eee493 [java-inspection] IDEA-340576 Uncompilable code generated for switch pattern matching
- class, which has permitted list, doesn't have `sealed` modifier, process this class as sealed

GitOrigin-RevId: afaccb6f6479c90ad431b9300a586854e89ea204
2023-12-14 19:49:13 +00:00
Mikhail Pyltsin
43ad0b4707 [java-inspection] IDEA-281947 Useless pattern guard not suggested for removal
- remove guard if it is always true

GitOrigin-RevId: 168a103e93a42c9a82657abffcbd7626047cab3d
2023-12-14 19:49:09 +00:00
Andrey Cherkasov
24adef8e2a Resolve warnings about 'protected' members in a 'final' classes
GitOrigin-RevId: 5d7c04b6371be1f2cc924a86614919ab6ee5b642
2023-12-14 17:36:45 +00:00
Tagir Valeev
3489814274 [java-inspections] SafeDeleteFix: implement isAvailable to properly select between host and injected
Fixes IDEA-339869 IllegalStateException when calling intentions for the string with language injection

GitOrigin-RevId: a32b3f3b270e4af255a1309b9d990efe1e04fdb6
2023-12-14 15:51:30 +00:00
Tagir Valeev
94c327dc6c [java-inspections] IgnoreResultOfCallInspection: hard-code java.time parse methods as throwing DateTimeParseException
GitOrigin-RevId: 207fccac40251f81e9cac1ec3494d280b7a48554
2023-12-14 15:51:16 +00:00
Tagir Valeev
3614b742bb final method in final class warning fixed
GitOrigin-RevId: eeec0047e89c8bcd9768022405964716ac0bb75e
2023-12-14 12:11:00 +00:00
Tagir Valeev
79373bbd83 [java-inspections] IgnoreResultOfCallInspection: ignore Integer.decode inside catch
The problem was mentioned in comments of IDEA-327705.

GitOrigin-RevId: c38588d48727d3e4145eecb316c331d5805ef0c0
2023-12-14 12:10:54 +00:00
Andrey Cherkasov
019a6852f4 [java] Make extension classes final
GitOrigin-RevId: 1aae04982598568a111e8c78b9a71c9d2b4aa150
2023-12-13 20:02:09 +00:00
Mikhail Mazurkevich
087a966991 [java] FL-23733 Set version for Java SDK base on the homePath
GitOrigin-RevId: ff2c84918b3c9d48442919130088daebdb8a3151
2023-12-13 19:12:04 +00:00
Daniil Tsarev
978a89f8ec [spring] Shell: collect usage statistic
GitOrigin-RevId: 93e5bc54455eb739d1226ccadc398c47386192e2
2023-12-13 18:46:18 +00:00
Tagir Valeev
e3d0d11188 [java-intentions] ReplaceImplementsWithStaticImportAction: rename method
GitOrigin-RevId: d13d5e14fbd6d3511dd0d3348d7b9755b47d202a
2023-12-13 15:22:20 +00:00
Mikhail Pyltsin
772e8c26d4 [java-inspections] IJ-CR-118436 IDEA-311650 Improvements to conversion of if-else to switch that use guarded patterns
- improve method naming

GitOrigin-RevId: 33214671a441bfa886960fa309ce9dcab14fe3a3
2023-12-13 14:39:04 +00:00
Aleksey Dobrynin
131bfc4609 [java] add default static imports
GitOrigin-RevId: 746402d1272aa0a410abbbfb18bd8571f545029c
2023-12-13 11:31:37 +00:00
Mikhail Pyltsin
45b4e8e23c [java-intentions] IDEA-340601 allow creating methods in ImplicitClass
GitOrigin-RevId: 1e0cd613359f27e889df5cf03ce535c1a1a99ca7
2023-12-12 20:14:00 +00:00
Timur Aliberdov
b02a5f81d6 [java] SCL-21857: remove workaround for Scala (IJ-CR-120989)
GitOrigin-RevId: a01717c07bf48b4d0d5808a797ed19fc0aeed3bb
2023-12-12 19:53:34 +00:00
Bart van Helvert
e113c220f6 [java-tests] Properly filter duplicate test frameworks in creat test dialog
We should only filter based on target class language if there is more than 1 candidate test framework. #IDEA-316239 Fixed

GitOrigin-RevId: ed1b75f75c85a932e06fb211cd7d008ce1c6ae92
2023-12-12 16:39:36 +00:00
Sergei Tachenov
2af53ccd3a IDEA-304699 Use the data context to get the tool window ID
A part of the effort to make scope providers BGT-safe.

GitOrigin-RevId: efac89be376dd41e030c8cd7013bdd66d4c8af18
2023-12-12 14:17:11 +00:00
Tagir Valeev
d8175c6e01 [java-inspections] ReplaceConstructorWithFactoryAction: turn off in implicit classes
GitOrigin-RevId: 2d2e3691b2127ab193226009f4dc5c5d86e40843
2023-12-12 14:11:42 +00:00
Georgii Ustinov
dacbca4cb7 Add wrapping options for enum fields annotations
IDEA-171773

GitOrigin-RevId: 51cf6a8154d9d278b182f165f98efa2d83d052d3
2023-12-12 13:26:17 +00:00
Mikhail Pyltsin
5a1f1aadc7 [java-completion] IDEA-340250 Use JavaQualifierAsArgumentContributor in case when class and first argument are similar
- support prioritized lookup

GitOrigin-RevId: 011df8519e374227d95797ad713d25b54d0261ff
2023-12-12 12:25:43 +00:00
Mikhail Mazurkevich
d69d00cb80 [workspace model] Don't create modifiable model for getting list of SDK roots
GitOrigin-RevId: 87c3406c984e42fc004fbc35c3302c2841c9f5e0
2023-12-12 03:42:22 +00:00
Tagir Valeev
6e1d684df0 [java-inspections] UseHashCodeMethodInspection: support double type
Also: fix comment processing
Improvement of IDEA-338114

GitOrigin-RevId: 87d057ccbea4262c40e2717c2ea3c004ac9865b0
2023-12-11 21:37:14 +00:00
Mikhail Pyltsin
8cc5fcc764 [java-refactoring] IDEA-340096 fix moving or adding files with implicit classes
- not change package for implicit classes

GitOrigin-RevId: 16de67179dd55f809f7ade9d18a576f095a6486b
2023-12-11 21:06:11 +00:00
Mikhail Pyltsin
91cf1947e4 [java-highlighting] IDEA-340063 Don't offer import from implicitly declared classes
GitOrigin-RevId: 7cda6a2eaa67c0c557ce53f61bfd345d5d773694
2023-12-11 21:06:00 +00:00
Mikhail Pyltsin
0d55ac4678 [java-actions] IDEA-340069 Don't offer replace constructor with factory if it is inside implicit class
GitOrigin-RevId: 5d44f909e46220a49a88e31f23bad09ec9868e44
2023-12-11 21:05:56 +00:00
Mikhail Pyltsin
cdffacc3bd [java-completion] IDEA-340250 Use JavaQualifierAsArgumentContributor in case when class and first argument are similar
GitOrigin-RevId: ea318a11f10252b5cbef9a931dc8f5941d99f948
2023-12-11 20:43:30 +00:00
Tagir Valeev
8305dee370 [java-inspections] Improve performance of ExtractMethodRecommenderInspection
1. Exclude DFA from findExtractOptions. Here, we don't need to encode early exit with nullity, so running DFA is a waste of time
2. Avoid exception checking for every candidate fragment. This is a lot of extra work, and most of the candidates will be ruled out using

IDEA-340300 Java: ExtractMethodRecommenderInspection runs too long in big files

GitOrigin-RevId: 918eef472432ac982a0f57c2e0b65aad73783061
2023-12-11 15:57:40 +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
Bas Leijdekkers
94b2cdc583 Java: improve inspection description
GitOrigin-RevId: 03a37941c7a8d9bcda1f307611dd982847174c5c
2023-12-11 15:43:26 +00:00
Bas Leijdekkers
3ae8c3568d Java: "Unnecessary 'this' qualifier" inspection should be highlighted like unused symbol
GitOrigin-RevId: 56b9c9773ad6fb79c35242c27b9979913fe7b09e
2023-12-11 15:43:19 +00:00
Mikhail Mazurkevich
7e4b6b7aed [java] IDEA-340375 Commit modifiable model of SDK in the proper place
GitOrigin-RevId: ac14ef10fe318cca822ef3723b7ca97b6f8388e6
2023-12-11 11:29:33 +00:00
Tagir Valeev
2a4fc312fb [java] IDEA-327241 Enable compilation and running Java projects with configured unsupported preview versions
GitOrigin-RevId: df85f51ac1d4249ec3baf34f5ce7d150e06d2a13
2023-12-09 13:20:33 +00:00
Tagir Valeev
a8f88fa062 [java] Use HighlightingFeature.LVTI
GitOrigin-RevId: ce2d4c1a6338457ff57f691fc6fdc2542de5022c
2023-12-09 12:53:05 +00:00
Bart van Helvert
297df6fec4 [uast] Migrate Test diff provider to use UInjectionHost
#KTIJ-27448

GitOrigin-RevId: 146ae01911cf2ec8ebf87d1a4d30b8279afb5249
2023-12-08 10:59:35 +00:00
Bart van Helvert
2dca290584 [uast] Migrate away from sourceInjectionHost in favor of UInjectionHost
#KTIJ-27448

GitOrigin-RevId: dca98b47e4799ca623ebc1b63adcd201acd7ecc8
2023-12-08 10:59:35 +00:00
Anna Kozlova
9d9df2787d [java] rename: don't replace invalid name with another invalid name
^KTIJ-26939 fixed

GitOrigin-RevId: 46f437e881beaf9429e2a9e8f3e42e210a6a8c6f
2023-12-07 16:56:10 +00:00
Dmitry Avdeev
7bda928488 IDEA-332898 First quick fix is not for the problem under cursor
renamed to fixOffset (https://jetbrains.team/p/ij/reviews/119933/timeline)

GitOrigin-RevId: e4b9d039ad02f618ee41c880bd300ebd5180d917
2023-12-06 11:47:28 +00:00
Bart van Helvert
e62a85a565 [java] Don't filter overrides for go to symbol in dumb mode
#IDEA-339786 Fixed

GitOrigin-RevId: b91406a518055a349d87d126ee315f7deeb26363
2023-12-05 20:43:56 +00:00
Bas Leijdekkers
e8d2bff198 Java: generate compact equals when using IntelliJ Default (IDEA-339226)
GitOrigin-RevId: dd90f8e079a2693d74a220ef95aca3223c105fa9
2023-12-05 10:02:17 +00:00
Bas Leijdekkers
1bea98b241 Java: replace "Accept subclasses as parameter to equals() method" checkbox with two radio buttons (IDEA-339226)
GitOrigin-RevId: d8fc7f4527a80411dfec12de1f8e602a36106e47
2023-12-05 10:02:13 +00:00
Bas Leijdekkers
da39c01311 Java: generate final equals() method when using instanceof (IDEA-339226)
GitOrigin-RevId: b024aa3775268895bd9cbeecea5a6947a93415f7
2023-12-05 10:02:10 +00:00
Kurt Dresner
6b88f5582c [javadoc] Don't return null if root URL parsing fails, just return the original
closes https://github.com/JetBrains/intellij-community/pull/2597

GitOrigin-RevId: 2d620773c4270d322014e12e23090dd926027b5d
2023-12-04 12:52:42 +00:00
Kurt Dresner
bf0c93b0a5 [javadoc] Fix relative URLs conversion in JavaDocExternalFilter
When the `href` attribute of an anchor tag starts with a single forward
slash ('/'), this means the link should be relative to the authority
(host + port) of the current page. Similarly, when the `href` attribute
of an anchor tag starts with two forward slashes ('//'), the link should
be relative to the scheme (e.g. https://) of the current page.

closes https://github.com/JetBrains/intellij-community/pull/2597

#IDEA-336443 Fixed

GitOrigin-RevId: a8888f2a5dc283d158596229d6d602e1a2f8d265
2023-12-04 12:52:38 +00:00
Georgii Ustinov
0ee266b325 Get rid of resolver in Java Formatter
IDEA-235747

GitOrigin-RevId: b085d98a222ffdf93f46ff9ec75ee7a351b9ee01
2023-12-04 09:06:58 +00:00
Bart van Helvert
5529f73fc8 [java] Allow go to symbol in dumb mode
#IDEA-339250 Fixed

GitOrigin-RevId: 91e120cad065cedc39973420c37a7fbd69b5c442
2023-12-03 20:10:25 +00:00
Dmitry Avdeev
ccd0d3652f non-modal progress and non-blocking read action for PsiTargetNavigator
GitOrigin-RevId: b0a38a195f724a1fcb043cd661001e86859d2a35
2023-12-02 22:34:57 +00:00
Pavel Porvatov
a9d0a7dcb0 IDEA-339569 Remove ConfigurableBuilder, part 1
GitOrigin-RevId: 72d0361b3e2325b27f7d62440abfc38ec86e63af
2023-12-01 19:36:09 +00:00
Pavel Porvatov
1a08f7b59c Rename .java to .kt
IDEA-339569

GitOrigin-RevId: a456b3b554f242ea2c09243ff9e3ec2c2d200504
2023-12-01 19:36:05 +00:00