Browse Source

Merge pull request #4309 in DESIGN/design from final/10.0 to release/10.0

* commit '2403e06c154fbd6c8e0188d7e9b10ca526cb890a':
  REPORT-52554 安装了抽数缓存插件 存在npe
  REPORT-52564 插件-新自适应-插件和新主jar有不兼容问题,有的模板切换新老模式不成功
  REPORT-52212  切换远程出现白色弹窗 漏改调整
zheng-1641779399395
superman 4 years ago
parent
commit
7315d5a986
  1. 4
      designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java
  2. 57
      designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java
  3. 4
      designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java

4
designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java

@ -497,7 +497,9 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
}
public void refreshToolBar() {
toolbarDef.refreshToolBar(FORBIDDEN_SET);
if (toolbarDef != null) {
toolbarDef.refreshToolBar(FORBIDDEN_SET);
}
}
public void checkEnable() {

57
designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java

@ -44,30 +44,8 @@ class FormApp extends AbstractAppProvider {
HashMap<String, Class> classType = new HashMap<String, Class>();
classType.put(Constants.ARG_0, Form.class);
classType.put(Constants.ARG_1, FILE.class);
classType.put(Constants.ARG_2, Parameter[].class);
JForm emptyForm = new JForm(new Form(new WBorderLayout("form")), tplFile);
OpenWorker<OpenResult<Form, Parameter[]>> worker = new OpenWorker<>(
new Callable<OpenResult<Form, Parameter[]>>() {
@Override
public OpenResult<Form, Parameter[]> call() throws Exception {
Form form = asIOFile(tplFile);
return new OpenResult<>(form, form.getParameters());
}
}, emptyForm);
worker.addCallBack(new Callable<JTemplate<?, ?>>() {
@Override
public JTemplate<?, ?> call() throws Exception {
OpenResult<Form, Parameter[]> result = worker.getResult();
return compatibleForm(result.getBaseBook(), result.getRef(), tplFile, classType);
}
});
FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Report_Template_Opening_And_Waiting", tplFile.getName()) + "...");
worker.start(tplFile.getPath());
OpenResult<Form, Parameter[]> result = worker.getResult();
if (result != null) {
return compatibleForm(result.getBaseBook(), new Parameter[0], tplFile, classType);
}
return emptyForm;
return compatibleForm(tplFile, classType);
}
/**
@ -75,13 +53,36 @@ class FormApp extends AbstractAppProvider {
*
* @return
*/
private JTemplate<Form, ?> compatibleForm(Form form, Parameter[] parameters, FILE tplFile, HashMap<String, Class> classType) {
if (ComparatorUtils.equals(StableFactory.getRegisteredClass(BaseJForm.XML_TAG).getName(), JForm.class)) {
return (JTemplate<Form, ?>) StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG,
new Object[]{form, tplFile, parameters}, classType, BaseJForm.class);
private JTemplate<Form, ?> compatibleForm(FILE tplFile, HashMap<String, Class> classType) {
if (ComparatorUtils.equals(StableFactory.getRegisteredClass(BaseJForm.XML_TAG), JForm.class)) {
classType.put(Constants.ARG_2, Parameter[].class);
JForm emptyForm = new JForm(new Form(new WBorderLayout("form")), tplFile);
OpenWorker<OpenResult<Form, Parameter[]>> worker = new OpenWorker<>(
new Callable<OpenResult<Form, Parameter[]>>() {
@Override
public OpenResult<Form, Parameter[]> call() throws Exception {
Form form = asIOFile(tplFile);
return new OpenResult<>(form, form.getParameters());
}
}, emptyForm);
worker.addCallBack(new Callable<JTemplate<?, ?>>() {
@Override
public JTemplate<?, ?> call() throws Exception {
OpenResult<Form, Parameter[]> result = worker.getResult();
return (JTemplate<Form, ?>) StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG,
new Object[]{result.getBaseBook(), tplFile, result.getRef()}, classType, BaseJForm.class);
}
});
worker.start(tplFile.getPath());
OpenResult<Form, Parameter[]> result = worker.getResult();
if (result != null) {
return (JTemplate<Form, ?>) StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG,
new Object[]{result.getBaseBook(), tplFile, new Parameter[0]}, classType, BaseJForm.class);
}
return emptyForm;
} else {
return (JTemplate<Form, ?>) StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG,
new Object[]{form, tplFile}, classType, BaseJForm.class);
new Object[]{asIOFile(tplFile), tplFile}, classType, BaseJForm.class);
}
}

4
designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java

@ -2,7 +2,6 @@ package com.fr.start.module;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.PluginClassRefreshManager;
import com.fr.design.env.WorkspaceChangeLoadingDialog;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.event.Event;
import com.fr.event.Listener;
@ -62,9 +61,8 @@ public class DesignerWorkspaceActivator extends Activator {
@Override
public void on(Event event, Workspace workspace) {
HistoryTemplateListCache.getInstance().load();
PluginClassRefreshManager.getInstance().addPluginListener();
WorkspaceChangeLoadingDialog.hideDialog();
}
});
}

Loading…
Cancel
Save