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() {
@Override
public void run() {
String fileName = getEditingFilename();
VcsOperator operator = WorkContext.getCurrent().get(VcsOperator.class);
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.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.event.MouseAdapter;
import java.awt.event.MouseEvent;
@ -76,7 +80,7 @@ public class VcsMovePanel extends BasicPane {
private BasicPane choosePane;
private CardLayout parentCard;
private JPanel parentPane;
private static final JProgressBar progressBar = new JProgressBar();
private static final JProgressBar PROGRESS_BAR = new JProgressBar();
private JPanel progressPanel;
private UILabel tipLabel;
@ -141,13 +145,13 @@ public class VcsMovePanel extends BasicPane {
private void initProcessPane() {
JPanel processPane = new JPanel();
JPanel body = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
progressBar.setStringPainted(true);
progressBar.setUI(new ModernUIProgressBarUI());
progressBar.setBorderPainted(false);
progressBar.setOpaque(false);
progressBar.setBorder(null);
progressBar.setSize(BasicDialog.MEDIUM);
body.add(progressBar);
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);
body.add(new UILabel(StringUtils.BLANK));
tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_While_Moving"));
tipLabel.setAlignmentX(CENTER_ALIGNMENT);
@ -330,7 +334,7 @@ public class VcsMovePanel extends BasicPane {
protected Void doInBackground() throws Exception {
try {
//开始迁移
VcsMoveService.getInstance().startMove(new VcsMoveService.MoveServiceWhileMoving() {
VcsMoveService.getInstance().startMove(new VcsMoveService.BaseMoveServiceWhileMoving() {
@Override
public void publishProgress() {
int num = VcsMoveService.getInstance().getCurrentMove();
@ -338,7 +342,7 @@ public class VcsMovePanel extends BasicPane {
}
@Override
public void prepare4Move() {
progressBar.setMaximum(VcsMoveService.getInstance().getTotal());
PROGRESS_BAR.setMaximum(VcsMoveService.getInstance().getTotal());
}
}, strategy);
} catch (Exception e) {
@ -353,7 +357,7 @@ public class VcsMovePanel extends BasicPane {
@Override
protected void process(List<Integer> chunks) {
progressBar.setValue(chunks.get(chunks.size() - 1));
PROGRESS_BAR.setValue(chunks.get(chunks.size() - 1));
}
@Override

Loading…
Cancel
Save