aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/RenderScriptProcessor.java
diff options
context:
space:
mode:
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/RenderScriptProcessor.java')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/RenderScriptProcessor.java55
1 files changed, 33 insertions, 22 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/RenderScriptProcessor.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/RenderScriptProcessor.java
index a400239..3fc7b07 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/RenderScriptProcessor.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/RenderScriptProcessor.java
@@ -245,32 +245,43 @@ public class RenderScriptProcessor extends SourceProcessor {
Process p = Runtime.getRuntime().exec(command);
// list to store each line of stderr
- ArrayList<String> results = new ArrayList<String>();
+ ArrayList<String> stdErr = new ArrayList<String>();
// get the output and return code from the process
- int result = BuildHelper.grabProcessOutput(project, p, results);
-
- // attempt to parse the error output
- boolean error = parseLlvmOutput(results);
-
- // If the process failed and we couldn't parse the output
- // we print a message, mark the project and exit
- if (result != 0) {
-
- if (error || verbose) {
- // display the message in the console.
- if (error) {
- AdtPlugin.printErrorToConsole(project, results.toArray());
-
- // mark the project
- BaseProjectHelper.markResource(project,
- AdtConstants.MARKER_RENDERSCRIPT,
- "Unparsed Renderscript error! Check the console for output.",
- IMarker.SEVERITY_ERROR);
- } else {
- AdtPlugin.printToConsole(project, results.toArray());
+ int returnCode = BuildHelper.grabProcessOutput(project, p, stdErr);
+
+ if (stdErr.size() > 0) {
+ // attempt to parse the error output
+ boolean parsingError = parseLlvmOutput(stdErr);
+
+ // If the process failed and we couldn't parse the output
+ // we print a message, mark the project and exit
+ if (returnCode != 0) {
+
+ if (parsingError || verbose) {
+ // display the message in the console.
+ if (parsingError) {
+ AdtPlugin.printErrorToConsole(project, stdErr.toArray());
+
+ // mark the project
+ BaseProjectHelper.markResource(project,
+ AdtConstants.MARKER_RENDERSCRIPT,
+ "Unparsed Renderscript error! Check the console for output.",
+ IMarker.SEVERITY_ERROR);
+ } else {
+ AdtPlugin.printToConsole(project, stdErr.toArray());
+ }
}
+ return false;
}
+ } else if (returnCode != 0) {
+ // no stderr output but exec failed.
+ String msg = String.format("Error executing Renderscript: Return code %1$d",
+ returnCode);
+
+ BaseProjectHelper.markResource(project, AdtConstants.MARKER_AIDL,
+ msg, IMarker.SEVERITY_ERROR);
+
return false;
}
} catch (IOException e) {