|
|
|
@ -22,6 +22,7 @@ import com.fr.stable.StringUtils;
|
|
|
|
|
import com.fr.start.server.FineEmbedServer; |
|
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.io.IOException; |
|
|
|
@ -39,13 +40,17 @@ public class ServerStarter {
|
|
|
|
|
if (!WorkContext.getCurrent().isLocal()) { |
|
|
|
|
//有问题,这里拿不到远程的http端口
|
|
|
|
|
browser(WorkContext.getCurrent().getPath()); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (ComparatorUtils.equals(StableUtils.getInstallHome(), ".")) {//august:供代码使用
|
|
|
|
|
else if (ComparatorUtils.equals(StableUtils.getInstallHome(), ".")) {//august:供代码使用
|
|
|
|
|
String web = GeneralContext.getCurrentAppNameOfEnv(); |
|
|
|
|
browserURLWithLocalEnv("http://localhost:" + DesignerEnvManager.getEnvManager().getEmbedServerPort() + "/" + web + "/" + ServerConfig.getInstance().getServletName()); |
|
|
|
|
return; |
|
|
|
|
}else{ |
|
|
|
|
initDemoServerAndBrowser(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void switchWorkContext(){ |
|
|
|
|
DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); |
|
|
|
|
if (!envManager.isCurrentEnvDefault()) { |
|
|
|
|
InformationPane inf = new InformationPane(envManager.getDefaultEnvName()); |
|
|
|
@ -60,12 +65,9 @@ public class ServerStarter {
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage()); |
|
|
|
|
} |
|
|
|
|
initDemoServerAndBrowser(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}).setVisible(true); |
|
|
|
|
} else { |
|
|
|
|
initDemoServerAndBrowser(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|