Skip to content

Commit

Permalink
WEB-69746 Convert JSLanguageService* classes to Kotlin #4
Browse files Browse the repository at this point in the history
GitOrigin-RevId: f45194a745decb0896ebb00ced8a7d44b3996e93
  • Loading branch information
piotrtomiak authored and intellij-monorepo-bot committed Oct 22, 2024
1 parent 1ad1760 commit b12a402
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ internal class SvelteLanguageServiceProvider(project: Project) : JSLanguageServi
private val lspService by lazy(LazyThreadSafetyMode.PUBLICATION) { project.service<SvelteLspTypeScriptServiceWrapper>() }
private val tsService by lazy(LazyThreadSafetyMode.PUBLICATION) { project.service<SveltePluginTypeScriptServiceWrapper>() }

override fun getAllServices(): List<JSLanguageService> = listOf(lspService.service, tsService.service)
override val allServices: List<JSLanguageService>
get() = listOf(lspService.service, tsService.service)

override fun getService(file: VirtualFile): JSLanguageService? = allServices.firstOrNull { it.isAcceptable(file) }

Expand Down

0 comments on commit b12a402

Please sign in to comment.