Browse Source

Revert "Revert "REPORT-91839 模板版本管理二期 修复规范问题""

This reverts commit b103a0de08.
feature/x
Destiny.Lin 1 year ago
parent
commit
280bba4f12
  1. 5
      designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java
  2. 28
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java

5
designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java

@ -190,7 +190,6 @@ public class VcsHelper implements JTemplateActionListener {
fireVcs.execute(new Runnable() { fireVcs.execute(new Runnable() {
@Override @Override
public void run() { public void run() {
String fileName = getEditingFilename(); String fileName = getEditingFilename();
VcsOperator operator = WorkContext.getCurrent().get(VcsOperator.class); VcsOperator operator = WorkContext.getCurrent().get(VcsOperator.class);
VcsEntity entity = operator.getFileVersionByIndex(fileName, 0); VcsEntity entity = operator.getFileVersionByIndex(fileName, 0);
@ -213,7 +212,9 @@ public class VcsHelper implements JTemplateActionListener {
} }
}); });
fireVcs.shutdown(); if (!fireVcs.isShutdown()) {
fireVcs.shutdown();
}
} }
/** /**

28
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java

@ -26,7 +26,11 @@ import com.fr.workspace.server.vcs.VcsManager;
import com.fr.workspace.server.vcs.v2.move.VcsMoveService; import com.fr.workspace.server.vcs.v2.move.VcsMoveService;
import com.fr.workspace.server.vcs.v2.move.VcsMoveStrategy; import com.fr.workspace.server.vcs.v2.move.VcsMoveStrategy;
import javax.swing.*; import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import java.awt.*; import java.awt.*;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
@ -76,7 +80,7 @@ public class VcsMovePanel extends BasicPane {
private BasicPane choosePane; private BasicPane choosePane;
private CardLayout parentCard; private CardLayout parentCard;
private JPanel parentPane; private JPanel parentPane;
private static final JProgressBar progressBar = new JProgressBar(); private static final JProgressBar PROGRESS_BAR = new JProgressBar();
private JPanel progressPanel; private JPanel progressPanel;
private UILabel tipLabel; private UILabel tipLabel;
@ -141,13 +145,13 @@ public class VcsMovePanel extends BasicPane {
private void initProcessPane() { private void initProcessPane() {
JPanel processPane = new JPanel(); JPanel processPane = new JPanel();
JPanel body = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); JPanel body = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
progressBar.setStringPainted(true); PROGRESS_BAR.setStringPainted(true);
progressBar.setUI(new ModernUIProgressBarUI()); PROGRESS_BAR.setUI(new ModernUIProgressBarUI());
progressBar.setBorderPainted(false); PROGRESS_BAR.setBorderPainted(false);
progressBar.setOpaque(false); PROGRESS_BAR.setOpaque(false);
progressBar.setBorder(null); PROGRESS_BAR.setBorder(null);
progressBar.setSize(BasicDialog.MEDIUM); PROGRESS_BAR.setSize(BasicDialog.MEDIUM);
body.add(progressBar); body.add(PROGRESS_BAR);
body.add(new UILabel(StringUtils.BLANK)); body.add(new UILabel(StringUtils.BLANK));
tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_While_Moving")); tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_While_Moving"));
tipLabel.setAlignmentX(CENTER_ALIGNMENT); tipLabel.setAlignmentX(CENTER_ALIGNMENT);
@ -330,7 +334,7 @@ public class VcsMovePanel extends BasicPane {
protected Void doInBackground() throws Exception { protected Void doInBackground() throws Exception {
try { try {
//开始迁移 //开始迁移
VcsMoveService.getInstance().startMove(new VcsMoveService.MoveServiceWhileMoving() { VcsMoveService.getInstance().startMove(new VcsMoveService.BaseMoveServiceWhileMoving() {
@Override @Override
public void publishProgress() { public void publishProgress() {
int num = VcsMoveService.getInstance().getCurrentMove(); int num = VcsMoveService.getInstance().getCurrentMove();
@ -338,7 +342,7 @@ public class VcsMovePanel extends BasicPane {
} }
@Override @Override
public void prepare4Move() { public void prepare4Move() {
progressBar.setMaximum(VcsMoveService.getInstance().getTotal()); PROGRESS_BAR.setMaximum(VcsMoveService.getInstance().getTotal());
} }
}, strategy); }, strategy);
} catch (Exception e) { } catch (Exception e) {
@ -353,7 +357,7 @@ public class VcsMovePanel extends BasicPane {
@Override @Override
protected void process(List<Integer> chunks) { protected void process(List<Integer> chunks) {
progressBar.setValue(chunks.get(chunks.size() - 1)); PROGRESS_BAR.setValue(chunks.get(chunks.size() - 1));
} }
@Override @Override

Loading…
Cancel
Save