| OLD | NEW |
| 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.actions; | 5 package org.chromium.debug.ui.actions; |
| 6 | 6 |
| 7 import java.util.List; | 7 import java.util.List; |
| 8 | 8 |
| 9 import org.chromium.debug.core.ChromiumDebugPlugin; | 9 import org.chromium.debug.core.ChromiumDebugPlugin; |
| 10 import org.chromium.debug.core.model.PushChangesPlan; | 10 import org.chromium.debug.core.model.PushChangesPlan; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 final PushChangesPlan plan = PushChangesPlan.create(filePair); | 34 final PushChangesPlan plan = PushChangesPlan.create(filePair); |
| 35 | 35 |
| 36 UpdatableScript.UpdateCallback callback = new UpdatableScript.UpdateCallback
() { | 36 UpdatableScript.UpdateCallback callback = new UpdatableScript.UpdateCallback
() { |
| 37 @Override | 37 @Override |
| 38 public void success(Object report, ChangeDescription changeDescription) { | 38 public void success(Object report, ChangeDescription changeDescription) { |
| 39 ChromiumDebugPlugin.log(new Status(IStatus.OK, ChromiumDebugPlugin.PLUGI
N_ID, | 39 ChromiumDebugPlugin.log(new Status(IStatus.OK, ChromiumDebugPlugin.PLUGI
N_ID, |
| 40 "Script has been successfully updated on remote: " + report)); //$NO
N-NLS-1$ | 40 "Script has been successfully updated on remote: " + report)); //$NO
N-NLS-1$ |
| 41 } | 41 } |
| 42 | 42 |
| 43 @Override | 43 @Override |
| 44 public void failure(final String message) { | 44 public void failure(final String message, UpdatableScript.Failure failure)
{ |
| 45 shell.getDisplay().asyncExec(new Runnable() { | 45 shell.getDisplay().asyncExec(new Runnable() { |
| 46 @Override | 46 @Override |
| 47 public void run() { | 47 public void run() { |
| 48 LiveEditResultDialog dialog = new LiveEditResultDialog(shell, | 48 LiveEditResultDialog dialog = new LiveEditResultDialog(shell, |
| 49 LiveEditResultDialog.createTextInput(message, plan)); | 49 LiveEditResultDialog.createTextInput(message, plan)); |
| 50 dialog.open(); | 50 dialog.open(); |
| 51 } | 51 } |
| 52 }); | 52 }); |
| 53 } | 53 } |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 plan.execute(false, callback, null); | 56 plan.execute(false, callback, null); |
| 57 } | 57 } |
| 58 } | 58 } |
| OLD | NEW |