Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
00b060c1
Commit
00b060c1
authored
12 years ago
by
peter
Browse files
Options
Download
Email Patches
Plain Diff
[^maxmedvedev] trim groovyc's output (IDEA-94812)
parent
b9f00362
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/groovy/rt/src/org/jetbrains/jps/incremental/groovy/GroovycOSProcessHandler.java
+11
-2
...rains/jps/incremental/groovy/GroovycOSProcessHandler.java
with
11 additions
and
2 deletions
+11
-2
plugins/groovy/rt/src/org/jetbrains/jps/incremental/groovy/GroovycOSProcessHandler.java
+
11
-
2
View file @
00b060c1
...
...
@@ -23,6 +23,7 @@ import com.intellij.openapi.util.Key;
import
com.intellij.openapi.util.io.FileUtil
;
import
com.intellij.openapi.util.text.StringUtil
;
import
com.intellij.util.Consumer
;
import
com.intellij.util.Function
;
import
com.intellij.util.containers.ContainerUtil
;
import
org.jetbrains.annotations.Nullable
;
import
org.jetbrains.groovy.compiler.rt.GroovycRunner
;
...
...
@@ -101,7 +102,7 @@ public class GroovycOSProcessHandler extends BaseOSProcessHandler {
}
final
String
compiled
=
handleOutputBuffer
(
GroovycRunner
.
COMPILED_START
,
GroovycRunner
.
COMPILED_END
);
final
List
<
String
>
list
=
StringUtil
.
split
(
compiled
,
GroovycRunner
.
SEPARATOR
);
final
List
<
String
>
list
=
splitAndTrim
(
compiled
);
String
outputPath
=
list
.
get
(
0
);
String
sourceFile
=
list
.
get
(
1
);
...
...
@@ -121,7 +122,7 @@ public class GroovycOSProcessHandler extends BaseOSProcessHandler {
text
=
handleOutputBuffer
(
GroovycRunner
.
MESSAGES_START
,
GroovycRunner
.
MESSAGES_END
);
List
<
String
>
tokens
=
StringUtil
.
split
(
text
,
GroovycRunner
.
SEPARATOR
);
List
<
String
>
tokens
=
splitAndTrim
(
text
);
LOG
.
assertTrue
(
tokens
.
size
()
>
4
,
"Wrong number of output params"
);
String
category
=
tokens
.
get
(
0
);
...
...
@@ -154,6 +155,14 @@ public class GroovycOSProcessHandler extends BaseOSProcessHandler {
}
}
private
static
List
<
String
>
splitAndTrim
(
String
compiled
)
{
return
ContainerUtil
.
map
(
StringUtil
.
split
(
compiled
,
GroovycRunner
.
SEPARATOR
),
new
Function
<
String
,
String
>()
{
public
String
fun
(
String
s
)
{
return
s
.
trim
();
}
});
}
private
String
handleOutputBuffer
(
String
startMarker
,
String
endMarker
)
{
final
int
start
=
outputBuffer
.
indexOf
(
startMarker
);
final
int
end
=
outputBuffer
.
indexOf
(
endMarker
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment