Skip to content

Commit 247f27f

Browse files
committed
LanguageHostConnectionManager: get rid of redundant parameter
1 parent a671c7b commit 247f27f

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/EditorServicesLanguageHostStarter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ open class EditorServicesLanguageHostStarter(protected val myProject: Project) :
193193
return file
194194
}
195195

196-
override fun createProcess(project: Project, command: List<String>, environment: Map<String, String>?): Process {
196+
override fun createProcess(command: List<String>, environment: Map<String, String>?): Process {
197197
return GeneralCommandLine(command)
198198
.withEnvironment(environment)
199199
.createProcess()
@@ -275,7 +275,7 @@ open class EditorServicesLanguageHostStarter(protected val myProject: Project) :
275275
cachedPowerShellExtensionDir = null
276276
cachedEditorServicesModuleVersion = null
277277
val commandLine = buildCommandLine()
278-
val process = createProcess(myProject, commandLine, mapOf(INTELLIJ_POWERSHELL_PARENT_PID to ProcessHandle.current().pid().toString()))
278+
val process = createProcess(commandLine, mapOf(INTELLIJ_POWERSHELL_PARENT_PID to ProcessHandle.current().pid().toString()))
279279
val pid: Long = getProcessID(process)
280280
processOutput(
281281
process,
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.intellij.plugin.powershell.lang.lsp.languagehost
22

3-
import com.intellij.openapi.project.Project
43
import java.io.InputStream
54
import java.io.OutputStream
65

@@ -9,7 +8,7 @@ interface LanguageHostConnectionManager {
98
fun closeConnection()
109
fun isConnected(): Boolean
1110
fun getProcess(): Process?
12-
fun createProcess(project: Project, command: List<String>, environment: Map<String, String>?): Process
11+
fun createProcess(command: List<String>, environment: Map<String, String>?): Process
1312
fun connectServer(server: LanguageServerEndpoint) {}
1413
fun useConsoleRepl(): Boolean = false
1514
}

src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/terminal/PowerShellConsoleTerminalRunner.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class PowerShellConsoleTerminalRunner(project: Project) : EditorServicesLanguage
100100

101101
override fun getLogFileName(): String = "EditorServices-IJ-Console-${getSessionCount()}"
102102

103-
override fun createProcess(project: Project, command: List<String>, environment: Map<String, String>?): PtyProcess {
103+
override fun createProcess(command: List<String>, environment: Map<String, String>?): PtyProcess {
104104
LOG.info("Language server starting... exe: '$command'")
105105
val process = createPtyProcess(myProject, command.toTypedArray(), environment)
106106
try {

0 commit comments

Comments
 (0)