Browse Source

REPORT-16550 REPORT-16547

research/10.0
XiaXiang 6 years ago
parent
commit
0ef766f157
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java
  2. 5
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionDialog.java
  3. 5
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionsPanel.java

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

@ -119,7 +119,7 @@ public class VcsHelper {
@Override @Override
public void run() { public void run() {
String fileName = VcsHelper.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);
int latestFileVersion = 0; int latestFileVersion = 0;

5
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; private UITextField textField;
public FileVersionDialog(Frame frame) { public FileVersionDialog(Frame frame, final String fileName) {
super(frame); super(frame);
setUndecorated(true); setUndecorated(true);
setModal(true); setModal(true);
@ -63,7 +63,7 @@ public class FileVersionDialog extends UIDialog {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
FileVersionDialog.this.setVisible(false); FileVersionDialog.this.setVisible(false);
Date date = dateEditor.getValue(); Date date = dateEditor.getValue();
List<VcsEntity> vcsEntities = WorkContext.getCurrent().get(VcsOperator.class).getFilterVersions(date, new Date(date.getTime() + DELAY), textField.getText()); List<VcsEntity> vcsEntities = WorkContext.getCurrent().get(VcsOperator.class).getFilterVersions(fileName, date, new Date(date.getTime() + DELAY), textField.getText());
FileVersionTable.getInstance().updateModel(1, vcsEntities); FileVersionTable.getInstance().updateModel(1, vcsEntities);
} }
@ -91,4 +91,5 @@ public class FileVersionDialog extends UIDialog {
public void checkValid() throws Exception { public void checkValid() throws Exception {
} }
} }

5
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.base.GraphHelper;
import com.fr.design.base.mode.DesignModeContext; import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.base.mode.DesignerMode;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.MutilTempalteTabPane;
@ -100,7 +101,7 @@ public class FileVersionsPanel extends BasicPane {
} }
private void showFilterPane() { private void showFilterPane() {
versionDialog = new FileVersionDialog(DesignerContext.getDesignerFrame()); versionDialog = new FileVersionDialog(DesignerContext.getDesignerFrame(), templatePath);
versionDialog.setVisible(true); versionDialog.setVisible(true);
} }
@ -153,7 +154,7 @@ public class FileVersionsPanel extends BasicPane {
WestRegionContainerPane.getInstance().replaceUpPane( WestRegionContainerPane.getInstance().replaceUpPane(
isExit ? DesignerFrameFileDealerPane.getInstance() : this); 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 是否可点 // MutilTempalteTabPane & NewTemplatePane 是否可点
ToolBarNewTemplatePane.getInstance().setButtonGray(!isExit); ToolBarNewTemplatePane.getInstance().setButtonGray(!isExit);

Loading…
Cancel
Save