Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
B Language Server
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
B Language Server
Commits
ab37ec4d
Commit
ab37ec4d
authored
4 years ago
by
SeeBasTStick
Browse files
Options
Downloads
Patches
Plain Diff
cleaning up unused code
parent
d79ccdd9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/kotlin/b/language/server/proBMangement/probCli/ProBCommandLineAccess.kt
+1
-50
1 addition, 50 deletions
...age/server/proBMangement/probCli/ProBCommandLineAccess.kt
with
1 addition
and
50 deletions
src/main/kotlin/b/language/server/proBMangement/probCli/ProBCommandLineAccess.kt
+
1
−
50
View file @
ab37ec4d
...
...
@@ -70,6 +70,7 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte
"PERFORMANCE_INFO"
//voiding stdout and stderr
val
outputSink
=
if
(
System
.
getProperty
(
"os.name"
).
toLowerCase
().
contains
(
"win"
)){
File
(
"NUL"
)
}
else
{
...
...
@@ -156,16 +157,6 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte
val
process
:
Process
=
command
.
start
()
//just void error and output
communicator
.
sendDebugMessage
(
"clearing input stream"
,
MessageType
.
Info
)
readAndVoid
(
process
.
inputStream
)
communicator
.
sendDebugMessage
(
"clearing error stream"
,
MessageType
.
Info
)
readAndVoid
(
process
.
errorStream
)
communicator
.
sendDebugMessage
(
"waiting for process to return"
,
MessageType
.
Info
)
// process.waitFor() //we must wait here to ensure correct behavior when reading an error
...
...
@@ -174,46 +165,6 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte
}
private
fun
readAndVoid
(
stream
:
InputStream
)
{
stream
.
readAllBytes
()
}
private
fun
readFromStream
(
stream
:
InputStream
)
:
String
{
return
""
// stream.readAllBytes()
/* val reader = BufferedReader(InputStreamReader(stream))
val builder = StringBuilder()
var line: String?
var currentLine = reader.readLine()
while (currentLine != null){
communicator.sendDebugMessage("current line $currentLine", MessageType.Info)
communicator.sendDebugMessage("reading next line ", MessageType.Info)
currentLine = reader.readLine()
communicator.sendDebugMessage("checking line", MessageType.Info)
}
*/
/*
while (reader.readLine().also { line = it } != null) {
communicator.sendDebugMessage("read line", MessageType.Info)
builder.append(line)
builder.append(System.getProperty("line.separator"))
communicator.sendDebugMessage("Line Contains, $line and ${line!!.length} symboles", MessageType.Info)
}
communicator.sendDebugMessage("returning", MessageType.Info)
*/
// return builder.toString()
}
/**
* Reads the errors and transforms them to java objects
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment