Skip to content

Commit f9b1f18

Browse files
tomblachutintellij-monorepo-bot
authored andcommitted
[ts] WEB-68026 introduce TypeScriptServerServiceImpl.serviceName
It's convenient to be able to use a single id across service, protocol and queue classes GitOrigin-RevId: 140942166aafe1e11e05f867961cde6625ebec0d
1 parent cadafd4 commit f9b1f18

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

Angular/src/org/angular2/lang/expr/service/Angular2TypeScriptService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import org.angular2.options.getAngularSettings
7070
import org.intellij.images.fileTypes.impl.SvgFileType
7171
import java.util.concurrent.Future
7272

73-
class Angular2TypeScriptService(project: Project) : TypeScriptServerServiceImpl(project, "Angular Console") {
73+
class Angular2TypeScriptService(project: Project) : TypeScriptServerServiceImpl(project, "Angular Console", "AngularService") {
7474

7575
override fun getProcessName(): String = "Angular TypeScript"
7676

@@ -156,7 +156,7 @@ class Angular2TypeScriptService(project: Project) : TypeScriptServerServiceImpl(
156156
isAngularTypeScriptServiceEnabled(myProject, context)
157157

158158
override fun createProtocol(tsServicePath: String): JSLanguageServiceProtocol =
159-
Angular2TypeScriptServiceProtocol(myProject, mySettings, createEventConsumer(), tsServicePath)
159+
Angular2TypeScriptServiceProtocol(myProject, mySettings, createEventConsumer(), serviceName, tsServicePath)
160160

161161
override fun createWidgetItem(currentFile: VirtualFile?): LanguageServiceWidgetItem =
162162
TypeScriptServiceWidgetItem(this, currentFile, AngularIcons.Angular2, AngularIcons.Angular2, AngularConfigurable::class.java)

Angular/src/org/angular2/lang/expr/service/protocol/Angular2TypeScriptServiceProtocol.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ import java.util.function.Consumer
1616
class Angular2TypeScriptServiceProtocol(project: Project,
1717
settings: TypeScriptCompilerSettings,
1818
eventConsumer: Consumer<in JSLanguageServiceAnswer>,
19+
serviceName: String,
1920
tsServicePath: String) :
20-
TypeScriptServiceStandardOutputProtocol(project, settings, eventConsumer, "AngularService", tsServicePath) {
21+
TypeScriptServiceStandardOutputProtocol(project, settings, eventConsumer, serviceName, tsServicePath) {
2122

2223
override fun createState(): TypeScriptServiceInitialStateObject {
2324
val state = super.createState()

vuejs/src/org/jetbrains/vuejs/lang/typescript/service/classic/VueClassicTypeScriptService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import org.jetbrains.vuejs.options.VueConfigurable
4646
*
4747
* Doesn't work properly with TypeScript 5+ and is known to have some bugs.
4848
*/
49-
class VueClassicTypeScriptService(project: Project) : TypeScriptServerServiceImpl(project, "Vue Console") {
49+
class VueClassicTypeScriptService(project: Project) : TypeScriptServerServiceImpl(project, "Vue Console", "VueService") {
5050

5151
override fun getProcessName(): String = "Vue TypeScript"
5252

@@ -64,7 +64,7 @@ class VueClassicTypeScriptService(project: Project) : TypeScriptServerServiceImp
6464
}
6565

6666
override fun createProtocol(tsServicePath: String): JSLanguageServiceProtocol {
67-
return VueTypeScriptServiceProtocol(myProject, mySettings, createEventConsumer(), tsServicePath)
67+
return VueTypeScriptServiceProtocol(myProject, mySettings, createEventConsumer(), serviceName, tsServicePath)
6868
}
6969

7070
override fun getInitialOpenCommands(): List<JSLanguageServiceSimpleCommand> {

vuejs/src/org/jetbrains/vuejs/lang/typescript/service/classic/VueTypeScriptServiceProtocol.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ internal class VueTypeScriptServiceProtocol(
1414
project: Project,
1515
settings: TypeScriptCompilerSettings,
1616
eventConsumer: Consumer<in JSLanguageServiceAnswer>,
17+
serviceName: String,
1718
tsServicePath: String,
18-
) : TypeScriptServiceStandardOutputProtocol(project, settings, eventConsumer, "VueService", tsServicePath) {
19+
) : TypeScriptServiceStandardOutputProtocol(project, settings, eventConsumer, serviceName, tsServicePath) {
1920

2021
override fun createState(): TypeScriptServiceInitialStateObject {
2122
val state = super.createState()

0 commit comments

Comments
 (0)