Browse Source

Merge remote-tracking branch 'origin/release/10.0' into release/10.0

final/10.0
Harrison 6 years ago
parent
commit
85ebfcc7f4
  1. 29
      designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java
  2. 28
      designer-base/src/main/java/com/fr/design/actions/community/BugAction.java
  3. 47
      designer-base/src/main/java/com/fr/design/actions/community/CenterAction.java
  4. 48
      designer-base/src/main/java/com/fr/design/actions/community/CusDemandAction.java
  5. 30
      designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java
  6. 29
      designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java
  7. 27
      designer-base/src/main/java/com/fr/design/actions/community/SignAction.java
  8. 52
      designer-base/src/main/java/com/fr/design/actions/community/TechSolutionAction.java
  9. 26
      designer-base/src/main/java/com/fr/design/actions/community/VideoAction.java
  10. 2
      designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java
  11. 9
      designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java
  12. 9
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  13. 62
      designer-base/src/main/java/com/fr/design/utils/BrowseUtils.java
  14. 54
      designer-base/src/main/java/com/fr/start/ServerStarter.java
  15. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/bbs.png
  16. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/bug.png
  17. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/center.png
  18. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/demand.png
  19. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/help.png
  20. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/need.png
  21. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/question.png
  22. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/sign.png
  23. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/solotion.png
  24. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/video.png

29
designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java

@ -1,20 +1,15 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
public class BBSAction extends UpdateAction
{
@ -25,33 +20,19 @@ public class BBSAction extends UpdateAction
this.setMenuKeySet(BBS);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/bbs.png"));
}
/**
* 动作
* @param e 事件
* @param arg0 事件
*/
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
BrowseUtils.browser(url);
}
public static final MenuKeySet BBS = new MenuKeySet() {
@Override

28
designer-base/src/main/java/com/fr/design/actions/community/BugAction.java

@ -1,20 +1,14 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
public class BugAction extends UpdateAction
{
@ -23,7 +17,7 @@ public class BugAction extends UpdateAction
{ this.setMenuKeySet(BUG);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bug.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/bug.png"));
}
@ -31,21 +25,7 @@ public class BugAction extends UpdateAction
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.bugs");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
BrowseUtils.browser(url);
}
public static final MenuKeySet BUG = new MenuKeySet() {

47
designer-base/src/main/java/com/fr/design/actions/community/CenterAction.java

@ -0,0 +1,47 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import javax.swing.KeyStroke;
import java.awt.event.ActionEvent;
/**
* Created by XINZAI on 2018/8/23.
*/
public class CenterAction extends UpAction{
public CenterAction()
{
this.setMenuKeySet(CENTER);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/center.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.center");
BrowseUtils.browser(url);
}
public static final MenuKeySet CENTER = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'C';
}
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Commuinity_Center");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

48
designer-base/src/main/java/com/fr/design/actions/community/CusDemandAction.java

@ -0,0 +1,48 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import javax.swing.KeyStroke;
import java.awt.event.ActionEvent;
/**
* Created by XINZAI on 2018/8/23.
*/
public class CusDemandAction extends UpAction{
public CusDemandAction()
{
this.setMenuKeySet(DEMAND);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/demand.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.demand");
BrowseUtils.browser(url);
}
public static final MenuKeySet DEMAND = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'D';
}
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Commuinity_Demand");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

30
designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java

@ -1,20 +1,14 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
public class NeedAction extends UpdateAction
{
@ -24,29 +18,15 @@ public class NeedAction extends UpdateAction
this.setMenuKeySet(NEED);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/need.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/need.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.needs");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
BrowseUtils.browser(url);
}
public static final MenuKeySet NEED = new MenuKeySet() {

29
designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java

@ -1,20 +1,14 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
public class QuestionAction extends UpdateAction
{
@ -23,7 +17,7 @@ public class QuestionAction extends UpdateAction
{ this.setMenuKeySet(QUESTIONS);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/questions.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/question.png"));
}
@ -31,22 +25,7 @@ public class QuestionAction extends UpdateAction
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.questions");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
BrowseUtils.browser(url);
}
public static final MenuKeySet QUESTIONS = new MenuKeySet() {
@Override

27
designer-base/src/main/java/com/fr/design/actions/community/SignAction.java

@ -1,20 +1,15 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
public class SignAction extends UpdateAction
{
@ -24,7 +19,7 @@ public class SignAction extends UpdateAction
this.setMenuKeySet(SIGN);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/signature.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/sign.png"));
}
@ -32,21 +27,7 @@ public class SignAction extends UpdateAction
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.aut");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
BrowseUtils.browser(url);
}
public static final MenuKeySet SIGN = new MenuKeySet() {

52
designer-base/src/main/java/com/fr/design/actions/community/TechSolutionAction.java

@ -0,0 +1,52 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import javax.swing.KeyStroke;
import java.awt.event.ActionEvent;
/**
* Created by XINZAI on 2018/8/23.
*/
public class TechSolutionAction extends UpdateAction{
public TechSolutionAction()
{
this.setMenuKeySet(TSO);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images//bbs/solotion.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.solution");
BrowseUtils.browser(url);
}
public static final MenuKeySet TSO = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'T';
}
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Commuinity_Solution");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

26
designer-base/src/main/java/com/fr/design/actions/community/VideoAction.java

@ -1,20 +1,14 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.general.GeneralContext;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Locale;
public class VideoAction extends UpdateAction
@ -25,7 +19,7 @@ public class VideoAction extends UpdateAction
this.setMenuKeySet(VIDEO);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/video.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/video.png"));
}
@ -38,21 +32,7 @@ public class VideoAction extends UpdateAction
} else {
url = CloudCenter.getInstance().acquireUrlByKind("bbs.video");
}
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser_Duplicate"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
BrowseUtils.browser(url);
}
public static final MenuKeySet VIDEO = new MenuKeySet() {

2
designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java

@ -31,7 +31,7 @@ public class TutorialAction extends UpdateAction {
this.setMenuKeySet(HELP_TUTORIAL);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/help.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/help.png"));
this.setAccelerator(getMenuKeySet().getKeyStroke());
}

9
designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java

@ -570,6 +570,15 @@ public class PluginWebBridge {
//todo 初始化设计器其他部分
}
/**
* 国际化(用来做兼容暂时不删)
*/
public String parseI18(final String key) {
return com.fr.design.i18n.Toolkit.i18nText(key);
}
/**
* 是否是在设计器中操作
*/

9
designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -10,9 +10,12 @@ import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.community.BBSAction;
import com.fr.design.actions.community.BugAction;
import com.fr.design.actions.community.CenterAction;
import com.fr.design.actions.community.CusDemandAction;
import com.fr.design.actions.community.NeedAction;
import com.fr.design.actions.community.QuestionAction;
import com.fr.design.actions.community.SignAction;
import com.fr.design.actions.community.TechSolutionAction;
import com.fr.design.actions.community.UpAction;
import com.fr.design.actions.community.VideoAction;
import com.fr.design.actions.file.CloseCurrentTemplateAction;
@ -493,9 +496,11 @@ public abstract class ToolBarMenuDock {
shortCuts.add(new VideoAction());
shortCuts.add(new TutorialAction());
shortCuts.add(new QuestionAction());
shortCuts.add(new UpAction());
shortCuts.add(new NeedAction());
shortCuts.add(new TechSolutionAction());
shortCuts.add(new BugAction());
shortCuts.add(new NeedAction());
shortCuts.add(new CusDemandAction());
shortCuts.add(new CenterAction());
shortCuts.add(new SignAction());
return shortCuts.toArray(new ShortCut[shortCuts.size()]);
}

62
designer-base/src/main/java/com/fr/design/utils/BrowseUtils.java

@ -0,0 +1,62 @@
package com.fr.design.utils;
import com.fr.base.FRContext;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.OperatingSystem;
import com.fr.stable.StringUtils;
import javax.swing.JOptionPane;
import java.awt.Desktop;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
/**
* Created by XINZAI on 2018/8/23.
*/
public class BrowseUtils {
/**
* 处理内存异常win10下用rundll32打开
* @param uri 网址
* @param e
*/
private static void startBrowserFromCommand(String uri, IOException e) {
if (OperatingSystem.isWindows()) {
try {
// win10 内存用到到80%左右的时候, Desktop.browser经常提示"存储空间不足, 无法处理改命令", 用rundll32可以打开.
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + uri);
} catch (IOException ee) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser_Duplicate"));
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
} else {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
/**
* 打开网页,用默认浏览器
* @param url 网址
*/
public static void browser(String url) {
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
startBrowserFromCommand(url, exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
}
}

54
designer-base/src/main/java/com/fr/start/ServerStarter.java

@ -1,25 +1,15 @@
package com.fr.start;
import com.fr.base.FRContext;
import com.fr.base.ServerConfig;
import com.fr.design.DesignerEnvManager;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.OperatingSystem;
import com.fr.stable.StableUtils;
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;
import java.net.URI;
import java.net.URISyntaxException;
public class ServerStarter {
/**
@ -30,7 +20,7 @@ public class ServerStarter {
if (!WorkContext.getCurrent().isLocal()) {
//有问题,这里拿不到远程的http端口
browser(WorkContext.getCurrent().getPath());
BrowseUtils.browser(WorkContext.getCurrent().getPath());
}
else if (ComparatorUtils.equals(StableUtils.getInstallHome(), ".")) {//august:供代码使用
String web = GeneralContext.getCurrentAppNameOfEnv();
@ -48,7 +38,7 @@ public class ServerStarter {
FineEmbedServer.start();
} finally {
//先访问Demo, 后访问报表, 不需要重置服务器.
browser("http://localhost:" + DesignerEnvManager.getEnvManager().getEmbedServerPort() + "/" + GeneralContext.getCurrentAppNameOfEnv() + "/" + ServerConfig.getInstance().getServletName());
BrowseUtils.browser("http://localhost:" + DesignerEnvManager.getEnvManager().getEmbedServerPort() + "/" + GeneralContext.getCurrentAppNameOfEnv() + "/" + ServerConfig.getInstance().getServletName());
}
}
@ -60,42 +50,6 @@ public class ServerStarter {
public static void browserURLWithLocalEnv(String url) {
FineEmbedServer.start();
browser(url);
BrowseUtils.browser(url);
}
private static void browser(String uri) {
if (StringUtils.isEmpty(uri)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(uri));
} catch (IOException e) {
startBrowserFromCommand(uri, e);
} catch (URISyntaxException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + uri);
}
}
private static void startBrowserFromCommand(String uri, IOException e) {
if (OperatingSystem.isWindows()) {
try {
// win10 内存用到到80%左右的时候, Desktop.browser经常提示"存储空间不足, 无法处理改命令", 用rundll32可以打开.
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + uri);
} catch (IOException ee) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser_Duplicate"));
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
} else {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/bbs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/bug.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/center.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/demand.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/help.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/need.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/question.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/sign.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/solotion.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/video.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Loading…
Cancel
Save