From b103a0de083d3cd3f10d50ab0a940d5a899cdc5e Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Tue, 27 Jun 2023 10:06:35 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"REPORT-91839=20=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E7=AE=A1=E7=90=86=E4=BA=8C=E6=9C=9F=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=84=E8=8C=83=E9=97=AE=E9=A2=98"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fa34777dd506b4fc32e8811cd0ff1f7d10dcf6f1. --- .../mainframe/vcs/common/VcsHelper.java | 5 ++-- .../design/mainframe/vcs/ui/VcsMovePanel.java | 28 ++++++++----------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java index 77ab8db68e..7ec79ca938 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java @@ -190,6 +190,7 @@ public class VcsHelper implements JTemplateActionListener { fireVcs.execute(new Runnable() { @Override public void run() { + String fileName = getEditingFilename(); VcsOperator operator = WorkContext.getCurrent().get(VcsOperator.class); VcsEntity entity = operator.getFileVersionByIndex(fileName, 0); @@ -212,9 +213,7 @@ public class VcsHelper implements JTemplateActionListener { } }); - if (!fireVcs.isShutdown()) { - fireVcs.shutdown(); - } + fireVcs.shutdown(); } /** diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java index 350d20424e..d92171d26a 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java @@ -26,11 +26,7 @@ import com.fr.workspace.server.vcs.VcsManager; import com.fr.workspace.server.vcs.v2.move.VcsMoveService; import com.fr.workspace.server.vcs.v2.move.VcsMoveStrategy; -import javax.swing.ButtonGroup; -import javax.swing.JPanel; -import javax.swing.JProgressBar; -import javax.swing.SwingUtilities; -import javax.swing.SwingWorker; +import javax.swing.*; import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -80,7 +76,7 @@ public class VcsMovePanel extends BasicPane { private BasicPane choosePane; private CardLayout parentCard; private JPanel parentPane; - private static final JProgressBar PROGRESS_BAR = new JProgressBar(); + private static final JProgressBar progressBar = new JProgressBar(); private JPanel progressPanel; private UILabel tipLabel; @@ -145,13 +141,13 @@ public class VcsMovePanel extends BasicPane { private void initProcessPane() { JPanel processPane = new JPanel(); JPanel body = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); - PROGRESS_BAR.setStringPainted(true); - PROGRESS_BAR.setUI(new ModernUIProgressBarUI()); - PROGRESS_BAR.setBorderPainted(false); - PROGRESS_BAR.setOpaque(false); - PROGRESS_BAR.setBorder(null); - PROGRESS_BAR.setSize(BasicDialog.MEDIUM); - body.add(PROGRESS_BAR); + progressBar.setStringPainted(true); + progressBar.setUI(new ModernUIProgressBarUI()); + progressBar.setBorderPainted(false); + progressBar.setOpaque(false); + progressBar.setBorder(null); + progressBar.setSize(BasicDialog.MEDIUM); + body.add(progressBar); body.add(new UILabel(StringUtils.BLANK)); tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_While_Moving")); tipLabel.setAlignmentX(CENTER_ALIGNMENT); @@ -334,7 +330,7 @@ public class VcsMovePanel extends BasicPane { protected Void doInBackground() throws Exception { try { //开始迁移 - VcsMoveService.getInstance().startMove(new VcsMoveService.BaseMoveServiceWhileMoving() { + VcsMoveService.getInstance().startMove(new VcsMoveService.MoveServiceWhileMoving() { @Override public void publishProgress() { int num = VcsMoveService.getInstance().getCurrentMove(); @@ -342,7 +338,7 @@ public class VcsMovePanel extends BasicPane { } @Override public void prepare4Move() { - PROGRESS_BAR.setMaximum(VcsMoveService.getInstance().getTotal()); + progressBar.setMaximum(VcsMoveService.getInstance().getTotal()); } }, strategy); } catch (Exception e) { @@ -357,7 +353,7 @@ public class VcsMovePanel extends BasicPane { @Override protected void process(List chunks) { - PROGRESS_BAR.setValue(chunks.get(chunks.size() - 1)); + progressBar.setValue(chunks.get(chunks.size() - 1)); } @Override