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

Side by Side Diff: plugins/org.chromium.debug.ui/src/org/chromium/debug/ui/liveedit/PreviewLoader.java

Issue 11833010: Expose liveedit compile error data in SDK (Closed) Base URL: https://chromedevtools.googlecode.com/svn/trunk
Patch Set: fcr Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.debug.ui.liveedit; 5 package org.chromium.debug.ui.liveedit;
6 6
7 import static org.chromium.debug.ui.DialogUtils.createErrorOptional; 7 import static org.chromium.debug.ui.DialogUtils.createErrorOptional;
8 import static org.chromium.debug.ui.DialogUtils.createOptional; 8 import static org.chromium.debug.ui.DialogUtils.createOptional;
9 9
10 import org.chromium.debug.core.model.PushChangesPlan; 10 import org.chromium.debug.core.model.PushChangesPlan;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 final PushChangesPlan plan = inputParameterSource.getValue(); 57 final PushChangesPlan plan = inputParameterSource.getValue();
58 boolean inputIsNew = dataMonitor.updateInputAndStarted(plan); 58 boolean inputIsNew = dataMonitor.updateInputAndStarted(plan);
59 if (!inputIsNew) { 59 if (!inputIsNew) {
60 return; 60 return;
61 } 61 }
62 62
63 // Report about our value becoming empty. 63 // Report about our value becoming empty.
64 updater.reportChanged(this); 64 updater.reportChanged(this);
65 65
66 UpdatableScript.UpdateCallback callback = new UpdatableScript.UpdateCallback () { 66 UpdatableScript.UpdateCallback callback = new UpdatableScript.UpdateCallback () {
67 public void failure(String message) { 67 public void failure(String message, UpdatableScript.Failure failure) {
68 Optional<Data> error = createErrorOptional( 68 Optional<Data> error = createErrorOptional(
69 new Message(NLS.bind(Messages.PreviewLoader_FAILED_TO_GET, message), 69 new Message(NLS.bind(Messages.PreviewLoader_FAILED_TO_GET, message),
70 MessagePriority.WARNING)); 70 MessagePriority.WARNING));
71 done(error); 71 done(error);
72 } 72 }
73 public void success(Object report, 73 public void success(Object report,
74 final UpdatableScript.ChangeDescription changeDescription) { 74 final UpdatableScript.ChangeDescription changeDescription) {
75 Optional<Data> result; 75 Optional<Data> result;
76 if (changeDescription == null) { 76 if (changeDescription == null) {
77 result = EMPTY_DATA; 77 result = EMPTY_DATA;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 this.result = result; 165 this.result = result;
166 return true; 166 return true;
167 } 167 }
168 } 168 }
169 169
170 private static final Optional<Data> NO_DATA = createErrorOptional( 170 private static final Optional<Data> NO_DATA = createErrorOptional(
171 new Message(Messages.PreviewLoader_WAITING_FOR_DIFF, MessagePriority.NONE) ); 171 new Message(Messages.PreviewLoader_WAITING_FOR_DIFF, MessagePriority.NONE) );
172 private static final Optional<Data> EMPTY_DATA = 172 private static final Optional<Data> EMPTY_DATA =
173 createErrorOptional(new Message(Messages.PreviewLoader_FAILED_TO_LOAD, Mes sagePriority.NONE)); 173 createErrorOptional(new Message(Messages.PreviewLoader_FAILED_TO_LOAD, Mes sagePriority.NONE));
174 } 174 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698