Browse Source

REPORT-33348 切换远程不勾选记住密码,密码没有清掉

feature/big-screen
lucian 4 years ago
parent
commit
c8d7663f3e
  1. 20
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

20
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -19,7 +19,6 @@ import com.fr.design.utils.DesignUtils;
import com.fr.env.CheckServiceDialog;
import com.fr.env.EnvListPane;
import com.fr.exit.DesignerExiter;
import com.fr.general.GeneralContext;
import com.fr.general.GeneralUtils;
import com.fr.invoke.Reflect;
import com.fr.json.JSONArray;
@ -31,7 +30,6 @@ import com.fr.process.engine.core.CarryMessageEvent;
import com.fr.process.engine.core.FineProcessContext;
import com.fr.rpc.Result;
import com.fr.stable.AssistUtils;
import com.fr.stable.EnvChangedListener;
import com.fr.stable.StringUtils;
import com.fr.start.server.ServerTray;
import com.fr.workspace.WorkContext;
@ -64,8 +62,6 @@ import static javax.swing.JOptionPane.QUESTION_MESSAGE;
public class EnvChangeEntrance {
private String currentEnvName = "";
public static EnvChangeEntrance getInstance() {
return HOLDER.singleton;
}
@ -76,13 +72,7 @@ public class EnvChangeEntrance {
private EnvChangeEntrance() {
currentEnvName = DesignerEnvManager.getEnvManager().getCurEnvName();
GeneralContext.addEnvChangedListener(new EnvChangedListener() {
@Override
public void envChanged() {
currentEnvName = DesignerEnvManager.getEnvManager().getCurEnvName();
}
});
}
private boolean envListOkAction(EnvListPane envListPane, PopTipStrategy strategy) {
@ -381,7 +371,7 @@ public class EnvChangeEntrance {
* 出现对话框选择使用的工作环境
*/
public void chooseEnv() {
chooseEnv(currentEnvName);
chooseEnv(DesignerEnvManager.getEnvManager().getCurEnvName());
}
public void chooseEnv(final String envName) {
@ -395,7 +385,7 @@ public class EnvChangeEntrance {
public void doOk() {
envListOkAction(envListPane, PopTipStrategy.LATER);
// 切换完成后清理密码
updateSelectEnv(envName);
updateSelectEnv(DesignerEnvManager.getEnvManager().getCurEnvName());
}
@Override
@ -416,7 +406,7 @@ public class EnvChangeEntrance {
eventPipe.fire(new CarryMessageEvent(ReportState.STOP.getValue()));
}
final EnvListPane envListPane = new EnvListPane();
envListPane.populateEnvManager(currentEnvName);
envListPane.populateEnvManager(DesignerEnvManager.getEnvManager().getCurEnvName());
BasicDialog envListDialog = envListPane.showWindow(SwingUtilities.getWindowAncestor(DesignerContext.getDesignerFrame()));
envListDialog.addDialogActionListener(new DialogActionAdapter() {
@ -426,7 +416,7 @@ public class EnvChangeEntrance {
if (!envListOkAction(envListPane, PopTipStrategy.NOW)) {
DesignerExiter.getInstance().execute();
} else {
updateSelectEnv(currentEnvName);
updateSelectEnv(DesignerEnvManager.getEnvManager().getCurEnvName());
}
}

Loading…
Cancel
Save