Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RefactoringTest.java

Issue 10162026: Report warnings and non-fatal errors for shadowing declaration and usage. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks for review comments Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RefactoringTest.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RefactoringTest.java b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RefactoringTest.java
index 461f64f34766cbb276cb0e24b6b43c96724a83f0..0a7678721247cfea1a4fd3bf599d721c24d63df0 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RefactoringTest.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RefactoringTest.java
@@ -16,8 +16,8 @@ package com.google.dart.tools.ui.refactoring;
import com.google.common.collect.Lists;
import com.google.dart.tools.ui.internal.refactoring.UserInteractions;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.RefactoringStatusEntry;
import org.eclipse.swt.widgets.Shell;
import java.util.List;
@@ -29,6 +29,7 @@ public abstract class RefactoringTest extends AbstractDartTest {
protected final List<String> openInformationMessages = Lists.newArrayList();
+ protected final List<Integer> showStatusSeverities = Lists.newArrayList();
protected final List<String> showStatusMessages = Lists.newArrayList();
protected boolean showStatusCancel;
@@ -45,7 +46,12 @@ public abstract class RefactoringTest extends AbstractDartTest {
UserInteractions.showStatusDialog = new UserInteractions.ShowStatusDialog() {
@Override
public boolean open(RefactoringStatus status, Shell parent, String windowTitle) {
- showStatusMessages.add(status.getMessageMatchingSeverity(IStatus.INFO));
+ RefactoringStatusEntry[] entries = status.getEntries();
+ for (RefactoringStatusEntry entry : entries) {
+ int severity = entry.getSeverity();
+ showStatusSeverities.add(severity);
+ showStatusMessages.add(entry.getMessage());
+ }
return showStatusCancel;
}
};

Powered by Google App Engine
This is Rietveld 408576698