From 11d8611fdbe308390e450d4c4ca07aff4745444a Mon Sep 17 00:00:00 2001 From: Eugene Kudelevsky Date: Wed, 25 Apr 2012 15:09:32 +0400 Subject: [PATCH] IDEA-84700 android-renderscript: mark module as successfully compiled only if all rs files were compiled without errors --- .../compiler/AndroidRenderscriptCompiler.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/plugins/android/src/org/jetbrains/android/compiler/AndroidRenderscriptCompiler.java b/plugins/android/src/org/jetbrains/android/compiler/AndroidRenderscriptCompiler.java index 8f08666282a0..313236f033d6 100644 --- a/plugins/android/src/org/jetbrains/android/compiler/AndroidRenderscriptCompiler.java +++ b/plugins/android/src/org/jetbrains/android/compiler/AndroidRenderscriptCompiler.java @@ -21,7 +21,8 @@ import org.jetbrains.android.facet.AndroidFacet; import org.jetbrains.android.facet.AndroidRootUtil; import org.jetbrains.android.fileTypes.AndroidRenderscriptFileType; import org.jetbrains.android.sdk.AndroidPlatform; -import org.jetbrains.android.util.*; +import org.jetbrains.android.util.AndroidBundle; +import org.jetbrains.android.util.AndroidUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -182,6 +183,8 @@ public class AndroidRenderscriptCompiler implements SourceGeneratingCompiler { continue; } + boolean success = true; + for (final VirtualFile sourceFile : genItem.myFiles) { final String depFolderOsPath = getDependencyFolder(context.getProject(), sourceFile, outputRootDirectory); @@ -201,8 +204,8 @@ public class AndroidRenderscriptCompiler implements SourceGeneratingCompiler { } }); - if (messages.get(CompilerMessageCategory.ERROR).isEmpty()) { - results.add(genItem); + if (messages.get(CompilerMessageCategory.ERROR).size() > 0) { + success = false; } } catch (final IOException e) { @@ -212,8 +215,13 @@ public class AndroidRenderscriptCompiler implements SourceGeneratingCompiler { context.addMessage(CompilerMessageCategory.ERROR, e.getMessage(), sourceFile.getUrl(), -1, -1); } }); + success = false; } } + + if (success) { + results.add(genItem); + } } } outputRootDirectory.refresh(false, true);