|
|
@ -95,7 +95,9 @@ public class EnvChangeEntrance { |
|
|
|
* @param envName 目标工作目录名称 |
|
|
|
* @param envName 目标工作目录名称 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void switch2Env(final String envName) { |
|
|
|
public void switch2Env(final String envName) { |
|
|
|
switch2Env(envName, PopTipStrategy.LATER); |
|
|
|
if (switch2Env(envName, PopTipStrategy.LATER)) { |
|
|
|
|
|
|
|
PopTipStrategy.LATER.showTip(new SuccessPopTip()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -117,7 +119,7 @@ public class EnvChangeEntrance { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void show() { |
|
|
|
public void show() { |
|
|
|
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"), |
|
|
|
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"), |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon")); |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon")); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
return false; |
|
|
|
return false; |
|
|
@ -155,7 +157,7 @@ public class EnvChangeEntrance { |
|
|
|
public void show() { |
|
|
|
public void show() { |
|
|
|
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), |
|
|
|
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Error"), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), |
|
|
|
ERROR_MESSAGE, |
|
|
|
ERROR_MESSAGE, |
|
|
|
UIManager.getIcon("OptionPane.errorIcon")); |
|
|
|
UIManager.getIcon("OptionPane.errorIcon")); |
|
|
|
} |
|
|
|
} |
|
|
@ -171,7 +173,7 @@ public class EnvChangeEntrance { |
|
|
|
FineLoggerFactory.getLogger().error(exception.getMessage(), exception); |
|
|
|
FineLoggerFactory.getLogger().error(exception.getMessage(), exception); |
|
|
|
strategy.showTip(() -> FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), |
|
|
|
strategy.showTip(() -> FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Error"), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), |
|
|
|
ERROR_MESSAGE, |
|
|
|
ERROR_MESSAGE, |
|
|
|
UIManager.getIcon("OptionPane.errorIcon"))); |
|
|
|
UIManager.getIcon("OptionPane.errorIcon"))); |
|
|
|
} |
|
|
|
} |
|
|
@ -191,7 +193,7 @@ public class EnvChangeEntrance { |
|
|
|
if (ComparatorUtils.equals(result, TestConnectionResult.AUTH_FAILED)) { |
|
|
|
if (ComparatorUtils.equals(result, TestConnectionResult.AUTH_FAILED)) { |
|
|
|
strategy.showTip(() -> FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), |
|
|
|
strategy.showTip(() -> FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Error"), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), |
|
|
|
ERROR_MESSAGE, |
|
|
|
ERROR_MESSAGE, |
|
|
|
UIManager.getIcon("OptionPane.errorIcon"))); |
|
|
|
UIManager.getIcon("OptionPane.errorIcon"))); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -444,7 +446,9 @@ public class EnvChangeEntrance { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void doOk() { |
|
|
|
public void doOk() { |
|
|
|
envListOkAction(envListPane, PopTipStrategy.LATER); |
|
|
|
if (envListOkAction(envListPane, PopTipStrategy.LATER)) { |
|
|
|
|
|
|
|
PopTipStrategy.LATER.showTip(new SuccessPopTip()); |
|
|
|
|
|
|
|
} |
|
|
|
// 切换完成后清理密码
|
|
|
|
// 切换完成后清理密码
|
|
|
|
updateNotRememberPwdEnv(); |
|
|
|
updateNotRememberPwdEnv(); |
|
|
|
} |
|
|
|
} |
|
|
@ -553,4 +557,12 @@ public class EnvChangeEntrance { |
|
|
|
interface PopTip { |
|
|
|
interface PopTip { |
|
|
|
void show(); |
|
|
|
void show(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static class SuccessPopTip implements PopTip { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void show() { |
|
|
|
|
|
|
|
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), |
|
|
|
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Success")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|