Browse Source

REPORT-108718 设计器偶现异常弹窗can not acceptnewurl

release/11.0
Bruce.Deng 1 year ago
parent
commit
d03220af1c
  1. 16
      designer-base/src/main/java/com/fr/design/deeplink/DeepLinkCore.java
  2. 3
      designer-base/src/main/java/com/fr/design/utils/DesignUtils.java

16
designer-base/src/main/java/com/fr/design/deeplink/DeepLinkCore.java

@ -167,6 +167,22 @@ public class DeepLinkCore {
markPendingURLConsumed();
}
/**
* 符合条件的url才处理
*
* @param url 接收到的url
* @return true:处理; false:不处理
*/
public boolean accept(String url) {
UrlBean urlBean = UrlBean.create(url);
for (DeepLink deepLink: deepLinkList) {
if (deepLink.accept(urlBean.getUrl(), urlBean.getHost(), urlBean.getPath(), urlBean.getParams())) {
return true;
}
}
return false;
}
private void performDeepLinks(String url, String host, String path, Map<String, Object> params) {
SwingUtilities.invokeLater(new Runnable() {
@Override

3
designer-base/src/main/java/com/fr/design/utils/DesignUtils.java

@ -27,7 +27,6 @@ import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.ObjectHolder;
import com.fr.stable.os.OperatingSystem;
import com.fr.stable.plugin.ExtraDesignClassManagerProvider;
import com.fr.start.ServerStarter;
import com.fr.start.common.DesignerStartupContext;
import com.fr.start.common.DesignerStartupUtil;
@ -238,7 +237,7 @@ public class DesignUtils {
DesignerContext.getDesignerFrame().openTemplate(new FileFILE(f));
}
});
} else {
} else if (DeepLinkCore.getInstance().accept(line)) {
String url = line;
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override

Loading…
Cancel
Save