@ -44,6 +44,7 @@ public class VcsHelper implements JTemplateActionListener {
public final static Icon VCS_DELETE_PNG = IOUtils.readIcon("/com/fr/design/images/vcs/icon_delete.png");
public final static Icon VCS_USER_PNG = IOUtils.readIcon("/com/fr/design/images/vcs/icon_user@1x.png");
public final static Icon VCS_REVERT = IOUtils.readIcon("/com/fr/design/images/vcs/icon_revert.png");
public final static int OFFSET = 2;
private final static String VCS_DIR = "vcs";
public final static String VCS_CACHE_DIR = pathJoin(VCS_DIR, "cache");
private static final int MINUTE = 60 * 1000;
@ -164,7 +165,7 @@ public class VcsHelper implements JTemplateActionListener {
*/
@Override
public void templateSaved(JTemplate<?, ?> jt) {
if (DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable() && !FineClusterConfig.getInstance().isCluster()) {
if (needInit() && DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable() && !FineClusterConfig.getInstance().isCluster()) {
fireVcs(jt);
}
@ -7,8 +7,11 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrameFileDealerPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.report.entity.VcsEntity;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.vcs.VcsOperator;
@ -81,6 +84,9 @@ public class EditFileVersionDialog extends UIDialog {
entity.setCommitMsg(msgTestArea.getText());
WorkContext.getCurrent().get(VcsOperator.class).updateVersion(entity);
setVisible(false);
String path = DesignerFrameFileDealerPane.getInstance().getSelectedOperation().getFilePath();
FileVersionTable table = FileVersionTable.getInstance();
table.updateModel(table.getSelectedRow(), WorkContext.getCurrent().get(VcsOperator.class).getVersions(path.replaceFirst("/", StringUtils.EMPTY)));
});
@ -68,7 +68,7 @@ public class FileVersionCellEditor extends AbstractCellEditor implements TableCe
double height = editor.getPreferredSize().getHeight();
if (table.getRowHeight(row) != height) {
table.setRowHeight(row, (int) height);
table.setRowHeight(row, (int) height + VcsHelper.OFFSET);
return editor;
@ -1,5 +1,6 @@
package com.fr.design.mainframe.vcs.ui;
import com.fr.design.mainframe.vcs.common.VcsHelper;
import javax.swing.JPanel;
@ -34,7 +35,7 @@ public class FileVersionCellRender implements TableCellRenderer {
@ -15,7 +15,7 @@ public class FileVersionFirstRowPanel extends JPanel {
super(new BorderLayout());
Box upPane = Box.createVerticalBox();
upPane.setBorder(new EmptyBorder(5, 10, 5, 10));
upPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Local_User")));
upPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Current")));
add(upPane, BorderLayout.CENTER);
@ -5,7 +5,7 @@ body {
background-size: 100% 100% !important;
-moz-background-size: 100% 100% !important;
font-family: PingFangSC-Regular, Georgia, "Nimbus Roman No9 L", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW\-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif !important;
font-family: "PingFang SC", "Microsoft YaHei", "Myriad Pro", "OpenSans", Verdana, SimSun, sans-serif !important;
.close-btn {
@ -27,7 +27,7 @@ body {
.font-bold {
font-weight: bold;
font-weight: 500;
.title {