Browse Source

REPORT-14835 版本管理代码调整

bugfix/10.0
XiaXiang 6 years ago
parent
commit
a6beba0424
  1. 25
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

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

@ -201,15 +201,31 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
for (ShortCut shortCut : extraShortCuts) { for (ShortCut shortCut : extraShortCuts) {
toolbarDef.addShortCut(shortCut); toolbarDef.addShortCut(shortCut);
} }
if (VcsHelper.getInstance().needInit()) { addVcsAction(toolbarDef);
toolbarDef.addShortCut(vcsAction);
}
toolbarDef.updateToolBar(toolBar); toolbarDef.updateToolBar(toolBar);
resetActionStatus(); resetActionStatus();
refresh(); refresh();
} }
/**
* 添加VcsAction
* @param toolbarDef
*/
private void addVcsAction(ToolBarDef toolbarDef) {
if (VcsHelper.getInstance().needInit()) {
vcsAction = new VcsAction();
if (FineClusterConfig.getInstance().isCluster()) {
vcsAction.setName(Toolkit.i18nText("Fine-Design_Vcs_NotSupportRemote"));
} else {
vcsAction.setName(Toolkit.i18nText("Fine-Design_Vcs_Title"));
}
toolbarDef.addShortCut(vcsAction);
}
}
private void resetActionStatus() { private void resetActionStatus() {
newFolderAction.setEnabled(false); newFolderAction.setEnabled(false);
@ -323,7 +339,6 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
private class VcsAction extends UpdateAction { private class VcsAction extends UpdateAction {
public VcsAction() { public VcsAction() {
this.setName(Toolkit.i18nText("Fine-Design_Vcs_Title"));
this.setSmallIcon(VcsHelper.VCS_LIST_PNG); this.setSmallIcon(VcsHelper.VCS_LIST_PNG);
} }
@ -352,6 +367,8 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
} }
if (WorkContext.getCurrent() != null) { if (WorkContext.getCurrent() != null) {
if (!WorkContext.getCurrent().isLocal()) { if (!WorkContext.getCurrent().isLocal()) {
//当前环境为远程环境时 //当前环境为远程环境时

Loading…
Cancel
Save