Browse Source

Pull request #5273: REPORT-48167 & REPORT-48135 修复新引擎内置bug

Merge in DESIGN/design from ~LOY/design:release/11.0 to release/11.0

* commit '1a0fc19d1a054c1f4698f1d0cf9cef8bac40089a':
  REPORT-48135 修复线程池调用方式
  REPORT-48167 修复本地性能分析页面链接错误问题
fix-lag
loy 3 years ago
parent
commit
3b47f8baac
  1. 2
      designer-base/src/main/java/com/fr/design/actions/server/LocalAnalyzerAction.java
  2. 6
      designer-base/src/main/java/com/fr/nx/app/designer/transform/BatchTransformer.java

2
designer-base/src/main/java/com/fr/design/actions/server/LocalAnalyzerAction.java

@ -26,7 +26,7 @@ public class LocalAnalyzerAction extends UpdateAction {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
String path = StableUtils.pathJoin("/url", URLConstants.ANALYZE_VIEW); String path = StableUtils.pathJoin("/nx", URLConstants.ANALYZE_VIEW);
DesignUtils.visitEnvServerByParameters(path, new String[]{}, new String[]{}); DesignUtils.visitEnvServerByParameters(path, new String[]{}, new String[]{});
} }

6
designer-base/src/main/java/com/fr/nx/app/designer/transform/BatchTransformer.java

@ -2,7 +2,6 @@ package com.fr.nx.app.designer.transform;
import com.fr.design.utils.concurrent.ThreadFactoryBuilder; import com.fr.design.utils.concurrent.ThreadFactoryBuilder;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.plugin.context.PluginContexts;
import com.fr.nx.app.designer.toolbar.TransformResultInfo; import com.fr.nx.app.designer.toolbar.TransformResultInfo;
import com.fr.nx.app.designer.utils.CompileTransformUtil; import com.fr.nx.app.designer.utils.CompileTransformUtil;
@ -10,6 +9,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/** /**
* Created by kerry on 2019-12-10 * Created by kerry on 2019-12-10
@ -21,7 +21,7 @@ public class BatchTransformer {
private static final int MAXPOOLSIZE = 5; private static final int MAXPOOLSIZE = 5;
private static final String THREAD_NAME_TEMPLATE = "batchtransform-thread-%s"; private static final String THREAD_NAME_TEMPLATE = "batchtransform-thread-%s";
private ExecutorService threadPoolExecutor = private ExecutorService threadPoolExecutor =
PluginContexts.currentContext().newFixedThreadPool(MAXPOOLSIZE, Executors.newFixedThreadPool(MAXPOOLSIZE,
new ThreadFactoryBuilder().setNameFormat(THREAD_NAME_TEMPLATE).build()); new ThreadFactoryBuilder().setNameFormat(THREAD_NAME_TEMPLATE).build());
public BatchTransformer(UpdateCallBack updateCallBack) { public BatchTransformer(UpdateCallBack updateCallBack) {
@ -59,7 +59,7 @@ public class BatchTransformer {
if (threadPoolExecutor != null) { if (threadPoolExecutor != null) {
threadPoolExecutor.shutdownNow(); threadPoolExecutor.shutdownNow();
} }
threadPoolExecutor = PluginContexts.currentContext().newFixedThreadPool(MAXPOOLSIZE, threadPoolExecutor = Executors.newFixedThreadPool(MAXPOOLSIZE,
new ThreadFactoryBuilder().setNameFormat(THREAD_NAME_TEMPLATE).build()); new ThreadFactoryBuilder().setNameFormat(THREAD_NAME_TEMPLATE).build());
updateCallBack.shutDown(); updateCallBack.shutDown();
} }

Loading…
Cancel
Save