Browse Source

REPORT-14835 调整代码格式

research/10.0
XiaXiang 6 years ago
parent
commit
52fb689d64
  1. 2
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  3. 8
      designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java
  4. 2
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionTable.java
  5. 3
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionsPanel.java

2
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -1607,7 +1607,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
this.setDragPermited(reader.getAttrAsBoolean("isDragPermited", false));
this.setUndoLimit(reader.getAttrAsInt("undoLimit", 5));
this.setDefaultStringToFormula(reader.getAttrAsBoolean("defaultStringToFormula", false));
this.setVcsEnable(reader.getAttrAsBoolean("supportVcs", false));
this.setVcsEnable(reader.getAttrAsBoolean("supportVcs", true));
this.setSaveCommit(reader.getAttrAsBoolean("saveCommit", false));
this.setSaveInterval(reader.getAttrAsInt("saveInterval", 60));
if ((tmpVal = reader.getAttrAsString("gridLineColor", null)) != null) {

2
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -461,7 +461,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
}
private void handleVcsAction() {
if (VcsHelper.containsFolderCounts() + VcsHelper.selectedTemplateCounts() > 1) {
if (!DesignerEnvManager.getEnvManager().isVcsEnable() || VcsHelper.isUnSelectedTemplate()) {
vcsAction.setEnabled(false);
return;
}

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

@ -37,7 +37,7 @@ public class VcsHelper {
public final static Icon VCS_USER_PNG = BaseUtils.readIcon("/com/fr/design/mainframe/vcs/images/icon_user@1x.png");
public final static Icon VCS_REVERT = BaseUtils.readIcon("/com/fr/design/mainframe/vcs/images/icon_revert.png");
public static int containsFolderCounts() {
private static int containsFolderCounts() {
TemplateFileTree fileTree = TemplateTreePane.getInstance().getTemplateFileTree();
if (fileTree.getSelectionPaths() == null) {
return 0;
@ -51,7 +51,7 @@ public class VcsHelper {
return fileTree.getSelectionPaths().length - fileTree.getSelectedTemplatePaths().length;
}
public static int selectedTemplateCounts() {
private static int selectedTemplateCounts() {
TemplateFileTree fileTree = TemplateTreePane.getInstance().getTemplateFileTree();
if (fileTree.getSelectionPaths() == null) {
return 0;
@ -60,5 +60,9 @@ public class VcsHelper {
return fileTree.getSelectedTemplatePaths().length;
}
public static boolean isUnSelectedTemplate() {
return VcsHelper.containsFolderCounts() + VcsHelper.selectedTemplateCounts() > 1;
}
}

2
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionTable.java

@ -25,9 +25,11 @@ public class FileVersionTable extends JTable {
public static FileVersionTable getInstance() {
if (instance == null) {
synchronized (FileVersionTable.class) {
if (instance == null) {
instance = new FileVersionTable();
}
}
}
return instance;
}

3
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionsPanel.java

@ -50,8 +50,9 @@ public class FileVersionsPanel extends BasicPane {
public static FileVersionsPanel getInstance() {
if (instance == null) {
synchronized (FileVersionsPanel.class) {
if (instance == null) {
instance = new FileVersionsPanel();
}
}
}
return instance;

Loading…
Cancel
Save