🚧 WIP on JetBrains indexing implementation
This commit is contained in:
parent
21ec5887b5
commit
5f4e8d0213
1 changed files with 30 additions and 0 deletions
|
|
@ -318,6 +318,36 @@ class IdeProtocolClient (
|
|||
"setSuggestionsLocked" -> {}
|
||||
"getSessionId" -> {}
|
||||
|
||||
// INDEXING //
|
||||
"getStats" -> {
|
||||
// TODO
|
||||
respond(null)
|
||||
}
|
||||
"getBranch" -> {
|
||||
// Get the current branch name
|
||||
val builder = ProcessBuilder("git", "rev-parse", "--abbrev-ref", "HEAD")
|
||||
builder.directory(File(workspacePath ?: "."))
|
||||
val process = builder.start()
|
||||
|
||||
val reader = BufferedReader(InputStreamReader(process.inputStream))
|
||||
val output = reader.readLine()
|
||||
process.waitFor()
|
||||
|
||||
respond(output)
|
||||
}
|
||||
"getRepoName" -> {
|
||||
// Get the current repository name
|
||||
val builder = ProcessBuilder("git", "config", "--get", "remote.origin.url")
|
||||
builder.directory(File(workspacePath ?: "."))
|
||||
val process = builder.start()
|
||||
|
||||
val reader = BufferedReader(InputStreamReader(process.inputStream))
|
||||
val output = reader.readLine()
|
||||
process.waitFor()
|
||||
|
||||
respond(output)
|
||||
}
|
||||
|
||||
// NEW //
|
||||
"getDiff" -> {
|
||||
val builder = ProcessBuilder("git", "diff")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue