From c15e9541929b3c7c89a796c49d9ed1c0ebbb8813 Mon Sep 17 00:00:00 2001 From: ju Date: Wed, 6 Jun 2018 19:47:49 +0800 Subject: [PATCH] =?UTF-8?q?CORE-76=20Activator=E9=87=8D=E5=A4=8D=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E5=86=85=E7=BD=AE=E6=9C=8D=E5=8A=A1=E5=99=A8=E3=80=81?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E7=8E=AF=E5=A2=83=E7=9A=84=E6=94=AF=E6=8C=81?= =?UTF-8?q?=20=E7=8E=AF=E5=A2=83=E7=9B=91=E5=90=AC=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E5=BC=84=E5=AE=8C=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-base/src/com/fr/env/SignIn.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/designer-base/src/com/fr/env/SignIn.java b/designer-base/src/com/fr/env/SignIn.java index faa2c584f9..9737370335 100644 --- a/designer-base/src/com/fr/env/SignIn.java +++ b/designer-base/src/com/fr/env/SignIn.java @@ -5,7 +5,6 @@ import com.fr.core.env.EnvConfig; import com.fr.core.env.EnvContext; import com.fr.core.env.EnvEvent; import com.fr.design.mainframe.DesignerContext; -import com.fr.design.mainframe.DesignerFrame; import com.fr.design.utils.DesignUtils; import com.fr.event.Event; import com.fr.event.EventDispatcher; @@ -14,7 +13,7 @@ import com.fr.event.Null; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; -import javax.swing.JOptionPane; +import javax.swing.*; public class SignIn { @@ -35,10 +34,10 @@ public class SignIn { * @throws Exception 异常 */ public static void signIn(EnvConfig selectedEnv) throws Exception { + if (EnvContext.currentEnv() != null && !ComparatorUtils.equals(EnvContext.currentEnv(), selectedEnv)) { EnvContext.signOut(); + DesignUtils.switchToEnv(selectedEnv); } - - DesignUtils.switchToEnv(selectedEnv); } } \ No newline at end of file