Browse Source

Merge pull request #9942 in DESIGN/design from bugfix/11.0 to feature/x

* commit 'e110f129e4d75fa25cb4d553402ae976473e4806':
  REPORT-79344【运营产品化二期】埋点暂不生效 修改pr
  REPORT-79344【运营产品化二期】埋点暂不生效 修改部分埋点
  REPORT-70593 图片控件设计器插件,原插件禁用。方案参考https://kms.fineres.com/pages/viewpage.action?pageId=457117391
  REPORT-79345 【冒烟】切换远程,日志刷报错write failed
feature/x
superman 2 years ago
parent
commit
b4a4ebfe53
  1. 8
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/action/StartUseAction.java
  2. 14
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/DocumentModel.java
  3. 13
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/model/TemplateResource.java
  4. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/TemplateResourceSearchManager.java
  5. 2
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

8
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/action/StartUseAction.java

@ -2,7 +2,6 @@ package com.fr.design.mainframe.alphafine.action;
import com.fr.common.util.Strings;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrameFileDealerPane;
import com.fr.design.mainframe.alphafine.AlphaFineHelper;
import com.fr.design.mainframe.alphafine.download.FineMarketConstants;
import com.fr.design.mainframe.alphafine.download.FineMarketDownloadManager;
@ -80,7 +79,12 @@ public class StartUseAction implements ActionListener {
}
// 打开模板
DesignerContext.getDesignerFrame().openTemplate(new FileFILE(fileNeedOpen));
if (fileNeedOpen == null) {
//有可能压缩包解压出来还是压缩包
FineLoggerFactory.getLogger().error("AlphaFine open resource error: " + fileName);
} else {
DesignerContext.getDesignerFrame().openTemplate(new FileFILE(fileNeedOpen));
}
}

14
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/DocumentModel.java

@ -2,11 +2,10 @@ package com.fr.design.mainframe.alphafine.cell.model;
import com.fr.design.mainframe.alphafine.AlphaFineConstants;
import com.fr.design.mainframe.alphafine.CellType;
import com.fr.log.FineLoggerFactory;
import com.fr.json.JSONException;
import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import java.awt.*;
import java.awt.Desktop;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
@ -60,8 +59,15 @@ public class DocumentModel extends AlphaCellModel {
@Override
public void doAction() {
openInBrowser(getDocumentUrl());
}
/**
* 方便埋点
* */
void openInBrowser(String url) {
try {
Desktop.getDesktop().browse(new URI(getDocumentUrl()));
Desktop.getDesktop().browse(new URI(url));
} catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
} catch (URISyntaxException e) {

13
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/model/TemplateResource.java

@ -63,6 +63,7 @@ public class TemplateResource {
private String fileName;
private int pkgSize;
private List<String> recommendSearchKey;
private boolean embed;
public static List<TemplateResource> createByJson(JSONArray jsonArray) {
List<TemplateResource> list = new ArrayList<>();
@ -158,6 +159,18 @@ public class TemplateResource {
return this;
}
/**
* 判断是否为内置模板资源
* */
public boolean isEmbed() {
return embed;
}
public void setEmbed(boolean embed) {
this.embed = embed;
}
public String getName() {
return name;
}

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/TemplateResourceSearchManager.java

@ -69,7 +69,9 @@ public class TemplateResourceSearchManager {
List<TemplateResource> resourceList = new ArrayList<>();
JSONArray jsonArray = getEmbedResourceJSONArray();
for (int i = 0; i < jsonArray.size(); i++) {
resourceList.add(TemplateResource.createByJson(jsonArray.getJSONObject(i)));
TemplateResource resource = TemplateResource.createByJson(jsonArray.getJSONObject(i));
resource.setEmbed(true);
resourceList.add(resource);
}
return resourceList;
}

2
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -161,6 +161,7 @@ public class DesignerActivator extends Activator implements Prepare {
private LogHandler<DesignerLogAppender> logHandler = null;
private static final String PLUGIN_EXPORT_IMAGE_SETTING = "com.fr.plugin.exportimagesettings.v11";
private static final String PICTURE_WIDGET_PLUGIN_ID = "com.fr.plugin.widget.picture.v11";
private final Once pushUpdateTask = new Once(new Runnable() {
@Override
public void run() {
@ -553,6 +554,7 @@ public class DesignerActivator extends Activator implements Prepare {
private void prepareDefaultEmbedPluginInfo() {
addMutable(PluginEmbedInfo.KEY, DefaultPluginEmbedInfo.create(PLUGIN_EXPORT_IMAGE_SETTING));
addMutable(PluginEmbedInfo.KEY, DefaultPluginEmbedInfo.create(PICTURE_WIDGET_PLUGIN_ID));
}
private void startBBSLoginAuthServer() {

Loading…
Cancel
Save