Browse Source

REPORT-80651 模板版本管理重构一期 - 修改代码

feature/x
loy 2 years ago
parent
commit
10f94f8392
  1. 23
      designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java

23
designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java

@ -390,10 +390,25 @@ public class PreferencePane extends BasicPane {
vcsPane.add(enableVcsPanel);
vcsPane.add(intervalPanel);
vcsPane.add(saveCommitCheckBox);
if (WorkContext.getCurrent().get(VcsOperator.class).isLegacyMode()) {
// 老版本时才显示gc选项
vcsPane.add(gcControlPane);
}
new SwingWorker<Boolean, Boolean>() {
@Override
protected Boolean doInBackground() throws Exception {
return WorkContext.getCurrent().get(VcsOperator.class).isLegacyMode();
}
@Override
protected void done() {
try {
if (Boolean.TRUE.equals(get())) {
// 老版本时才显示gc选项
vcsPane.add(gcControlPane);
vcsPane.updateUI();
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e, "[Vcs] retrieve legacy mode error: {}", e.getMessage());
}
}
}.execute();
}
/**

Loading…
Cancel
Save