|
|
|
@ -378,7 +378,7 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private class MoveWorker extends SwingWorker<Void, Integer> { |
|
|
|
|
private class MoveWorker extends SwingWorker<Boolean, Integer> { |
|
|
|
|
|
|
|
|
|
private VcsMoveStrategy strategy; |
|
|
|
|
|
|
|
|
@ -387,7 +387,7 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected Void doInBackground() throws Exception { |
|
|
|
|
protected Boolean doInBackground() throws Exception { |
|
|
|
|
try { |
|
|
|
|
//开始迁移
|
|
|
|
|
VcsMoveService.getInstance().startMove(new VcsMoveService.BaseMoveServiceWhileMoving() { |
|
|
|
@ -402,13 +402,10 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
}, strategy); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
this.cancel(true); |
|
|
|
|
VcsMoveService.getInstance().stopMoving(); |
|
|
|
|
initFailedPane(); |
|
|
|
|
VcsMovePanel.this.getParentCard().show(getParentPane(), FAILED); |
|
|
|
|
FineLoggerFactory.getLogger().error("[VcsV2] Vcs move failed!"); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return null; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -419,13 +416,22 @@ public class VcsMovePanel extends BasicPane {
|
|
|
|
|
@Override |
|
|
|
|
protected void done() { |
|
|
|
|
VcsMoveService.getInstance().stopMoving(); |
|
|
|
|
initSuccessPane(); |
|
|
|
|
VcsMovePanel.this.getParentCard().show(getParentPane(), SUCCESS); |
|
|
|
|
VcsHelper.getInstance().updateLegacyMode(); |
|
|
|
|
try { |
|
|
|
|
if (get()) { |
|
|
|
|
initSuccessPane(); |
|
|
|
|
VcsMovePanel.this.getParentCard().show(getParentPane(), SUCCESS); |
|
|
|
|
VcsHelper.getInstance().updateLegacyMode(); |
|
|
|
|
} else { |
|
|
|
|
initFailedPane(); |
|
|
|
|
VcsMovePanel.this.getParentCard().show(getParentPane(), FAILED); |
|
|
|
|
FineLoggerFactory.getLogger().error("[VcsV2] Vcs move failed!"); |
|
|
|
|
} |
|
|
|
|
} catch (InterruptedException | ExecutionException e) { |
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 迁移回调事件 |
|
|
|
|
* |
|
|
|
|