Browse Source

Merge pull request #9941 in DESIGN/design from release/11.0 to bugfix/11.0

* commit 'c993f77ff9f3c15cd40bc4dacb807a105fdbe180':
  REPORT-79344【运营产品化二期】埋点暂不生效 修改pr
  REPORT-79344【运营产品化二期】埋点暂不生效 修改部分埋点
  REPORT-70593 图片控件设计器插件,原插件禁用。方案参考https://kms.fineres.com/pages/viewpage.action?pageId=457117391
  REPORT-79345 【冒烟】切换远程,日志刷报错write failed
bugfix/11.0
superman 2 years ago
parent
commit
e110f129e4
  1. 6
      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

6
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.common.util.Strings;
import com.fr.design.mainframe.DesignerContext; 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.AlphaFineHelper;
import com.fr.design.mainframe.alphafine.download.FineMarketConstants; import com.fr.design.mainframe.alphafine.download.FineMarketConstants;
import com.fr.design.mainframe.alphafine.download.FineMarketDownloadManager; import com.fr.design.mainframe.alphafine.download.FineMarketDownloadManager;
@ -80,8 +79,13 @@ public class StartUseAction implements ActionListener {
} }
// 打开模板 // 打开模板
if (fileNeedOpen == null) {
//有可能压缩包解压出来还是压缩包
FineLoggerFactory.getLogger().error("AlphaFine open resource error: " + fileName);
} else {
DesignerContext.getDesignerFrame().openTemplate(new FileFILE(fileNeedOpen)); DesignerContext.getDesignerFrame().openTemplate(new FileFILE(fileNeedOpen));
} }
}
private File getFirstCptOrFrm(File[] files) { private File getFirstCptOrFrm(File[] files) {

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.AlphaFineConstants;
import com.fr.design.mainframe.alphafine.CellType; 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.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import java.awt.*; import java.awt.Desktop;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
@ -60,8 +59,15 @@ public class DocumentModel extends AlphaCellModel {
@Override @Override
public void doAction() { public void doAction() {
openInBrowser(getDocumentUrl());
}
/**
* 方便埋点
* */
void openInBrowser(String url) {
try { try {
Desktop.getDesktop().browse(new URI(getDocumentUrl())); Desktop.getDesktop().browse(new URI(url));
} catch (IOException e) { } catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} catch (URISyntaxException 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 String fileName;
private int pkgSize; private int pkgSize;
private List<String> recommendSearchKey; private List<String> recommendSearchKey;
private boolean embed;
public static List<TemplateResource> createByJson(JSONArray jsonArray) { public static List<TemplateResource> createByJson(JSONArray jsonArray) {
List<TemplateResource> list = new ArrayList<>(); List<TemplateResource> list = new ArrayList<>();
@ -158,6 +159,18 @@ public class TemplateResource {
return this; return this;
} }
/**
* 判断是否为内置模板资源
* */
public boolean isEmbed() {
return embed;
}
public void setEmbed(boolean embed) {
this.embed = embed;
}
public String getName() { public String getName() {
return name; 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<>(); List<TemplateResource> resourceList = new ArrayList<>();
JSONArray jsonArray = getEmbedResourceJSONArray(); JSONArray jsonArray = getEmbedResourceJSONArray();
for (int i = 0; i < jsonArray.size(); i++) { 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; 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 LogHandler<DesignerLogAppender> logHandler = null;
private static final String PLUGIN_EXPORT_IMAGE_SETTING = "com.fr.plugin.exportimagesettings.v11"; 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() { private final Once pushUpdateTask = new Once(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -553,6 +554,7 @@ public class DesignerActivator extends Activator implements Prepare {
private void prepareDefaultEmbedPluginInfo() { private void prepareDefaultEmbedPluginInfo() {
addMutable(PluginEmbedInfo.KEY, DefaultPluginEmbedInfo.create(PLUGIN_EXPORT_IMAGE_SETTING)); addMutable(PluginEmbedInfo.KEY, DefaultPluginEmbedInfo.create(PLUGIN_EXPORT_IMAGE_SETTING));
addMutable(PluginEmbedInfo.KEY, DefaultPluginEmbedInfo.create(PICTURE_WIDGET_PLUGIN_ID));
} }
private void startBBSLoginAuthServer() { private void startBBSLoginAuthServer() {

Loading…
Cancel
Save