Commit Graph

1491 Commits

Author SHA1 Message Date
Tagir Valeev
51854f80b3 "Method can be static" fix massive application
GitOrigin-RevId: ed296b85922a6814d5c6057b5cbc720f0c546e41
2023-10-20 19:12:56 +00:00
Yann Cébron
89e7280fbb [json] JsonLinesParserDefinition: cleanup
GitOrigin-RevId: b255ba7882f87b0cf326a0390d8c52c9e5aad7f2
2023-10-19 11:04:18 +00:00
Yann Cébron
4def9e307b [json] JsonLinesFileType: suppress irrelevant DevKit inspections
GitOrigin-RevId: 8654c7a3c3d1472173eafa9dc105276b6b9a2405
2023-10-19 11:04:14 +00:00
Daniil Ovchinnikov
c02e719798 IJPL-274 migrate tasks.kt functions' usages
GitOrigin-RevId: d11b1726a501df22853efabc37b3275e62e392ed
2023-10-18 23:33:12 +00:00
Andrey Cherkasov
965336c323 The "Incorrect service retrieving" inspection: cleanup
Merge-request: IJ-MR-116714
Merged-by: Andrey Cherkasov <Andrey.Cherkasov@jetbrains.com>

GitOrigin-RevId: b1d06c88028fc2248ab63c8522dc67d7e4fa2e60
2023-10-17 01:21:54 +00:00
Nikita Kudrin
5f15fa3f42 [test framework] AT-107 Adding dependency on intellij.tools.ide.metrics.benchmark to publish metrics
GitOrigin-RevId: aaeb67a13dab0038e8f8e8ec6ed7d683d4dfe5d3
2023-10-16 23:23:34 +00:00
wout.werkman
8155e4d5cb [DEFT-21][JsonSchema] Fix around caretModel bug
`caretModel.caretsAndSelections = caretModel.caretsAndSelections` actually changes the position of the caret inside the selection. Then Fleet removes the selection, which leaves the caret in a random position.

GitOrigin-RevId: 0f0073b0bc191ac27fdef1b1fabb012a54700c23
2023-09-28 16:21:02 +00:00
wout.werkman
81d8171b9e [IDEA-331564][JsonSchema] Improve documentation of JsonLikePsiWalker's indentOf function.
GitOrigin-RevId: 4088be632d3337280b19687a3a074a7c25f8ac51
2023-09-19 16:44:39 +00:00
wout.werkman
105c4a1fe8 [IDEA-331564][JsonSchema] Remove com.jetbrains.jsonSchema.extension.JsonLikePsiWalker.findChildBy
It is not the responsibility of PsiWalker, but of JsonValueAdapter. No need for implementers to re-implement that logic

GitOrigin-RevId: 57ffc13818f0061a8055668be5163519f1b8eaae
2023-09-19 16:44:36 +00:00
wout.werkman
25f0d7550b [IDEA-331564][JsonSchema] Improved documentation on applyChangesOrdered
GitOrigin-RevId: 9cc18563ee1198d6860c4153c21b93a3f20ab8bd
2023-09-19 16:44:32 +00:00
Yuriy Artamonov
c53774e2fc [inspections] IDEA-321711 Use optimized PsiElementVisitor implementations
GitOrigin-RevId: 18ebc32aec877f71cd185ee7072dd139c076e9a3
2023-09-16 15:18:22 +00:00
wout.werkman
3a442efa8b [IDEA-331564][JsonSchema] Changed tests to not care about expected completion variant order.
The current alphabetic ordering was annoying to use, and it didn't actually assert anything the user could see anyways.

GitOrigin-RevId: e5e95c5877e85a6f3fe05cd1ec26094734ef9dde
2023-09-12 14:45:34 +00:00
wout.werkman
beb535f524 [IDEA-331564][JsonSchema] Changed forgotten .yaml extension to .json
GitOrigin-RevId: 7ed5518ed4da4f64bc793fd2415846e4fe6e709d
2023-09-12 14:45:30 +00:00
wout.werkman
7819e14687 [IDEA-331564][JsonSchema] Made Yaml's nested completions assert completion variants by rendered text
It makes what you read in the tests closer to what the user experiences. Additionally, it also asserts the rendered behavior.

GitOrigin-RevId: e15be753a157945c988246db7bd3bd4473ce970c
2023-09-12 14:45:27 +00:00
Vladimir Krivosheev
c9d33eb3a0 cleanup - make final
GitOrigin-RevId: c008abde608d17db23b0164a8787c883688d834e
2023-09-12 00:24:39 +00:00
wout.werkman
31c9b04b18 [IDEA-331835][JsonSchema] Implemented smarter auto-completion for conditional properties
GitOrigin-RevId: eb256eb4088ba829b77bc8997f9778f3b45da150
2023-09-08 19:34:35 +00:00
wout.werkman
58f6c49ddb [IDEA-331835][Json Schema] Minor tests clean up
GitOrigin-RevId: 9152ee3d7c49a05b0d18d8b02d2ad6f2b4108c25
2023-09-08 19:34:32 +00:00
wout.werkman
16a91fc471 [IDEA-331835][Json] Renamed notRequired to optional in preparation of new changes
New changes will add logic for `{ "not": { "required": [ "name" ] } }`, which would sound too ambiguous with currently existing "notRequired" logic.

GitOrigin-RevId: 70a6fc5f9ae44798ceb7c5b97a5f270436c80310
2023-09-08 19:34:29 +00:00
wout.werkman
bd4b9a0a16 [IDEA-331564][JsonSchema] Ensure that nested completions public API is Experimental
We don't want external plugins to rely on nested completions before the API has been finalized

GitOrigin-RevId: 2f9d0a4e26fabad35e909a3dbba618b19d8cc383
2023-09-08 19:34:19 +00:00
wout.werkman
e1f4402d62 [IDEA-331564][JsonSchema] Prevent NestedCompletionsNode from leaking out of module.
GitOrigin-RevId: 84c4fe2a1021f99bf4525ddb7e83fb132f952603
2023-09-08 19:34:16 +00:00
wout.werkman
e5fb759cb3 [IDEA-331564][JsonSchema] Non-semantic improvements
GitOrigin-RevId: 3b6e2af0f363bbe9ceba3495e4e03f73ef0a6285
2023-09-08 19:34:09 +00:00
wout.werkman
356ea06063 [IDEA-331564][JsonSchema] Made completions insert at the bottom if the cursor was below the destination
GitOrigin-RevId: 8ef01d30ceeb440a67855c38cba68d492c855256
2023-09-08 19:34:06 +00:00
wout.werkman
7a9bbe37b2 [IDEA-331564][JsonSchema] Implemented regex matched isolated nodes for nested completions
GitOrigin-RevId: 9bf1cd36889a789a37bdc3e39c0010c8e0c383cf
2023-09-08 19:34:00 +00:00
wout.werkman
edce85de1e [IDEA-331564][JsonSchema] Implemented nested completions
GitOrigin-RevId: b12f614b5fc54c26d1717b5c24ae3fd699e67c05
2023-09-08 19:33:57 +00:00
wout.werkman
1187e422d2 [IDEA-331564][JsonSchema] Add extension point to allow plugins to alter JsonSchemaObjects for files.
GitOrigin-RevId: 9d53361d0a2491c7bec6a8ce620d1a687b69d71e
2023-09-08 19:33:54 +00:00
wout.werkman
b81cc0b971 [IDEA-331385][YAML] Hack fixed incorrect array format after completion.
Ideally this is solved in formatter. But fixing formatter (IDEA-331479) is a much more complicated fix to debug into.
I've added a test that will detect when someone fixes the formatter, then they can revert this commit.

GitOrigin-RevId: d70ec5cfca675a84e2b1d5b915ca07b4ae7dea92
2023-09-08 19:33:50 +00:00
Nicolay Mitropolsky
dbb9e11769 [yaml] IDEA-323117 Support for YAML Schema using $schama: and yaml-language-server comments
GitOrigin-RevId: c08a674116f465db810d52a113ff6fc6ed227fd5
2023-08-24 16:33:40 +00:00
Alexey Kudravtsev
3c1b319c67 deprecate stringMap in favor of immutable Map.of
GitOrigin-RevId: 58459b22fc23fb4567077437e8cdcaeea74fff07
2023-08-23 12:20:39 +00:00
Nikita Katkov
0b69ea7561 [http-client + json] IJ-CR-112452 Check for cached NULL_OBJECT to make sure that we have a useful value in cache
GitOrigin-RevId: 70b1c0b19ca7128c3c40c65c95647b2ac1a228ec
2023-08-22 17:15:22 +00:00
Nikita Katkov
b802b90971 [http-client + json] IJ-CR-112452 Prettify test code a bit
GitOrigin-RevId: c9af380f67bcd522ff3ad4edbfd1836adb45941a
2023-08-22 17:15:20 +00:00
Nikita Katkov
13507a9830 [http-client + json] IJ-CR-112452 Run intention under progress on bgt
GitOrigin-RevId: 6a246684ed0dd7a4297ff6b663d3f9eaeb1267df
2023-08-22 17:15:19 +00:00
Nikita Katkov
484139f706 [http-client + json] IJ-CR-112452 Prefer pointers outside R\A
GitOrigin-RevId: e0ca271bce415e5962a206ec4fa08627b1d2dec0
2023-08-22 17:15:17 +00:00
Andrei Efanov
7fd8f8c401 refactor: introduce NotNull annotations to BaseElementAtCaretIntentionAction methods
GitOrigin-RevId: 20fde7acc6856d13b67d52d6b4841dfbc158e652
2023-08-22 17:10:53 +00:00
Sergey Simonchik
224cfa336e json schema: do not acquire any locks in JsonSchemaServiceImpl$MyState.reset (IDEA-327761)
GitOrigin-RevId: 4f0791f7728069caa76779666662087cc405cd87
2023-08-15 23:23:34 +00:00
Nikita Katkov
098a641b4c [json] Chose first enum value as default instead of null
GitOrigin-RevId: d9e4057c05ab5150adf45b8630f4764d7ba16359
2023-08-15 18:49:04 +00:00
Nikita Katkov
9c49b47de2 [http-client + yaml + json] IJ-CR-112452 Review fixes
- Made intention preview available
- Merged subsequent read actions
- Made isAvailable work very fast
- Tried to set the same id to all commands to achieve single redo for the entire request, but that didn't work out yet

GitOrigin-RevId: 54f4a3458bb05d1a03729483a95b269fbf2875e0
2023-08-09 19:36:19 +00:00
Nikita Katkov
8eb846230d [json + yaml] IDEA-327166 Added ability to get default property value from the example field of a JSON-schema
Consider support of examples field as well, since they are both valid in the latest schema version

GitOrigin-RevId: cd65bc3c3bd19334fbf6ea42e545a8a349e9f236
2023-08-07 15:31:51 +00:00
Sergey Simonchik
3ad8036dc5 json schema: do not download more than once (IDEA-326243)
GitOrigin-RevId: dfa09021be44f12b5a741db76b59d0c3eae50e53
2023-08-07 10:30:36 +00:00
Sergey Simonchik
0c1089c818 json schema: simplify deadlock prevention by getting rid of NBRA (IJ-CR-112433)
Now, PCE is allowed to be cached. When PCE is fetched from the cache, it is ignored and the json schema is re-computed recursively (the recursion shouldn't happen more than once).
Thanks to Nicolay Mitropolsky for the idea!

GitOrigin-RevId: f662a8078396ee27c451d31c5297544a6d78a39d
2023-08-03 22:46:47 +00:00
Nikita Katkov
545c237944 [yaml + json] IDEA-324659 Tests
GitOrigin-RevId: 566f6223899f47e2bb8a04dc16c582020bf08d1d
2023-08-03 21:32:36 +00:00
Nikita Katkov
b1fe1055e2 [yaml + json] IDEA-324659 Enable add all known properties intention in yaml
The intention
- works with JSON schema
- reuses already existing syntax adapters
- inserts all known properties except those starting with $ sign (reference, schema, etc.)

GitOrigin-RevId: 2cbbae6e301436c9dfc1f5f53fab6b1fb59768e8
2023-08-03 21:32:33 +00:00
Nikita Katkov
7068d125fe [http-client + json] IDEA-324659 Return grouped properties to make possible to choose whether to generate only required or all of them
GitOrigin-RevId: 39c1da60a000424f4b1f5b9365d5b74615d57158
2023-08-02 23:06:56 +00:00
Nikita Katkov
78ed483ced [json] IDEA-324659 'Fill-in properties' intention introduced
It inserts all known properties from the corresponding JSON-schema into the JsonObject a caret is located in.

GitOrigin-RevId: a48ef273a059283d6fa34ad25f7c06f30e77798c
2023-08-02 23:06:50 +00:00
Nikita Katkov
7bb8f7e105 [json] IDEA-324659 Prepare json schema API for external use
Extract getDynamicSchema method to the service interface and change visibility modifier of the SchemaChecker to use them later in a dependent plugin

GitOrigin-RevId: a416fe20f3d5e7a2eca5c808b13b4061a8955f07
2023-08-02 23:06:40 +00:00
Sergey Simonchik
c04b75a044 json schema: fix deadlock when pending write action doesn't allow to complete NBRA and a thread with a read action awaits the NBRA result (WEB-62317)
GitOrigin-RevId: 34421a05832767f91a1d83628c941188afcc8d9f
2023-08-02 16:01:52 +00:00
Nikita Katkov
08b50249f6 [json + yaml] IDEA-257980 Adjust test data highlighting ranges
GitOrigin-RevId: 366ca407a02b409be80784ea872bd5a50a510651
2023-08-01 15:38:31 +00:00
Nikita Katkov
c667562a02 [json] IDEA-257980 Adjust highlighted text range in case a top level yaml mapping or json property has errors
To avoid having an entire file highlighted, we explicitly narrow the erroneous text range to the first child's one -> UX does not suffer much

GitOrigin-RevId: ef6b849fa1e57d26166415924f583ff6d4269c09
2023-08-01 15:38:21 +00:00
Anton Lobov
3f1673f5cf [json] update bundled json schemas and fix the update script to work without nashorn
fixes FL-20628 and alike

Merge-request: IJ-MR-111141

GitOrigin-RevId: ea78c18bca4a5059ff002e4690c7207c5438f174
2023-07-17 21:04:54 +00:00
Piotr Tomiak
1d3e210cc4 LexerTestCase: add missing @NotNull annotations to improve interoperability with Kotlin
GitOrigin-RevId: e98b6523585f4659687abca687c8b42618dfd8bc
2023-07-13 10:11:07 +00:00
Nikita Katkov
ed5da0da4a [json] ContentAwareJsonSchemaFileProvider is no more internal API
GitOrigin-RevId: 0e2dcc1a389e6a1733398788684e18890e5eac32
2023-07-04 15:44:13 +00:00