Browse Source

REPORT-17500 设计器无法跳转到帮助文档

bugfix/10.0
Hades 6 years ago
parent
commit
db20d7ffcf
  1. 7
      designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java

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

@ -3,6 +3,7 @@ package com.fr.design.actions.help;
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 com.fr.general.GeneralContext;
import com.fr.general.http.HttpToolbox;
@ -22,6 +23,8 @@ import java.net.URI;
public class TutorialAction extends UpdateAction {
private static final String URL_FOR_TEST_NETWORK = "https://www.baidu.com";
public TutorialAction() {
this.setMenuKeySet(HELP_TUTORIAL);
this.setName(getMenuKeySet().getMenuName());
@ -34,9 +37,11 @@ public class TutorialAction extends UpdateAction {
* 动作
* @param evt 事件
*/
@Override
public void actionPerformed(ActionEvent evt) {
String helpURL = CloudCenter.getInstance().acquireUrlByKind(createDocKey());
if (isServerOnline(helpURL)) {
// 用第三方网址去判断是否处在离线状态
if (isServerOnline(URL_FOR_TEST_NETWORK)) {
try {
Desktop.getDesktop().browse(new URI(helpURL));
return;

Loading…
Cancel
Save