Commit Graph

1725 Commits

Author SHA1 Message Date
Nikita Katkov
a30592e62a [json] Specify platform module dependency in plugin.xml
GitOrigin-RevId: 47d488bc34e2467e98cf4db7021e9e6c7c258f67
2024-09-16 00:21:06 +00:00
Maxim.Kolmakov
c6d31a553c Remove @HardwareAgentRequired annotation
All Perf Unit tests are run on the hardware agents to ensure stability of the metrics.
So the annotation is not needed anymore and it doesn't work on JUnit5 tests so the same test is run twice and since test execution time depends on the bucketing, metrics are jumping.

GitOrigin-RevId: fc83a368447d09d6ad1b269c88fe4f6c79067a91
2024-09-13 15:28:16 +00:00
Nikita Katkov
e1c5798abc [json] IJPL-160634 Fix accidentally broken json schema mapping persisting
Historically, we store enum's string representation inside the json mappings state. In turn, the string is assembled from a message bundle line used in several places across the project. Changing this line broke the deserialization process.

To preserve backward compatibility, we intentionally continue using the same approach, but provide a converter capable of reading the schema version tag both in new and in old formats

GitOrigin-RevId: 8813740318ede3c9bc5656ee46c847059760e3c5
2024-09-11 21:32:42 +00:00
Nikita Katkov
305f58f0b5 [json] IJPL-159355 Implement custom settings provider required method
GitOrigin-RevId: 595ec1a27d6b98aeae0e94f83a6dd13eecd7cc56
2024-09-11 15:07:40 +00:00
Nikita Katkov
e8ca887433 [json + remdev] Duplicate extensions declarations in frontend and backend plugin descriptors until required modules are not implemented
GitOrigin-RevId: 853513a6223517b7a47d3e4a8b5ac1c16d932d40
2024-09-11 15:07:40 +00:00
Nikita Katkov
62b18f6f3f [json] IJPL-159355 Dynamically disable editor-related extensions that can not be disabled via split mode-specific API
GitOrigin-RevId: 6a65082ad8d157d45b7fdcba3fad2aba3b10698b
2024-09-11 15:07:40 +00:00
Nikita Katkov
c8a120de43 [json] IJPL-159355 Moved json formatter and code style settings to shared module & enabled code style settings sync between frontend and backend
GitOrigin-RevId: ee9fe29775579100255429c8503e1f4a83fb564e
2024-09-11 15:07:39 +00:00
Nikita Katkov
b18d236ef7 [json] IJPL-159355 Moved json string literal annotator to split module
GitOrigin-RevId: f119206ee4f328a1a090fdb4d5e6d55219137f76
2024-09-11 15:07:39 +00:00
Nikita Katkov
a8e5342b17 [json] IJPL-159354 Removed nonexisting source root
GitOrigin-RevId: d251e4c97c131d58af7fa1caa29c4a35e6b28ce5
2024-09-11 15:07:39 +00:00
Nikita Katkov
95d0180339 [json] IJPL-159355 Update plugin layout: include frontend jar into the monolith plugin
GitOrigin-RevId: 72eea76db6ce02276237b59e8e24038d9da6ea2a
2024-09-11 15:07:39 +00:00
Nikita Katkov
1d3e672957 [json] IJPL-159355 Plugin descriptor simplification
GitOrigin-RevId: 9cffcdaaf64c6a8b578a3901b6345f93255a98de
2024-09-11 15:07:39 +00:00
Nikita Katkov
4ba1d4aa65 [remdev + json] IJPL-159355 Moved editor-related features to shared module to reuse in split mode
GitOrigin-RevId: 52c77f48f13f763f6799bae96a540cadef05bf07
2024-09-11 15:07:39 +00:00
Nikita Katkov
7f9fd1d9ed [remdev + json] IJPL-159355 Adjust plugin content layout
GitOrigin-RevId: b8d26c58fb72a7fd1af14685890ab91242c0484d
2024-09-11 15:07:39 +00:00
Nikita Katkov
a74ffa0e10 [remdev + json] IJPL-159355 Move shared classes and extensions to the new json.split module
GitOrigin-RevId: 591c01c811152497a6cf8182207e364029d74375
2024-09-11 15:07:39 +00:00
Nikita Katkov
1059d63e64 [remdev + json] IJPL-159355 Introduce json.split shared module for both frontend and monolith IDE plugins
GitOrigin-RevId: 24fa5e237a2bb74a5dd50be268e1c3fa616dc100
2024-09-11 15:07:39 +00:00
Piotr Tomiak
ffab6232c6 WEB-69157 JSON: optimize JsonPsiImplUtils.getName
GitOrigin-RevId: ef881215a448da0b848a0ea08cbb7acd7426a98d
2024-09-10 12:43:38 +00:00
Roman Shevchenko
a5666abead [project] pruning FileChooserDescriptor overrides (IJPL-150176 prerequisite)
`BrowseFolderRunnable` and `*WithBrowseButton` family: getting rid of separate "title" and "description" parameters in favor of the chooser descriptor object, to avoid cloning the latter down the road.

GitOrigin-RevId: 33ec5968a1db953c60848974135055c288accf85
2024-09-06 11:41:43 +00:00
Anton Lobov
ef0cd49c7c [json schema] improve the highlighting range and provide a typo quick fix for disallowed property inspection
GitOrigin-RevId: 11380194fc21750f07fde230dae6ad5b37362384
2024-08-21 18:52:53 +00:00
Anton Lobov
1f409fad17 [json schema] AMPER-932 Don't suggest duplicate enum values if parent array assumes unique items
GitOrigin-RevId: a0e471c3d086ea2a4234501f75bbe4792b15a3d1
2024-08-12 15:50:13 +00:00
Max Medvedev
c795cec244 IJPL-155874 Make most of the spellchecking strategies dumb aware
If you see any problems with your spellchecking strategy, please feel free to remove DumbAware from it. Or, you can make it dumb-aware by avoiding using indexes in dumb mode

The only strategies that are not DumbAware at the moment are:
- JavaSpellcheckingStrategy
- JSSpellCheckingStrategy

GitOrigin-RevId: 74781cf1ebd9b58669396bf7b1c03a839019f12b
2024-08-09 20:25:06 +00:00
Liubov Afanaseva
3ed8dc3cee FUS: increased "json.schema" version
GitOrigin-RevId: 8c161501b093bd332d73b5c8eb3020c449430d1b
2024-08-08 10:45:56 +00:00
Vladimir Krivosheev
a259c55960 add new content reports
GitOrigin-RevId: 0eab2825fccd798d52a354cd6e2ce254a5b8365c
2024-08-08 08:45:51 +00:00
Nikita Katkov
8d2c779293 [json] IJPL-159354 Specify action text via its id
GitOrigin-RevId: 4b9bab676afd8512f71d07501d791709c9aeb1d7
2024-08-06 21:52:26 +00:00
Nikita Katkov
4e185c87f9 [json] IJPL-159354 Removed JSON module from the platform layout in favor of bundled JSON plugin
GitOrigin-RevId: 944b1fdad9394c3228832dd769fba5bf29fae298
2024-08-06 21:52:26 +00:00
Nikita Katkov
28b1da45c2 [json] IJPL-159354 Unbundle JSON plugin from the platform
- JSON becomes a true plugin instead of a bundled module.
- New plugin's ID is intentionally set equal to the old module name so that external dependent plugins would not face difficulties migrating to the new layout.
- All discovered internal plugins that implicitly depended on the JSON module currently unconditionally depend on the plugin.
- Consider extracting optional modules in a subset of affected plugins: spring.boot, intellij.yaml, intellij.java
- Consider testing the following IDEs that bundle JSON extension using xml:include: writerside, rider
- Refactor PlatformLangXmlPlugin to avoid api breakages

GitOrigin-RevId: 7d92b0c5905154c4f6f25d55f3246e79da79e278
2024-08-06 21:52:25 +00:00
Yuriy Artamonov
4dac328bf4 [i18n] IJPL-158521 Fix more ellipsis problems in plugins
GitOrigin-RevId: 981393c6f975e303847ca598b650fec8fe65d9bf
2024-07-30 16:35:51 +00:00
Nikita Katkov
ee3b909e5b [json] IJ-CR-140028 Consider previous validation results during annotations collections
GitOrigin-RevId: f40a43bb2d06ccaf51dc73027c9723da9ecd3afa
2024-07-24 12:21:13 +00:00
Nikita Kudrin
cdf91bf213 [benchmarks] Renaming PerformanceTest* => Benchmark*
GitOrigin-RevId: 9963b84d51e1062acc262a8d3d3de1409a708e3b
2024-07-23 18:20:01 +00:00
Nikita Katkov
18f22ce5c2 [json] IJPL-150342 Check whether a given schema virtual file is fully loaded or is not an HttpVirtualFile at all
GitOrigin-RevId: 31cb55be97e7ddfef0a36b4e691728cd911c725d
2024-07-16 22:17:19 +00:00
Nikita Katkov
b186257cb6 [json + swagger] IJPL-157229 Do not inherit unevaluated properties to avoid false positives
This validation has very limited support in the json plugin, it depends on the results of other validations, and must be applied only when IDE is really sure that the error exists. In case of complicated inherited schemas it should give up if any uncertainty occurs.

GitOrigin-RevId: 2ccc53306b27c114748d9a01ddedcd4636667bde
2024-07-16 00:37:45 +00:00
Nikita Katkov
2f872974b1 [json] IJPL-157229 Fix incorrect type validation for 2020 jscon schema
Unspecified type in the meta schema lead to treating many of the instance fields as either an object, or a boolean (as it is specified in the #meta schema node).

GitOrigin-RevId: 4c1441f161039eef502fd7e3e4b64295d04cffc3
2024-07-16 00:37:45 +00:00
Nikita Katkov
23fb60afd8 [json] IJPL-63554 Implemented fast exit for json schema validators
- If requested, validation will stop as soon as any error is found. This is extremelly important performance optimisation that plays well with the recenty introduced if-else branch computation. The number of calls to JsonSchemaResolver.isCorrect() increased dramatically, even more json-schema subsystem refactoring was demanded.

The existing API didn't assume any kind of laziness or cancellability. The refactoring is performed in a way to cause minimal number of changes in code and API. It'd be great to rewrite the entire validation code to sequence/analogs once and drop complicated JsonAnnotationsCollectionMode

GitOrigin-RevId: 4e62f7db76ed6b4071accbe1b80151c4b4664342
2024-07-16 00:37:45 +00:00
Nikita Katkov
9dbc5b0a65 [json] Provide pretty json schema node text in case the node is an object
Previously used asText() method always returns empty string for object nodes, which makes using the readChildNode(..) API inconvenient. Currently, we use pretty rendered string here

GitOrigin-RevId: 4c22553db897e371d6013f8dd8a7be2aa782c431
2024-07-11 18:12:41 +00:00
Nikita Katkov
32456fa0df [json] Fallback to minimal supported json schema version in case no version was chosen
GitOrigin-RevId: 1c621748cbfd29540493dcfb3c0a81cdbe2c58db
2024-07-09 18:13:44 +00:00
Nikita Katkov
d524aec751 [json] IJPL-157406 Fix presentable schema version name
GitOrigin-RevId: 6ad3686198090f9ac42d49e9e1fae73181d7abaa
2024-07-08 18:53:35 +00:00
Tagir Valeev
d263e30396 Remove raw types in PopupStep#onChosen inheritors
GitOrigin-RevId: df36f1a249ab4d87c2d10e3d39c27f0351298921
2024-07-08 16:18:24 +00:00
Tagir Valeev
31b989d0cd Apply 'Copy of existing static method body' fixes
GitOrigin-RevId: 139c1d45abf749d40ec4e1c9004b16dea0b3a954
2024-07-05 19:36:03 +00:00
Yuriy Artamonov
bec6b53104 [json] IJPL-157746 JsonLiteralAnnotator is not part of API
GitOrigin-RevId: d124a9cecb37054d446ff098b826c22a6a1117e9
2024-07-03 21:37:18 +00:00
Yann Cébron
4504284ed9 [various] plugin descriptors: suppress "Invalid extension point name" warnings
we can't change existing names in a backwards-compatible way

GitOrigin-RevId: 46f8980842d90dd1aae3ce5a9a32dfd4afc30735
2024-07-03 20:24:32 +00:00
Anton Lobov
d9b7362258 [amper] fix completion item filtering with nested completion
GitOrigin-RevId: 2236a915064d994515d49481245875d5d0ef38d2
2024-07-02 14:18:33 +00:00
Anton Lobov
a75baa1bc6 [amper] fix context computation for code completion
GitOrigin-RevId: 22ea2d183f02a70c09c616b361205d889e9f6844
2024-07-01 18:34:28 +00:00
Nikita Katkov
86e193d79f [json] IJPL-156923 Cache element validity against a particular schema node to avoid double computation
With the introduction of if-then-else resolve that selects a branch depending on a given instance file element, the number of calls to JsonSchemaResolver.isCorrect method increased significantly. It is expected, as any validation/reference contribution/other editor features require a resolved schema node.

Resolve results are cached on language modification tracker because with the instance file updates, a previously valid if-else branch might become invalid

GitOrigin-RevId: f197203a3c53a7c4e7c1d502faaff3d50a9451e3
2024-06-27 18:54:11 +00:00
Anton Lobov
c58f381025 [json schema] support adding arbitrary metadata to schema elements and use that facility in amper for filtering of completion items
GitOrigin-RevId: 34d3641afeb2c2d3e6932d33f1e3c091b76e2205
2024-06-26 13:35:22 +00:00
Nikita Katkov
c7ef524aae [json] IJPL-157032 Disabled merging test
To fix it, we should make MatchResult store schemas in a set to avoid equal objects from being present in the resolve result. But this for some reason breaks ancient anyOf validation. The related code seems really hard to debug, so the merging test is currently disabled. The corresponding change is reverted in the previous commit.

GitOrigin-RevId: 08e7fd02cb6556044c3a80863bd29fa1d770155f
2024-06-24 00:51:36 +00:00
Nikita Katkov
30eb459a35 Revert "[json] IJPL-157032 Prefer storing resolved tree nodes in a set to avoid processing the effective same branches multiple times"
This reverts commit 14f06c419ff394383dd974da36c34da91b8c488a.

The change in the MatchResult cannot be used so far because ancient allOf/anyOf resolve relies on having several equal-by-pointer json schema objects in a collection.

GitOrigin-RevId: 48bda04351f25fd783d1e051bf61115876e0739e
2024-06-24 00:51:36 +00:00
Nikita Katkov
f587af6ada [json] IJPL-157032 Do not inherit required properties
Validation-related methods should not be inherited, only the methods providing access to the parent node should. Example: getPropertyByName

The reason: currently, every property step involves inheriting a parent's schema -> might result in incorrect validations applied to child nodes. A better fix would be to introduce inheritance strategy and inherit different options for if-then, one/any/allOf and other cases. See JsonSchema2020FeaturesTest#test adjacent if-then completion and comment for an example

GitOrigin-RevId: 3c3b790a2ee07529d7671a4f3d3866981926d75d
2024-06-24 00:51:36 +00:00
Nikita Katkov
b1d33aaa24 [json] IJPL-157032 Prefer storing resolved tree nodes in a set to avoid processing the effective same branches multiple times
GitOrigin-RevId: bc3af9a831c28cf6b9d9c7f46a1756987e90ef0a
2024-06-24 00:51:36 +00:00
Nikita Katkov
14c0629620 [json] IJPL-157032 Do not inherit hasPatternProperties check, they seem to be bound to the exact location
GitOrigin-RevId: 94cc427817cc74fe1b56ad20c5d5bc954b4471b1
2024-06-24 00:51:36 +00:00
Nikita Katkov
5723d5b61e [json] IJPL-157032 Do not forget to inherit schema objects in an array step just like in a property step
GitOrigin-RevId: 73ad3d09da2ffbeec94a6b1ce0bd77a242b4bdee
2024-06-24 00:51:36 +00:00
Nikita Katkov
962b3cc353 [json] IJPL-157032 Removed excessive inheritance from reference resolver
The resolved object will anyway be associated with the referenceOwner later during the propertyStep() method execution. There is no need to nest two inherited objects inside each other for no reason

GitOrigin-RevId: 8c1a9820d1e1eb976a2888998a44462287b309af
2024-06-24 00:51:36 +00:00