Commit Graph

21135 Commits

Author SHA1 Message Date
Tagir Valeev
c93d4b68d2 [java-incomplete-model] Support unknown exceptions thrown from try block
GitOrigin-RevId: f968327e98f7f9804973c8ff9adf6366a5aec490
2024-06-25 13:54:11 +00:00
Tagir Valeev
838cf2d73c [java-incomplete-model] Assume that any unresolved class-type is assignable to java.lang.Object
Partially improves inference in incomplete mode

GitOrigin-RevId: 1d9c7c75afd524ea02980be8f96c19fba1eaaf54
2024-06-25 13:54:11 +00:00
Tagir Valeev
e377c6f30c [java-incomplete-model] Support concatenation with null-type expressions
GitOrigin-RevId: 19cdff4368ec690fb291f5eb25c381dbbba3cdd4
2024-06-25 09:23:05 +00:00
Tagir Valeev
7b5b0bd4e4 [java-incomplete-model] Support known constructors with unresolved components
GitOrigin-RevId: 12f529c3eae1abba306c6318f189d08c877f9aa7
2024-06-25 09:23:05 +00:00
Tagir Valeev
b6771f471e [java-incomplete-model] Fix unresolved method call with qualifier and incomplete hierarchy
GitOrigin-RevId: 94881c672bb3c1a5c3ea9dde381c6223a4996fca
2024-06-25 09:23:05 +00:00
Tagir Valeev
acf8109a0f [java-incomplete-model] Support 'var' declarations
GitOrigin-RevId: 1d35868639192661ad6d1f8bafbcbda188b547b2
2024-06-25 09:23:05 +00:00
Louis Vignier
46881c21ab [javadoc] Add tests for inheritDoc tag navigation
GitOrigin-RevId: 8027c88e263bbcd2c2cc4f17eba3cf68871d715e
2024-06-22 21:42:51 +00:00
Yuriy Artamonov
b333fe8ad9 [codevision] IJPL-156683 Simplify changing the default alignment of inlay hints in IDE
GitOrigin-RevId: e18312174ae63c4bfcf00941963628a748ade580
2024-06-21 22:13:16 +00:00
Tagir Valeev
b038d3db65 [java-inspections] NullableStuffInspectionBase: fix record constructor support
GitOrigin-RevId: defcd306c9f5a32c027cbc2105ac3224878de452
2024-06-21 17:47:17 +00:00
Georgii Ustinov
bea3fefda2 [Java. Code Formatting] Restore caret in files for AnnotateMethodTest#testAfterDoNotAnnoI
IDEA-353192

GitOrigin-RevId: 5f930ffb06158c40e786cd948c8f8d0982e61814
2024-06-21 15:13:57 +00:00
Georgii Ustinov
41cf8f6fe3 [Java. Code Formatting] Add check to TypeAnnotationUtil that language level is at least 8
IDEA-353192

GitOrigin-RevId: e8d2d8270dbc1c39300d5a2d55ef993e433ccdbc
2024-06-21 15:13:57 +00:00
Mikhail Pyltsin
7fe1e933e6 [java-completion] IDEA-354763 Don't propose protected/transient and so on the top file level
GitOrigin-RevId: b8bdcc7329a0a26ef6260c56097c5994ee4e94b6
2024-06-21 15:13:08 +00:00
Tagir Valeev
e573732e7c [java-inspections] Extract method recommender: do not include initial comment into the length
Fixes IDEA-354492 "Method can be extracted" includes comments as minimum code length

GitOrigin-RevId: 3d4e34e6726f7917fe3b0224653b89f07cd2ae42
2024-06-21 13:49:43 +00:00
Tagir Valeev
3b45af56a7 [java-dfa] IDEA-354336 Java DFA fails to report nullable var passed to notnull arg after instanceof
GitOrigin-RevId: 2fada677a054fbd049e12e9b585a5f08711a5b26
2024-06-21 13:49:37 +00:00
Dmitry Avdeev
6f5ebf0d46 [workspace] convert to plugin
GitOrigin-RevId: c1682d99eeb8526db7176deade6dbcc97bfbfe8e
2024-06-21 10:53:45 +00:00
Roman Shevchenko
36367cddfe [tests] fixing inspection warnings in Src*RepositoryUseTest
GitOrigin-RevId: 94ad0e92db595aae799ae7184e6769e138b612e1
2024-06-21 10:51:45 +00:00
Bas Leijdekkers
774c6c6d42 Java: fix "Variable assigned to itself" inspection quick-fix operator assignment bug (IDEA-306674)
GitOrigin-RevId: 92f5ab3b782cd0a2e6af8f83ff80de64f000c3bf
2024-06-21 09:13:06 +00:00
Bas Leijdekkers
c4c6723e5a Java: don't warn when fix is not possible (part of IDEA-306674)
for "Variable is assigned to itself" inspection

GitOrigin-RevId: e2b630232fcc34b3d441689193e4daf169920192
2024-06-21 09:13:06 +00:00
Bas Leijdekkers
d1f0e0880a Update "Unused declaration" messages for increased clarity
GitOrigin-RevId: 8bb4dd31d51f3cc4fb63c36579bd3078f6f622f7
2024-06-21 09:13:05 +00:00
Mikhail Pyltsin
73bbc5d00d [java-completion] IDEA-355252 Don't suggest deconstruction with incorrect name
GitOrigin-RevId: 9bdb1273f507054c479eaa86597eadaf4568a9dd
2024-06-20 17:53:33 +00:00
Mikhail Pyltsin
fc86f137ca [java-inspections] EA-1288620 record deconstruction can be broken in inspections
- check that record deconstructions have correct numbers of components
- optimize `unwrapSealedTypes` a bit

GitOrigin-RevId: 167dabb1a5e6dd156e8d5772373c6f059e209257
2024-06-20 17:53:33 +00:00
Louis Vignier
70cc5359e6 [javadoc] Add a F-bound type parameter test for JavaDocInfoGenerator
IJ-CR-132677

GitOrigin-RevId: cac811c8e5d74358a45a362ac12fc0a1046077e2
2024-06-20 17:46:18 +00:00
Alexandr Suhinin
ac42764da7 [extract method] IDEA-262123: return default variable value on unconditional exits
GitOrigin-RevId: eaf46751769ecddd3711de96c48b62f209878b27
2024-06-20 16:21:05 +00:00
Tagir Valeev
0b7995dbd1 [mod-command] ModTemplateBuilder: support end position; use in JavaWithCastSurrounder
GitOrigin-RevId: 1fa5adbd8cac92062303baec88441a4489138b90
2024-06-20 11:51:01 +00:00
Tagir Valeev
0c576e7a4d [java] SwitchStatementPostfixTemplate: ModCommand surrounder
GitOrigin-RevId: 8949927faaa1cc4592287671d0eb077ab6b3816f
2024-06-20 11:51:01 +00:00
Georgii Ustinov
581dfa8bd3 [Java. Code Formatting] Add test for preserving line breaks in TypeAnnotationFormatterTest
IDEA-353192

GitOrigin-RevId: a57c5ed2713711663acbab2560ed150645309609
2024-06-19 17:37:28 +00:00
Georgii Ustinov
009e515c58 [Java. Code Formatting] Disable KEEP_LINE_BREAKS by default in TypeAnnotationFormatterTest
IDEA-353192

GitOrigin-RevId: cdefb444214d19fcfa762e2ab00fb0e236882d14
2024-06-19 17:37:28 +00:00
Alexandr Suhinin
0baf44b97e [extract method] IDEA-354122: make static should pass local variables as method parameters
GitOrigin-RevId: e1c14880358479e7c6b151f0ece7ab6cdd8ac87e
2024-06-19 15:37:48 +00:00
Tagir Valeev
6acadcb4f0 [java-inspections] IDEA-355111 "Parameter annotated @Nonnull should not receive 'null' as an argument" can support records
GitOrigin-RevId: a3f557fe842cc7c57cdae150d87f474eab07315e
2024-06-19 15:08:14 +00:00
Tagir Valeev
f3a9cdfdab [java-psi] Static interface method accessible through inheritance should not shadow static import
Fixes IDEA-355152 Good code red when static import collides with static interface method from the hierarchy

GitOrigin-RevId: f6f68cc372928d98bb1f66f2c3ddfaaf63d69702
2024-06-19 15:08:14 +00:00
Tagir Valeev
df1679571e Some 'Result of method call ignored' warnings fixed or suppressed
GitOrigin-RevId: 757e7bc0b1d7cb7cbf4a13c35e4f5c1fc375e0a4
2024-06-18 20:08:54 +00:00
Bas Leijdekkers
b0b4e53ad2 Java: strip trailing whitespace from text-block string template end correctly (IDEA-354777)
GitOrigin-RevId: fa0266faeeaf63b04451b4f068550e22e2cdf8ee
2024-06-18 19:20:03 +00:00
Bas Leijdekkers
19bcdae73f Java: quick fix should insert empty string when need to convert expression to string concatenation (IJ-CR-136837)
GitOrigin-RevId: aab43eb95b7bd05f70d1b187f2b0619a437bc21e
2024-06-18 19:20:03 +00:00
Tagir Valeev
191e65634e [java-analysis] ProjectBytecodeAnalysis: do not rewrite null->x contract with _->x if notnull parameter was inferred
Fixes IDEA-354381 Unreachable code inspection fails when using Streamable.of()
Unfortunately, the test does not differentiate the bug. I failed to write a good test in a reasonable amount of time. Nevertheless, the original issue is fixed.

GitOrigin-RevId: 55b0f169c93d1cef9453c3eb88959ea4832a917a
2024-06-18 12:26:39 +00:00
Louis Vignier
38c8e76b7d [refactoring] Migrate change signature gutter icon tests to inlay provider tests
#IJPL-10790

GitOrigin-RevId: c55dfc9d42dc0e1c14239c92b4dfca94a8005bc2
2024-06-18 12:06:00 +00:00
Alexandr Trushev
1e4e505e16 IJPL-797 intellij.platform.editor review internal API
GitOrigin-RevId: 514591f43e57749b752d8399d08b2cfd79fb34ea
2024-06-17 22:06:02 +00:00
Mikhail Pyltsin
9bf2727703 [java-generation] IJ-MR-136429 IDEA-344399 generate annotation based on type_use option
- fix non-standard-root-packages
- introduce project descriptors

GitOrigin-RevId: 41db7240e29fbfed81957df2d68e2de29c573ef2
2024-06-17 21:14:57 +00:00
Mikhail Pyltsin
2023228d8c [java-generation] IDEA-344399 generate annotation based on type_use option
- extracted new option
- reuse this option in MissortedModifiersInspection
- override uses this option too

GitOrigin-RevId: 39f3f72991240753c86c7f80df865728aa9743ad
2024-06-17 21:14:57 +00:00
Tagir Valeev
20c7b3400a [java-refactoring] MoveInstanceMethod: moving abstract method to interface should not change the 'default' modifier
GitOrigin-RevId: db6aca91eed8c0d7bebe6bb86dd398a3a372bfab
2024-06-17 13:22:21 +00:00
Dmitry Avdeev
1cc78a8d57 IJPL-156448 Run Configuration is produced in EDT
tuning ActionGroupWrapper

GitOrigin-RevId: 2c77669f4a0976ac083312a16192e253e5c2f522
2024-06-17 09:52:44 +00:00
Vladimir Krivosheev
e725a62891 IJPL-796 refactor HighlightingMarkupGrave
GitOrigin-RevId: ff1087bac8b556dd801bf75b63c986741e3c0c47
2024-06-17 08:18:07 +00:00
Dmitry Avdeev
9e0d76f66d IJPL-156448 Run Configuration is produced in EDT
wrapping CreateRunConfiguration action spoils ConfigurationContext cache, so it's removed
hopefully this won't break scenarios described in IDEA-144385 (When JUnit run configuration exists it's hard to run main method in the same class)

GitOrigin-RevId: 4cf9d044c0e74a5fb2ccb134c379918181a8883f
2024-06-15 23:25:40 +00:00
Vladimir Krivosheev
28a4004c72 IJPL-796 store DaemonCodeAnalyzerImpl in PRODUCT_WORKSPACE_FILE
GitOrigin-RevId: 936619ce815ba0f31a6e5c117f9e18102e143aca
2024-06-15 19:18:55 +00:00
Vladimir Krivosheev
a2b39c12f4 IJPL-796 reduce calls to isEditorLoaded
GitOrigin-RevId: c89f849d5cd98b542435ed9e069cf71011ed3596
2024-06-15 19:18:55 +00:00
Vladimir Krivosheev
e5475bc39c move service.kt to core-api
GitOrigin-RevId: 496653a5afebb1d32ffccd8c7c3e9f6d1d3f60fd
2024-06-15 18:11:52 +00:00
Mikhail Mazurkevich
1151f841e0 [workspace model] Regenerate entities
GitOrigin-RevId: 6eda295099f0eac35dde2f3ec8f7f5fa876295db
2024-06-14 20:11:59 +00:00
Georgii Ustinov
1df6b52d4b [Java. Code Formatting] Add settings of configuring spaces for simple one-line methods to JavaFormattingStyleCollector
IDEA-270369

GitOrigin-RevId: 671d77f7828c7932bddf67fe507f56086c0b5887
2024-06-14 19:38:46 +00:00
Tagir Valeev
9766de10a4 [java-analysis] NullableNotNullManagerImpl: more robust tracking of updated defaults
GitOrigin-RevId: bb75619bbd246d8dcbd3538f5e99122a9da25fe4
2024-06-14 18:18:48 +00:00
Tagir Valeev
567e0b0d05 [java-intentions] IDEA-270206 Nullability annotation at type parameter/wildcard: add a quick-fix to move it to the bound
GitOrigin-RevId: e8e56c2d27a77414045064c784f48ff712ad0d2d
2024-06-14 16:05:02 +00:00
Tagir Valeev
636172d7db [java-intentions] UnimplementInterfaceAction: do not try to remove synthetic methods
Fixes IDEA-354044 Error in Unimplement Interface when invoked on record

GitOrigin-RevId: 9c07e03d1f86ded0aeea3bd0f373dfc263e72eb4
2024-06-14 16:05:02 +00:00