From 0ef766f157c67e13ec1192eb9ba8ab6ebf33fdfe Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Fri, 26 Apr 2019 15:43:37 +0800 Subject: [PATCH] REPORT-16550 REPORT-16547 --- .../java/com/fr/design/mainframe/vcs/common/VcsHelper.java | 2 +- .../com/fr/design/mainframe/vcs/ui/FileVersionDialog.java | 5 +++-- .../com/fr/design/mainframe/vcs/ui/FileVersionsPanel.java | 5 +++-- 3 files changed, 7 insertions(+), 5 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 4fc99731a5..d5c8c01657 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 @@ -119,7 +119,7 @@ public class VcsHelper { @Override public void run() { - String fileName = VcsHelper.getEditingFilename(); + String fileName = getEditingFilename(); VcsOperator operator = WorkContext.getCurrent().get(VcsOperator.class); VcsEntity entity = operator.getFileVersionByIndex(fileName, 0); int latestFileVersion = 0; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionDialog.java index cb7234640d..33076a07f0 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionDialog.java @@ -36,7 +36,7 @@ public class FileVersionDialog extends UIDialog { private UITextField textField; - public FileVersionDialog(Frame frame) { + public FileVersionDialog(Frame frame, final String fileName) { super(frame); setUndecorated(true); setModal(true); @@ -63,7 +63,7 @@ public class FileVersionDialog extends UIDialog { public void actionPerformed(ActionEvent e) { FileVersionDialog.this.setVisible(false); Date date = dateEditor.getValue(); - List vcsEntities = WorkContext.getCurrent().get(VcsOperator.class).getFilterVersions(date, new Date(date.getTime() + DELAY), textField.getText()); + List vcsEntities = WorkContext.getCurrent().get(VcsOperator.class).getFilterVersions(fileName, date, new Date(date.getTime() + DELAY), textField.getText()); FileVersionTable.getInstance().updateModel(1, vcsEntities); } @@ -91,4 +91,5 @@ public class FileVersionDialog extends UIDialog { public void checkValid() throws Exception { } + } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionsPanel.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionsPanel.java index 2e68e0e33c..7f9fc56fe3 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionsPanel.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionsPanel.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.vcs.ui; import com.fr.base.GraphHelper; import com.fr.design.base.mode.DesignModeContext; +import com.fr.design.base.mode.DesignerMode; import com.fr.design.dialog.BasicPane; import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.MutilTempalteTabPane; @@ -100,7 +101,7 @@ public class FileVersionsPanel extends BasicPane { } private void showFilterPane() { - versionDialog = new FileVersionDialog(DesignerContext.getDesignerFrame()); + versionDialog = new FileVersionDialog(DesignerContext.getDesignerFrame(), templatePath); versionDialog.setVisible(true); } @@ -153,7 +154,7 @@ public class FileVersionsPanel extends BasicPane { WestRegionContainerPane.getInstance().replaceUpPane( isExit ? DesignerFrameFileDealerPane.getInstance() : this); - DesignModeContext.switchTo(isExit ? com.fr.design.base.mode.DesignerMode.NORMAL : com.fr.design.base.mode.DesignerMode.VCS); + DesignModeContext.switchTo(isExit ? DesignerMode.NORMAL : DesignerMode.VCS); // MutilTempalteTabPane & NewTemplatePane 是否可点 ToolBarNewTemplatePane.getInstance().setButtonGray(!isExit);