|
|
|
@ -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(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|