Commit Graph

313 Commits

Author SHA1 Message Date
Boris Pristupa
0fd855f552 [fleet] terraform: update bundles.patch with new indentation rules
(cherry picked from commit 812388937fb4818abfb4b441908e7b78f2feb033)

FLEET-MR-2737

GitOrigin-RevId: 939437408c8a6934f7cbc1184f25db701f64675b
2023-08-11 11:37:35 +00:00
Boris Pristupa
37a580fe99 [fleet] terraform, FL-21088: add indentation rules
these are taken from VS Code documentation and allow indenting/dedenting on enter

they are not yet present in the vs code plugin this language configuration is taken from, so this solution requires either manual updating each time that plugin updates, or should be replaced with some other solution

(cherry picked from commit 77af558e37b0311cdd20a24759053f10944cb698)

FLEET-MR-2737

GitOrigin-RevId: 9137aa5bf0524d6f68b675c8f96af32e2be06cad
2023-08-11 11:37:25 +00:00
Alexander Zolotov
7f3e9666c6 [textmate] fix visibility scope of parsing node
GitOrigin-RevId: e29359b50edd16302345713d2bcb95b187c520e9
2023-08-02 10:56:28 +00:00
Alexander Zolotov
2650f566a1 [textmate] fix selector priority parsing
GitOrigin-RevId: 19a8f94fb6501b552b69a3118f7400c688c22786
2023-08-02 10:56:25 +00:00
Alexander Zolotov
6ae6254a15 [textmate] restore functionality of deprecated methods (IDEA-327045)
GitOrigin-RevId: d4f6e31fb60bc9310698207f866c97ca28d428e7
2023-08-01 17:50:26 +00:00
Alexander Zolotov
274e0b3e9b [textmate] do not lose bundle name from the loading context (IDEA-326758)
GitOrigin-RevId: e614e81669a92b7c0f9889d21ebf4486a9fd2462
2023-07-31 21:10:22 +00:00
Alexander Zolotov
2ea935cfb5 [textmate] adjust notification messages
GitOrigin-RevId: 3c34fe69de96e003f15e314ab5113efdd7c02d89
2023-07-31 21:10:20 +00:00
Alexander Zolotov
180d8ed091 [textmate] catch all exceptions while loading bundle resources
GitOrigin-RevId: 1ab9869a002678ea4fb629abbf935f66ff44b4e3
2023-07-30 16:25:36 +00:00
Alexander Zolotov
91542cb650 [textmate] adjust getScopeName contract. hotfix for (IDEA-326394)
Generally, it's fine for grammar to not have a scope name, clients should be ready for that.
Likely the real reason is hidden behind resource loader, it's going to be propagated in futher changes

GitOrigin-RevId: 1512971574c40df1e6df670663063d94395b5438
2023-07-30 16:25:33 +00:00
Boris Pristupa
c9aea0f7ce [fleet] terraform: update textmate terraform syntax version to 0.4.2
(cherry picked from commit c6f84e924c815c7cd8665a6672e6ad461cf0d3a5)

FLEET-MR-2623

GitOrigin-RevId: 2cf7d37c3e475b0808282d215b44f578a261d3fb
2023-07-18 13:40:48 +00:00
Alexander Zolotov
0021ec8992 [textmate] fix case-insensitivity match for filename-like matcher (IDEA-251228)
Groovy bundle defines `Jenkins` filename match

GitOrigin-RevId: 29f5103c8293bba73ec2fee3fe7c4ba9464640a6
2023-07-14 10:27:15 +00:00
Vladimir Lagunov
66382621b6 Prevent flaky shared indexes build failures due to thread pool starvation
Look at the snippet below:
```
val initializationJob = scope.launch {
  bundlePaths.map { bundlePath ->
    launch(Dispatchers.IO) {
      print("hello world")
    }
  }
}
```

The pitfall is that initially it starts a coroutine in the default thread pool, which has a hard limit of concurrently launched tasks. Only when there is a free thread, the coroutine launches and schedules new coroutines in another, unlimited thread pool from Dispatchers.IO.

This becomes more dangerous when this asynchronous approach is combined with blocking approach. Here, `ProgressIndicatorUtils.awaitWithCheckCanceled(initializationJob.asCompletableFuture())` can be executed in a thread from the very same limited thread pool, increasing the probability of thread starvation.

GitOrigin-RevId: b9e7f765547ca8199ab32b9df35b7b6b60712166
2023-07-07 18:07:18 +00:00
Alexander Zolotov
77f9e07004 [fleet] use array-like declaration for plugin classpath
GitOrigin-RevId: 6c6775fc08e377d128a700eb000f83aee96dee17
2023-06-26 15:07:16 +00:00
Daniil Ovchinnikov
97f0a7fd3b migrate usages of ModalityState.NON_MODAL to ModalityState.nonModal
GitOrigin-RevId: fb4855bfa90dbf384fed24871e4b28ab803847bb
2023-06-09 21:58:50 +00:00
Yann Cébron
953d0e8728 [textmate] TextMateFileType.TextMateFileDetector: fix modifiers
GitOrigin-RevId: cca4b4b319164ea92d3be14dbdcf5f358d8c6b3f
2023-06-06 10:03:09 +00:00
Konstantin Nisht
a38984b7c5 [textmate] Ignore exception in RegexFacade
The origin of it is incorrect handling of non-ascii characters by joni. In some places the index is incremented by 1, where it should be incremented by the length of the code point.
Normally this exception should not happen, so once the library fixes it, the catch can be removed.

GitOrigin-RevId: b2749a934c380bf6f0d0debb7cac1d6785edf81e
2023-06-04 11:54:08 +00:00
Vladimir Krivosheev
ab7ca74474 Improve TextMate bundle registration and refactor code
Update TextMate bundle registration to run in parallel using kotlinx.coroutines to improve performance. Also refactor variable and method names for better readability and consistency.

The changes in this commit:
- Replace some of the imports in the bundlesLoader.kt to better suit the updated implementation.
- Modify the registerBundlesInParallel function to run the registration tasks in parallel using kotlinx.coroutines.
- Change the TextMateServiceImpl.java variable and method names for better readability and consistency.
- Update TextMateService.java and TextMateEditorUtils.java to use the refactored names.
- Update TextMateCustomLiveTemplate.java to use the refactored snippet registry name.

GitOrigin-RevId: 849b65da8ba899ca959dc196bf974f1e941c18ff
2023-06-03 09:56:19 +00:00
Nikolay Chashnikov
ba03149558 [textmate] API cleanup: remove unused deprecated API (IDEA-312594)
GitOrigin-RevId: acdd5e5650d547aa6243a48a06049c8e8ae7c02d
2023-05-15 13:57:09 +00:00
Alexander Zolotov
da3863dcaf [textmate] in case of embedded tokens, ignore parent scope while collecting text attribute keys (IDEA-271912)
GitOrigin-RevId: 53b8e85fe53ecb3653b7a35bfe9c6945c6f55374
2023-05-12 11:17:52 +00:00
Alexander Zolotov
0dec97da39 [textmate] do not load plist for grammar right away
in case of VSC bundles we have a lot of information, such as "fileNameMatchers" without it and can delay grammar loading

GitOrigin-RevId: f6a13ec024a2774f2af0773dc940231b7de6d537
2023-05-12 11:17:46 +00:00
Dmitry Batkovich
63c79dc5fa reduce synchronization points
GitOrigin-RevId: be78a289e028ba372da67c76ca1ccb2ee9d67cd8
2023-05-11 07:19:47 +00:00
Dmitry Batkovich
542db2b33a use synchronized list since SnippetsRegistryImpl can be accessed concurrently
GitOrigin-RevId: a75d98d3fe451b023162badb0b64eb8f60d4c9b5
2023-05-11 07:19:42 +00:00
Dennis Ushakov
6cd004ae4e [textmate] update bundles
GitOrigin-RevId: 6059c47ebb30c1d1a116b7aced31169c1e2323a3
2023-05-05 16:47:47 +00:00
Vladimir Krivosheev
227d75a1fc don't extend DynamicBundle
GitOrigin-RevId: 49cbebd629a92877dbeeffba8d97b0631fb9407e
2023-05-05 09:46:42 +00:00
Alexey Kudravtsev
90bc25d550 fix data race during parallel init
GitOrigin-RevId: 7bd916711dc2c31be6fd383f3e97dea40ce299aa
2023-04-21 11:50:16 +00:00
Dmitry Batkovich
bbf9ad0d2a use concurrent collection
GitOrigin-RevId: 0a095611720f2e7271decd1f65d9389b7c2980c8
2023-04-20 19:27:18 +00:00
Dmitry Batkovich
e0a8643aa4 load text mate bundles in parallel to speedup first file type detection (which usually happen on several threads simultaneously while scanning)
GitOrigin-RevId: ac425b6bcb175c26dbc584c5cb3639366a9bfbf7
2023-04-20 10:20:19 +00:00
Olga Strizhenko
cb7e74f4a4 WI-69749 TextMate file is not detected in diff view - fixTextMateFileType
GitOrigin-RevId: b9d2ffe20bbae3412eea876a2bc381f727a533cc
2023-04-14 15:12:36 +00:00
Alexander Zolotov
a42177c78c [textmate] rework textmate settings
- do not store enabled built-in bundles (IDEA-279427, IDEA-243584, IDEA-235637, IDEA-256584)
- do not show paths for built-in bundles on windows (IDEA-275447)
- make disabling built-in bundles settings roamable
- store user defined bundles and disabled built-in bundles in config directory in order to preserve them during IDE upgrade

GitOrigin-RevId: 5fb8849909c659f368897a907364a8f447b6355f
2023-03-28 14:10:45 +00:00
Alexander Zolotov
797e06b1ea Rename .java to .kt
GitOrigin-RevId: ad2fcbb63b871120a4ca6d6fbfb1a2e432578519
2023-03-28 14:10:42 +00:00
Alexander Zolotov
1b89058942 [textmate] always set up-to-date extensions mapping
GitOrigin-RevId: 9749829b035c5813cca4dfd5e29d11f0d93633fc
2023-03-28 14:10:39 +00:00
Alexander Zolotov
002fd4b38c [fleet] minor
GitOrigin-RevId: ae50e9e66b8c868fef60bba9fd898d3e3f131013
2023-03-20 20:20:01 +00:00
Alexander Zolotov
900c0ca178 [textmate] distinguish extension and filename matchers while detecting a file type
while detecting file type in injection try to use languageId as both matchers: as file name and as file extension

GitOrigin-RevId: 2ac6fbc6dd8f1bbde84858aa28737a7317ac6ebc
2023-03-20 20:19:51 +00:00
Alexander Zolotov
a0dc17e1e2 [textmate] fix incorrect matching using prefix
foo.bar shouldn't match foo.b

GitOrigin-RevId: 56a11300a788a4d3b2dc631b87ec0d1ec3014702
2023-03-16 15:51:06 +00:00
Vladimir Krivosheev
2f023150b3 avoid static BUNDLED_BUNDLES_PATH (easier debug, don't cache)
GitOrigin-RevId: 0841fd48f23c4458cac840f9603d73ab5e0cbd60
2023-03-10 17:11:26 +00:00
Alex Plate
7831465b92 Fix a missing return statement in textmate bundles
Related: [IDEA-314549]

GitOrigin-RevId: 1471a84026b44d1b4c7fcbdcc4d3f96753821d6c
2023-03-03 10:37:00 +00:00
Christian Ivicevic
22868d672c Add missing @NotNull annotations across implementations of MultipleLangCommentProvider
Merge-request: IJ-MR-103773
Merged-by: Christian Ivicevic <Christian.Ivicevic@jetbrains.com>

GitOrigin-RevId: 10d4517f1e489b1caec890e753eadc8cf0f5cf1d
2023-03-02 13:18:32 +00:00
Alex Plate
a07de5ad91 Refactoring ListSpeedSearch to avoid constructors with side effects
GitOrigin-RevId: e05b03e21df56892fbb79a0079e1c6957219d777
2023-03-01 19:28:27 +00:00
Daniel Below
7d2d8da949 [textmate] add CMake bundle
GitOrigin-RevId: c721ad84336640027b9b3c78a15ff1315521d294
2023-02-20 22:09:57 +00:00
Daniel Below
f626ee62a6 [textmate] update bundles
GitOrigin-RevId: c2483f0a584534aa60dbd9487baddd97a97f7c2e
2023-02-20 22:09:54 +00:00
Alexander Zolotov
29202ef8ba [textmate] catch exceptions while matching regex
GitOrigin-RevId: 2d589f888577674fc1dd3c7562a0b2f1391ece49
2023-01-25 15:34:11 +00:00
Alexander Zolotov
e3d5adb54d [textmate] allow overriding language name
GitOrigin-RevId: cfd6aeb8ebf3de8b2002fc04f7f0c346a6f3d457
2023-01-22 09:47:56 +00:00
Alexander Zolotov
b043e53094 [textmate] allow choosing directories that are detected as files on macOs (IDEA-298579)
GitOrigin-RevId: 9a3e14659d037db587ed776d6707372053886ebe
2023-01-19 18:51:30 +00:00
Alexander Zolotov
257973645d [textmate] reimplement bundles reading
- support different types of file name matchers
- more precise setting scope name for snippets and language configuration
- a way to implement custom plist content loader

GitOrigin-RevId: e03e682e60396ad5e9f207c9e4a647566d393cd5
2023-01-19 18:51:27 +00:00
Alexander Zolotov
a38498fda5 Rename .java to .kt
GitOrigin-RevId: 3e3b936cb6a7ace620e2ad2f00d89bc2a5093445
2023-01-19 18:51:23 +00:00
Alexander Zolotov
a14f8f6237 [textmate] cleanup documentation and arguments names
GitOrigin-RevId: 6f0397fcff677fc1fc4ab0b0ab848aea259e7115
2023-01-19 18:51:20 +00:00
Nikolay Chashnikov
325f45ce66 API cleanup: remove unused deprecated API (IDEA-305637)
GitOrigin-RevId: 9cc6eecfa40189d8d08c2861ffe9ffce84d31e87
2023-01-18 13:27:16 +00:00
Vladimir Krivosheev
57764d700b mark classes final
GitOrigin-RevId: 6414b6f2119c82c7567987dd30b35cab5491d9e2
2022-12-30 06:58:01 +00:00
Alexey Kudravtsev
da30b85943 remove usages of newHashSet in favor of immutable Set.of() or standard new HashSet()
GitOrigin-RevId: 8086ceb3525e58630d2fc5862bf047352332e791
2022-11-24 13:42:41 +00:00
Dennis Ushakov
59c5ea4452 Revert "[textmate] global injections should be used before local ones"
This reverts commit 58da4f01069ecbb737b7fefaa2cec2b8ccd2f3cc.

GitOrigin-RevId: c18f7012613945a850949fbc466d16d2bd5bf6d1
2022-11-23 13:38:29 +00:00