From 6fd40efe1649d627eef9ffb2b2a068a73f0ac36f Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Sat, 27 Apr 2019 14:23:26 +0800 Subject: [PATCH] REPORT-16559 --- .../java/com/fr/design/mainframe/vcs/common/VcsHelper.java | 2 +- .../fr/design/mainframe/vcs/ui/EditFileVersionDialog.java | 7 +++---- .../fr/design/mainframe/vcs/ui/FileVersionRowPanel.java | 5 +++-- 3 files changed, 7 insertions(+), 7 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 968d03fbd..05ff041d6 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 @@ -40,7 +40,7 @@ public class VcsHelper { public final static EmptyBorder EMPTY_BORDER = new EmptyBorder(10, 10, 0, 10); - + public final static EmptyBorder EMPTY_BORDER_MEDIUM = new EmptyBorder(5, 10, 0, 10); public final static EmptyBorder EMPTY_BORDER_BOTTOM = new EmptyBorder(10, 10, 10, 10); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java index f6533de4d..76bededaa 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java @@ -8,16 +8,15 @@ import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.locale.InterProviderFactory; -import com.fr.report.ReportContext; import com.fr.report.entity.VcsEntity; +import com.fr.workspace.WorkContext; +import com.fr.workspace.server.vcs.VcsOperator; import javax.swing.JPanel; import java.awt.BorderLayout; import java.awt.Component; import java.awt.FlowLayout; import java.awt.Frame; -import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -80,7 +79,7 @@ public class EditFileVersionDialog extends UIDialog { @Override public void actionPerformed(ActionEvent e) { entity.setCommitMsg(msgTestArea.getText()); - ReportContext.getInstance().getVcsController().saveOrUpdateFileVersion(entity); + WorkContext.getCurrent().get(VcsOperator.class).updateVersion(entity); setVisible(false); } }); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionRowPanel.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionRowPanel.java index 657e990cc..c81e45c38 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionRowPanel.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionRowPanel.java @@ -16,6 +16,7 @@ import javax.swing.Box; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.SwingConstants; +import javax.swing.border.EmptyBorder; import javax.swing.text.BadLocationException; import javax.swing.text.Style; import javax.swing.text.StyleConstants; @@ -43,13 +44,13 @@ public class FileVersionRowPanel extends JPanel { // version + username Box upPane = Box.createHorizontalBox(); - upPane.setBorder(VcsHelper.EMPTY_BORDER); + upPane.setBorder(VcsHelper.EMPTY_BORDER_MEDIUM); upPane.add(versionLabel); upPane.add(Box.createHorizontalGlue()); // msg - msgLabel.setBorder(VcsHelper.EMPTY_BORDER); + msgLabel.setBorder(VcsHelper.EMPTY_BORDER_MEDIUM); msgLabel.setOpaque(false); msgLabel.setBackground(new Color(0, 0, 0, 0)); msgLabel.setEditable(false);