|
|
|
@ -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<Form, FormUndoState> implements BaseJForm<F
|
|
|
|
|
ReuseTriggerPointManager.getInstance().registerJForm(JForm.this); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void templateSaved(JTemplate<?, ?> jt) { |
|
|
|
|
if (jt == null) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
int useCount = 0; |
|
|
|
|
if (!jt.getProcessInfo().isTestTemplate()) { |
|
|
|
|
JForm jForm = (JForm) jt; |
|
|
|
|
XLayoutContainer root = jForm.getFormDesign().getRootComponent(); |
|
|
|
|
List<XCreator> xCreators = ShareComponentUtils.getHelpConfigXCreatorList(root); |
|
|
|
|
JSONArray helpConfigUseInfo = ComponentCollector.getInstance().getHelpConfigUseInfoWithTemplate(jt.getTarget().getTemplateID()); |
|
|
|
|
for (XCreator xCreator : xCreators) { |
|
|
|
|
if (helpConfigUseInfo.contains(ShareComponentUtils.getWidgetId(xCreator.toData()))) { |
|
|
|
|
useCount++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
ComponentCollector.getInstance().collectHelpConfigInfo(jt.getTarget().getTemplateID(), xCreators.size(), useCount); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
return tabCenterPane; |
|
|
|
|
} |
|
|
|
|