Index: editor/tools/plugins/com.google.dart.tools.update.core/src/com/google/dart/tools/update/core/internal/UpdateModel.java |
=================================================================== |
--- editor/tools/plugins/com.google.dart.tools.update.core/src/com/google/dart/tools/update/core/internal/UpdateModel.java (revision 9083) |
+++ editor/tools/plugins/com.google.dart.tools.update.core/src/com/google/dart/tools/update/core/internal/UpdateModel.java (working copy) |
@@ -37,6 +37,12 @@ |
//no-op |
} |
}, |
+ FAILED { |
+ @Override |
+ public void notify(UpdateListener listener) { |
+ listener.checkFailed(errorMessage); |
+ } |
+ }, |
CHECKING { |
@Override |
public void notify(UpdateListener listener) { |
@@ -106,6 +112,8 @@ |
private final CopyOnWriteArrayList<UpdateListener> listeners = new CopyOnWriteArrayList<UpdateListener>(); |
+ private static String errorMessage; |
+ |
/** |
* Add the given update listener. |
* |
@@ -184,13 +192,21 @@ |
} |
/** |
+ * Caches an error message for state notifications. |
+ * |
+ * @param msg the error message |
+ */ |
+ void setErrorMessage(String msg) { |
+ errorMessage = msg; |
+ } |
+ |
+ /** |
* Caches a revision number for state notifications. |
* |
* @param revision the latest available revision |
*/ |
- @SuppressWarnings("static-access") |
void setLatestAvailableRevision(Revision revision) { |
- this.latestRevision = revision; |
+ latestRevision = revision; |
} |
/** |