Commit Graph

447263 Commits

Author SHA1 Message Date
Tagir Valeev
e35d04820c [java-refactoring] IJPL-157516 T: InlineUtil.inlineVariable
GitOrigin-RevId: 89f3781736ca0f67437538878c26174286657973
2024-06-28 17:23:07 +00:00
Gregory.Shrago
be04e5725f move action customization keys to ActionUtil
See
IJPL-157278 Make `ActionMenu.SECONDARY_ICON` public API

GitOrigin-RevId: 2da0f7c6e489169f55ee9ede092a63b14cb3ee71
2024-06-28 17:20:20 +00:00
Gregory.Shrago
69cb70983f migrate to DataSink.lazy
GitOrigin-RevId: 30402500d00996ce83f7f46ff5763c5b5442275b
2024-06-28 17:20:20 +00:00
Bas Leijdekkers
e0045e4e0e [devkit] fix property choice format example in inspection description
GitOrigin-RevId: a972d9c8d014cfe953e2eaeb89bebb6115a4c3cf
2024-06-28 17:14:56 +00:00
Bas Leijdekkers
db923128c6 Java: take care to avoid calling a different method when converting static method to instance method (IDEA-275602)
GitOrigin-RevId: 644b0312256a7cd2859f18ba261bfc83addfb672
2024-06-28 17:14:56 +00:00
Bas Leijdekkers
a17097bea4 Java: no "this/new ClassName()" option for enums and implicit classes (IDEA-330992)
for "Convert to Instance Method" refactoring

GitOrigin-RevId: a353f19d817616c5445da3f7c60aa0a2f46ec155
2024-06-28 17:14:56 +00:00
Bas Leijdekkers
fb700afa0e Java: don't warn about infinite recursion on red code
GitOrigin-RevId: b136b315a1213d2526581b7281bbc81161dfb57e
2024-06-28 17:14:56 +00:00
Bas Leijdekkers
6916b6b005 Java: better error message when there are more arguments than parameters (IDEA-336129)
GitOrigin-RevId: a17a5f0f3878b9baf211737a614d1aa1a5103d31
2024-06-28 17:14:56 +00:00
Denis Zaichenko
ed3ae46a60 [vcs] Added call to ChangeListManagerImpl.update() before requesting the file history to fix flakiness of test.
GitOrigin-RevId: 8430181eb5c59a9afc9a2e2466f207e872561210
2024-06-28 17:14:03 +00:00
Nikolay Chashnikov
dbe582ee4c [jps model] cache contents of loaded files when using the new implementation (IJPL-409)
Unlike the old implementation, the new one may call JpsComponentLoader.loadComponent multiple times for the same file, so it's better to cache content to speed up loading.

GitOrigin-RevId: 4c3630f24bdcb8740ef5cd3ba6d414febb0f9d77
2024-06-28 17:05:01 +00:00
Nikolay Chashnikov
55fb09873d [jps model] refactoring: extract and reuse JpsComponentLoader.loadComponent method
GitOrigin-RevId: 907421fa095075d727feb207538340cf41e4dcd6
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
2e8cb4a8e1 [jps model] fix loading attributes of iml root tag in the new implementation (IJPL-409)
The workspace model uses configurationStore API to load data, and there attributes of the root tag are represented as options in an artificial DeprecatedModuleOptionManager component.

GitOrigin-RevId: 2a0a197e8f41c491d5b9ffd9f707a9e2315f1301
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
2d8fcf9a99 [jps model tests] sort modules in modules.xml file used in JpsMavenModuleSerializationTest
Production code sorts modules before saving. Also, this is needed to simplify testing loading in the new implementation of JPS model (IJPL-409).

GitOrigin-RevId: 9ebf7519a32dfea2d048181ae5f6db323622d55f
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
c0393d751a [jps model] support loading project and module components in the new implementation (IJPL-409)
Data which is present in the workspace model is taken from it, other components are loaded from xml files as before.

GitOrigin-RevId: 368e2b15aa055bc3489fb944c334379f10f2725e
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
c6681283f6 [jps model tests] add runtime dependency on 'intellij.platform.workspace.jps' module in jps tests
This is needed to allow checking the new implementation (IJPL-409) using the old tests.

GitOrigin-RevId: c276d565e0d944a0d2f376db9178200b5add679a
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
ac5b260e40 [jps model tests] adapt test for invalid project configurations to the new implementation (IJPL-409)
The new implementation based on the workspace model behaves slightly differently for some projects with invalid configurations, tests should tolerate this.

GitOrigin-RevId: fa5a7c888aa60ff27507bff3b9a05fc3d68ececc
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
8b44a792d5 [project model] cleanup: mark the parameter of UnloadedModulesNameHolder.isUnloaded as not-null
And fix cases where null was actually passed. Before, it was easy to forget to check it for null in the implementations.

GitOrigin-RevId: 72b7bf041e873f40ef95db97e897e628a714f756
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
e8846f629c [jps model] support loading generic facets entities in the new implementation (IJPL-409)
GitOrigin-RevId: 6e79f0a4e191ae81254a185c16e6e092f6fc73c4
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
be1e0dfa61 [jps model] fix loading run configurations in the new implementation (IJPL-409)
GitOrigin-RevId: 27cdf2778e54cb115731f143f900c5d8f977d3cc
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
a35167f7d0 [jps model] return modules in sorted order in the new implementation (IJPL-409)
Modules are sorted in the modules.xml file, but entities may be added in arbitrary order due to concurrent loading. So they should be sorted during conversion to JPS model for consistency with the old implementation and have stable behavior in the build process.

GitOrigin-RevId: 1e12f2930f702b80b089985d8e91cee03da10292
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
f1f084f62d [jps model] don't fail with exception in the new implementation if an invalid language level is specified in iml (IJPL-409)
GitOrigin-RevId: 8688952a1c27d07e1414ebf1afc1cf6b702c0921
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
91c91604a5 [jps model] fix resolving module references in the new implementation (IJPL-409)
GitOrigin-RevId: 0d003f25bc180690818a0c6b8c0024c69d856bc4
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
d1c0fa3d3b [jps model] use production output instead of test output if the latter isn't specified in the new implementation of JPS Model (IJPL-409)
This is needed for consistency with the old implementation.

GitOrigin-RevId: 4ad386e6c55e1b25459cb542cbc2e8c1dd7f1f44
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
bafd0db912 [jps model tests] add tests on module paths in JpsProjectSerializationTest
GitOrigin-RevId: e889e6cffc4f00b0655e01c33a317724ff170298
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
bdcbfa2f00 [jps model tests] sort modules in testModuleProperties.ipr
Production code sorts modules before saving. Also, this is needed to simplify testing loading in the new implementation of JPS model (IJPL-409).

GitOrigin-RevId: f540342b831bf73cb0e717d51b92da323201edaf
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
a6554884e9 [jps model serialization] refactoring: pass externalConfigurationPath explicitly and use Path instead of String
This is needed to test loading external configuration in the new implementation of JPS model (IJPL-409) and to avoid conversions between Path and String.

JpsCompilerConfigurationTest changed to load the project configuration using JpsSerializationManager API and migrated to JUnit5.

GitOrigin-RevId: a9d85b2b8797cdecbc43c07339ad89511823d758
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
5730a1a367 [jps model] refactoring: extract code from JpsProjectLoader to JpsProjectConfigurationLoading
This is needed to reuse it for the new implementation of JPS model (IJPL-409).

GitOrigin-RevId: 510c9f53ac73ad2212de8af069a1e7bae299624f
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
1f2aea5493 [jps model] support TestModuleProperties and production-on-test dependencies in JpsModelBridge (IJPL-409)
GitOrigin-RevId: 0d4ba9e02e1880873fa6ffdca2b3a84b8935a962
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
fbcba43905 [jps tests] refactoring: rework jps serialization tests to use JpsSerializationManager API
JpsModelFromTestData utility is added which uses JpsSerializationManager instead of creating JpsModel and calling JpsProjectLoader directly. Tests are migrated to use it instead of extending JpsSerializationTestCase. This is needed to use these tests to verify the new implementation of JPS model serialization (IJPL-409). Also, the tests are migrated to JUnit 5.

GitOrigin-RevId: 874f0b01ea6ae5d31666b2dafb843052cc017024
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
c992e6c464 [jps model] refactoring: rename JpsProjectAdditionalData.projectJdkId to projectSdkId
GitOrigin-RevId: 4ab074c0c41edd62a262e91715dbf534ba430e11
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
c0bc5811fb [jps model] refactoring: replace inheritance from JpsLoaderBase by delegation and rename it to JpsComponentLoader
This is needed to refactor simplify JpsProjectLoader to allow reusing its code in the new implementation of the JPS model (IJPL-409).

GitOrigin-RevId: b88fb246454601489e7133df4b078e5e52f6da58
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
7669d82323 [workspace file index] API cleanup: remove unused obsolete methods which operate with VirtualFile (IJPL-156972)
GitOrigin-RevId: 145c357b28a10b9af95c314a24d3663cf7b922c9
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
395c030d98 [jps model] refactoring: move code which reads external data for compiler configuration to the corresponding serializer
JpsProjectExtensionWithExternalDataSerializer is introduced to support project components which may have data in the external storage. Code related to loading the compiler configuration is moved from JpsProjectLoader to JpsJavaCompilerConfigurationSerializer. This is needed to refactor JpsProjectLoader to allow reusing its code in the new implementation of the JPS model (IJPL-409).

GitOrigin-RevId: c0e64c02c49e4a451da9b9743c240227bd6465a4
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
1d2b8c2b86 [jps model] refactoring: pass the path to the external project configuration explicitly and write tests
This is needed to provide a new implementation of the JPS model (IJPL-409).

GitOrigin-RevId: 3f47fa027e5d36be36d97d99eecc60ee750dde15
2024-06-28 17:05:00 +00:00
Nikolay Chashnikov
45e78213a5 [project model] cleanup: delete unused UnloadedModuleDescriptionImpl class
GitOrigin-RevId: 37e2cdc8e6d5ca01a624b8d24772d3b3732f671c
2024-06-28 17:05:00 +00:00
Eugene Zhuravlev
9918b9e892 JPS: support java17 sealed classes in incremental analysis
GitOrigin-RevId: b444675d623ff5138bf596225d642d80f0244cbf
2024-06-28 16:57:48 +00:00
Egor Ushakov
14f97e2a1f [debugger] made DebuggerCommandImpl.action not abstract
GitOrigin-RevId: 7ba289df8f72fa586cc0916021e1ce98167f9bed
2024-06-28 16:57:34 +00:00
Egor Ushakov
aa2343c112 [debugger] restored async stack traces
GitOrigin-RevId: 379113ab94e0c16e70441caa3d56a0485cf0e465
2024-06-28 16:57:34 +00:00
Tagir Valeev
aa035a99ca [java-inspections] LambdaToAnonymousFix: tolerate incorrect state
It was not checked in the same RA that the state is correct
Fixes EA-1003038 - T: LambdaCanBeReplacedWithAnonymousInspection.doFix

GitOrigin-RevId: e53a448587e698a9984bf3bc25a7ac177d86be08
2024-06-28 16:52:24 +00:00
Tagir Valeev
f5c9f0b071 [config] OptionalIsPresent: zero-tolerance
GitOrigin-RevId: 20450b806e2a9edaa80508c8dd9444c9632e25c7
2024-06-28 16:52:24 +00:00
Tagir Valeev
59cbc76660 [config] IncorrectMessageFormat: zero-tolerance
GitOrigin-RevId: 101a70b83919a11fcb8a48bf35cf68f477d9cd2e
2024-06-28 16:52:24 +00:00
Tagir Valeev
0fc65e532b Remove unused messageFormat parameter
GitOrigin-RevId: 8322a90c6e49a74ac82ae508e6451e00b2803f8a
2024-06-28 16:52:24 +00:00
Tagir Valeev
229eff0461 Raw type and other warnings fixed
GitOrigin-RevId: cde52de8987d2a995c4d2861f3b77356d79f3dd4
2024-06-28 16:52:24 +00:00
Tagir Valeev
1b6bc7105c [platform-util] StdXMLReader: do not ignore result of read()
GitOrigin-RevId: 7c2164a5605ade30a3df4cc4ad844f915a9c94e4
2024-06-28 16:52:24 +00:00
Tagir Valeev
d2177f606e Fix suppress "Result of method call ignored" warnings
GitOrigin-RevId: 51a28c31aa5cd6a2c6b724107c72e96591af17f0
2024-06-28 16:52:24 +00:00
Iurii Akatov
8bda82a643 ML4SE-708 Bundle plugin with IDEA Nightly
no space check, checkbox only for jb logins

bundle to nightly


Merge-request: IJ-MR-136370
Merged-by: Iurii Akatov <Iurii.Akatov@jetbrains.com>

GitOrigin-RevId: 8d4e8876fa8ceb42e24286d7dd39fef86725fff8
2024-06-28 16:42:10 +00:00
Konstantin Hudyakov
e5f50bf1cd [terminal] IJPL-156325 Update prompt style selector in the context menu of the prompt
From now, it will be a nested menu with three options.

GitOrigin-RevId: 7034ce83c4434ecc5f04e7e4e1304a236f09a0f9
2024-06-28 16:14:15 +00:00
Konstantin Hudyakov
d10b7566b1 [terminal] IJPL-156325 Update prompt style selector in the Terminal settings
Rework it to be based on radio buttons and add the 3rd option - single-line prompt.

GitOrigin-RevId: 9fa9ba9ad2867c3be85cfb50bf4b659b1f9cd821
2024-06-28 16:14:09 +00:00
Konstantin Hudyakov
075c3b2abc [terminal] IJPL-156325 Add single line option to prompt style enum and use it to create single line prompt
GitOrigin-RevId: a4170bfc4423c6669ad8dd888a277739ef1c0fcc
2024-06-28 16:14:03 +00:00
Konstantin Hudyakov
61d985164b [terminal] IJPL-156325 Refactor: use enum for storing prompt style setting and extract it to the separate service
Enum is more suitable here since we plan to add the 3rd option - single line prompt.
Also, it is worth extracting this setting to the separate PersistentStateComponent just to not mix the New Terminal settings with the classic ones.
Migration of the existing `useShellPrompt` setting is provided. So, if the user enabled the Shell prompt before this change, it will be still enabled after this change. In a release, we will be able to remove the old setting.

GitOrigin-RevId: 66cc0ae31f9932166ef4b43bf1b02c70f4b1954e
2024-06-28 16:13:58 +00:00