| Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/Checks.java
|
| diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/Checks.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/Checks.java
|
| index 01228340dfb61932465e7e4a1d1a3acae54ff3c7..aec66bc80c2c6d886039c0bca91aada64c4eb1e3 100644
|
| --- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/Checks.java
|
| +++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/Checks.java
|
| @@ -13,6 +13,7 @@
|
| */
|
| package com.google.dart.tools.internal.corext.refactoring;
|
|
|
| +import com.google.common.collect.Sets;
|
| import com.google.dart.tools.core.DartCore;
|
| import com.google.dart.tools.core.model.CompilationUnit;
|
| import com.google.dart.tools.core.model.DartConventions;
|
| @@ -30,6 +31,7 @@ import org.eclipse.core.runtime.IStatus;
|
| import org.eclipse.ltk.core.refactoring.RefactoringStatus;
|
|
|
| import java.util.List;
|
| +import java.util.Set;
|
|
|
| /**
|
| * This class defines a set of reusable static checks methods.
|
| @@ -122,8 +124,14 @@ public class Checks {
|
| public static RefactoringStatus checkCompileErrorsInAffectedFiles(List<SearchMatch> matches)
|
| throws DartModelException {
|
| RefactoringStatus result = new RefactoringStatus();
|
| + // prepare unique resources
|
| + Set<IResource> resources = Sets.newHashSet();
|
| for (SearchMatch match : matches) {
|
| - checkCompileErrorsInAffectedFile(result, match.getElement().getResource());
|
| + resources.add(match.getElement().getResource());
|
| + }
|
| + // add warnings for each resource with compilation error
|
| + for (IResource resource : resources) {
|
| + checkCompileErrorsInAffectedFile(result, resource);
|
| }
|
| return result;
|
| }
|
|
|