| 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 22 matching lines...) Expand all Loading... |
| 33 execute(pair, shell, positionHighlighter); | 33 execute(pair, shell, positionHighlighter); |
| 34 } | 34 } |
| 35 } | 35 } |
| 36 | 36 |
| 37 private void execute(final ScriptTargetMapping filePair, final Shell shell, | 37 private void execute(final ScriptTargetMapping filePair, final Shell shell, |
| 38 final LiveEditResultDialog.ErrorPositionHighlighter positionHighlighter) { | 38 final LiveEditResultDialog.ErrorPositionHighlighter positionHighlighter) { |
| 39 final PushChangesPlan plan = PushChangesPlan.create(filePair); | 39 final PushChangesPlan plan = PushChangesPlan.create(filePair); |
| 40 | 40 |
| 41 UpdatableScript.UpdateCallback callback = new UpdatableScript.UpdateCallback
() { | 41 UpdatableScript.UpdateCallback callback = new UpdatableScript.UpdateCallback
() { |
| 42 @Override | 42 @Override |
| 43 public void success(Object report, ChangeDescription changeDescription) { | 43 public void success(boolean resumed, Object report, ChangeDescription chan
geDescription) { |
| 44 ChromiumDebugPlugin.log(new Status(IStatus.OK, ChromiumDebugPlugin.PLUGI
N_ID, | 44 ChromiumDebugPlugin.log(new Status(IStatus.OK, ChromiumDebugPlugin.PLUGI
N_ID, |
| 45 "Script has been successfully updated on remote: " + report)); //$NO
N-NLS-1$ | 45 "Script has been successfully updated on remote: " + report)); //$NO
N-NLS-1$ |
| 46 } | 46 } |
| 47 | 47 |
| 48 @Override | 48 @Override |
| 49 public void failure(final String message, final UpdatableScript.Failure fa
ilure) { | 49 public void failure(final String message, final UpdatableScript.Failure fa
ilure) { |
| 50 shell.getDisplay().asyncExec(new Runnable() { | 50 shell.getDisplay().asyncExec(new Runnable() { |
| 51 @Override | 51 @Override |
| 52 public void run() { | 52 public void run() { |
| 53 SingleInput textInput = LiveEditResultDialog.createTextInput(message
, plan, | 53 SingleInput textInput = LiveEditResultDialog.createTextInput(message
, plan, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 70 } | 70 } |
| 71 final ITextEditor textEditor = (ITextEditor) workbenchPart; | 71 final ITextEditor textEditor = (ITextEditor) workbenchPart; |
| 72 return new LiveEditResultDialog.ErrorPositionHighlighter() { | 72 return new LiveEditResultDialog.ErrorPositionHighlighter() { |
| 73 @Override | 73 @Override |
| 74 public void highlight(int offset, int length) { | 74 public void highlight(int offset, int length) { |
| 75 textEditor.selectAndReveal(offset, length); | 75 textEditor.selectAndReveal(offset, length); |
| 76 } | 76 } |
| 77 }; | 77 }; |
| 78 } | 78 } |
| 79 } | 79 } |
| OLD | NEW |