diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index 1bffe08428..3047ca99ca 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java @@ -15,6 +15,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.mainframe.reuse.ReuseGuideDialog; import com.fr.design.mainframe.reuse.SnapChatKeys; +import com.fr.design.mainframe.share.collect.ComponentCollector; import com.fr.design.menu.SnapChatUtil; import com.fr.design.notification.SnapChat; import com.fr.design.notification.SnapChatFactory; @@ -313,6 +314,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { new ActionListener() { @Override public void actionPerformed(ActionEvent e) { + ComponentCollector.getInstance().collectCmpBoardClick(); ComponentReuseNotifyUtil.enterWidgetLibExtraAction(true); } }); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java index 1fa2b993e7..3ea805deb0 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java @@ -12,6 +12,7 @@ import com.fr.form.share.Group; import com.fr.form.share.group.filter.DirFilter; import com.fr.form.share.group.filter.ReuFilter; import com.fr.general.ComparatorUtils; +import com.fr.general.GeneralUtils; import com.fr.json.JSON; import com.fr.json.JSONArray; import com.fr.json.JSONException; @@ -371,7 +372,7 @@ public class ComponentCollector implements XMLable { sortType = JSONFactory.createJSON(JSON.ARRAY); } - private int cmpBoardClickDaily() { + private int cmpBoardClickDaily() { DateTime dateTime = DateTime.parse(startTime); DateTime currTime = DateTime.now(); @@ -524,7 +525,7 @@ public class ComponentCollector implements XMLable { jo.put("userId", MarketConfig.getInstance().getBBSAttr().getBbsUid()); jo.put("uuid", uuid); jo.put("cmpBoardClickDaily", cmpBoardClickDaily()); - jo.put("pluginVersion", PluginContexts.currentContext().getVersion()); + jo.put("pluginVersion", GeneralUtils.readBuildNO()); jo.put("localCmpNumber", localCmpNumber); jo.put("remoteCmpNumber", remoteCmpNumber); jo.put("uploadCmpNumber", uploadCmpNumber); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/CollectorManager.java b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/SharableCollectorManager.java similarity index 90% rename from designer-base/src/main/java/com/fr/design/mainframe/share/collect/CollectorManager.java rename to designer-base/src/main/java/com/fr/design/mainframe/share/collect/SharableCollectorManager.java index 3ccb624297..2ea9820016 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/CollectorManager.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/SharableCollectorManager.java @@ -14,7 +14,7 @@ import java.util.concurrent.TimeUnit; /** * created by Harrison on 2020/03/25 **/ -public class CollectorManager { +public class SharableCollectorManager { /** * 1 天 @@ -32,10 +32,10 @@ public class CollectorManager { private ScheduledExecutorService service; private static class ConfigManagerHolder { - private static CollectorManager instance = new CollectorManager(); + private static SharableCollectorManager instance = new SharableCollectorManager(); } - public static CollectorManager getInstance() { + public static SharableCollectorManager getInstance() { return ConfigManagerHolder.instance; } @@ -43,7 +43,7 @@ public class CollectorManager { public void execute() { service = Executors - .newSingleThreadScheduledExecutor(new NamedThreadFactory("plugin-CollectorManager", true)); + .newSingleThreadScheduledExecutor(new NamedThreadFactory("SharableComponentCollectorManager", true)); service.scheduleAtFixedRate(new Runnable() { @Override public void run() { diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java index 63a1e24211..e0fe677527 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java @@ -255,6 +255,10 @@ public class XChartEditor extends XBorderStyleWidgetCreator { * @param e 鼠标点击事件 */ public void respondClick(EditingMouseListener editingMouseListener, MouseEvent e) { + if (this.isShareConfigButtonFocus()) { + CoverReportPane.showShareConfig(((XCreator) this.getParent()).toData()); + return; + } FormDesigner designer = editingMouseListener.getDesigner(); SelectionModel selectionModel = editingMouseListener.getSelectionModel(); isEditing = e.getButton() == MouseEvent.BUTTON1 && @@ -275,11 +279,6 @@ public class XChartEditor extends XBorderStyleWidgetCreator { } } } - if (this.isShareConfigButtonFocus()) { - CoverReportPane.showShareConfig(((XCreator) this.getParent()).toData()); - } - - } @Override diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 2a130dad49..c67280caa1 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -45,6 +45,8 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.form.FormECCompositeProvider; import com.fr.design.mainframe.form.FormECDesignerProvider; +import com.fr.design.mainframe.share.collect.ComponentCollector; +import com.fr.design.mainframe.share.util.ShareComponentUtils; import com.fr.design.mainframe.template.info.JFormProcessInfo; import com.fr.design.mainframe.template.info.TemplateProcessInfo; import com.fr.design.mainframe.toolbar.ToolBarMenuDock; @@ -74,6 +76,7 @@ import com.fr.form.ui.Widget; import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WLayout; import com.fr.general.ComparatorUtils; +import com.fr.json.JSONArray; import com.fr.log.FineLoggerFactory; import com.fr.page.PaperSettingProvider; import com.fr.plugin.observer.PluginEventListener; @@ -337,6 +340,28 @@ public class JForm extends JTemplate