From bfdd0b52bdf76c13fcf801c061c2d5d244c26050 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 7 Oct 2024 16:28:42 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-135233=20=E8=B0=83=E6=95=B4FileNodes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/file/LocalePane.java | 7 +++--- .../fr/design/file/TemplateDirTreePane.java | 4 ++-- .../com/fr/design/file/TemplateTreePane.java | 2 +- .../file/impl/DefaultTemplateResource.java | 3 +-- .../gui/itree/filetree/EnvFileTree.java | 10 ++++---- .../itree/filetree/FileNodeComparator.java | 3 +-- .../gui/itree/filetree/FileNodeConstants.java | 3 +-- .../gui/itree/filetree/TemplateDirTree.java | 5 ++-- .../gui/itree/filetree/TemplateFileTree.java | 5 ++-- .../DesignerFrameFileDealerPane.java | 4 +--- .../com/fr/design/mainframe/JTemplate.java | 3 +-- .../java/com/fr/file/FILEChooserPane.java | 3 +-- .../main/java/com/fr/file/FileNodeFILE.java | 4 ++-- .../transform/ui/TransformFileTree.java | 14 +++++------ .../boot/init/DesignWorkContextComponent.java | 18 ++++++++------- .../manager/impl/FileSearchManager.java | 23 +++++-------------- 16 files changed, 45 insertions(+), 66 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java b/designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java index 634af28b9e..c97bd629d5 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/LocalePane.java @@ -4,14 +4,14 @@ package com.fr.design.actions.file; -import com.fr.base.FRContext; +import com.fanruan.entity.template.TemplateListBean; +import com.fanruan.repository.TemplateRepository; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.itextfield.UITextField; import com.fr.file.filetree.FileNode; import com.fr.general.GeneralUtils; - import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; @@ -153,8 +153,7 @@ public class LocalePane extends BasicPane { } private void initCustomProperties() throws Exception { - - FileNode[] fileNodes = FRContext.getFileNodes().list(ProjectConstants.LOCALE_NAME); + FileNode[] fileNodes = TemplateRepository.getInstance().list(new TemplateListBean(ProjectConstants.LOCALE_NAME)); if (ArrayUtils.getLength(fileNodes) == 0) { return; } diff --git a/designer-base/src/main/java/com/fr/design/file/TemplateDirTreePane.java b/designer-base/src/main/java/com/fr/design/file/TemplateDirTreePane.java index 1a9fec015c..1145616e9f 100644 --- a/designer-base/src/main/java/com/fr/design/file/TemplateDirTreePane.java +++ b/designer-base/src/main/java/com/fr/design/file/TemplateDirTreePane.java @@ -1,6 +1,6 @@ package com.fr.design.file; -import com.fr.base.FRContext; +import com.fanruan.repository.TemplateRepository; import com.fr.design.border.FineBorderFactory; import com.fr.design.gui.itree.filetree.TemplateDirTree; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; @@ -74,7 +74,7 @@ public class TemplateDirTreePane extends JPanel { * 刷新 */ public void refreshDockingView() { - templateDirTree.setFileNodeFilter(new IOFileNodeFilter(FRContext.getFileNodes().getSupportedTypes())); + templateDirTree.setFileNodeFilter(new IOFileNodeFilter(TemplateRepository.getInstance().getSupportedTypes())); templateDirTree.refreshEnv(); } diff --git a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java index d15c65f241..4eb45fface 100644 --- a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java +++ b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java @@ -63,7 +63,7 @@ import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.stream.Collectors; -import com.fr.workspace.server.repository.template.TemplateRepository; +import com.fanruan.repository.TemplateRepository; import com.fr.workspace.server.vcs.VcsOperator; import org.jetbrains.annotations.Nullable; diff --git a/designer-base/src/main/java/com/fr/design/file/impl/DefaultTemplateResource.java b/designer-base/src/main/java/com/fr/design/file/impl/DefaultTemplateResource.java index 96f01f231f..5c4766adc5 100644 --- a/designer-base/src/main/java/com/fr/design/file/impl/DefaultTemplateResource.java +++ b/designer-base/src/main/java/com/fr/design/file/impl/DefaultTemplateResource.java @@ -2,8 +2,7 @@ package com.fr.design.file.impl; import com.fr.file.FILE; import com.fr.workspace.WorkContext; -import com.fr.workspace.server.lock.TplOperator; -import com.fr.workspace.server.repository.template.TemplateRepository; +import com.fanruan.repository.TemplateRepository; import java.io.ByteArrayInputStream; import java.io.InputStream; diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/EnvFileTree.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/EnvFileTree.java index 1a14821d00..1d5405bd89 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/EnvFileTree.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/EnvFileTree.java @@ -1,6 +1,7 @@ package com.fr.design.gui.itree.filetree; -import com.fr.base.FRContext; +import com.fanruan.entity.template.TemplateListBean; +import com.fanruan.repository.TemplateRepository; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.RefreshableJTree; import com.fr.design.i18n.Toolkit; @@ -11,13 +12,12 @@ import com.fr.log.FineLoggerFactory; import com.fr.stable.CoreConstants; import com.fr.stable.StableUtils; import com.fr.workspace.WorkContext; -import com.fr.workspace.server.repository.template.TemplateRepository; -import javax.swing.JTree; +import javax.swing.*; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; -import java.awt.Component; +import java.awt.*; import java.io.File; import java.util.Arrays; import java.util.HashMap; @@ -188,7 +188,7 @@ public class EnvFileTree extends RefreshableJTree { FileNode[] resFns = null; try { - resFns = WorkContext.getCurrent() == null ? new FileNode[0] : FRContext.getFileNodes().list(filePath); + resFns = WorkContext.getCurrent() == null ? new FileNode[0] : TemplateRepository.getInstance().list(new TemplateListBean(filePath)); } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeComparator.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeComparator.java index 1429aac3e0..32cad14b5e 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeComparator.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeComparator.java @@ -1,8 +1,7 @@ package com.fr.design.gui.itree.filetree; -import com.fr.base.FRContext; import com.fr.file.filetree.FileNode; -import com.fr.workspace.server.repository.template.TemplateRepository; +import com.fanruan.repository.TemplateRepository; import java.io.Serializable; import java.util.Arrays; diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeConstants.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeConstants.java index 242865aeca..13d1d2490f 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeConstants.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeConstants.java @@ -1,6 +1,5 @@ package com.fr.design.gui.itree.filetree; -import com.fr.base.FRContext; import com.fr.base.extension.FileExtension; import com.fr.general.GeneralContext; import com.fr.plugin.context.PluginContext; @@ -10,7 +9,7 @@ import com.fr.plugin.observer.PluginEvent; import com.fr.plugin.observer.PluginEventListener; import com.fr.report.ExtraReportClassManager; import com.fr.report.fun.ReportSupportedFileProvider; -import com.fr.workspace.server.repository.template.TemplateRepository; +import com.fanruan.repository.TemplateRepository; import java.util.Arrays; import java.util.LinkedHashSet; diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateDirTree.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateDirTree.java index 82f7bc3269..57bd2170af 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateDirTree.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateDirTree.java @@ -1,11 +1,10 @@ package com.fr.design.gui.itree.filetree; -import com.fr.base.FRContext; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.mainframe.manager.search.TemplateDirTreeSearchManager; import com.fr.file.filetree.FileNode; -import com.fr.workspace.server.entity.template.TemplateListBean; -import com.fr.workspace.server.repository.template.TemplateRepository; +import com.fanruan.entity.template.TemplateListBean; +import com.fanruan.repository.TemplateRepository; import java.util.Arrays; import java.util.Map; diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java index ad36be8cd4..b939e3d9d9 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java @@ -1,6 +1,5 @@ package com.fr.design.gui.itree.filetree; -import com.fr.base.FRContext; import com.fr.base.extension.FileExtension; import com.fr.design.ExtraDesignClassManager; import com.fr.design.file.NodeAuthProcessor; @@ -13,8 +12,8 @@ import com.fr.stable.ArrayUtils; import com.fr.stable.StableUtils; import com.fr.stable.collections.CollectionUtils; import com.fr.stable.project.ProjectConstants; -import com.fr.workspace.server.entity.template.TemplateListBean; -import com.fr.workspace.server.repository.template.TemplateRepository; +import com.fanruan.entity.template.TemplateListBean; +import com.fanruan.repository.TemplateRepository; import javax.swing.text.Position; import javax.swing.tree.DefaultTreeModel; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index 264cfc0016..c996e12622 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -52,7 +52,6 @@ import com.fr.event.Event; import com.fr.file.filetree.FileNode; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralContext; -import com.fr.general.IOUtils; import com.fr.log.FineLoggerFactory; import com.fr.plugin.context.PluginContext; import com.fr.plugin.injectable.PluginModule; @@ -67,8 +66,7 @@ import com.fr.stable.project.ProjectConstants; import com.fr.third.org.apache.commons.io.FilenameUtils; import com.fr.workspace.WorkContext; -import com.fr.report.lock.LockInfoOperator; -import com.fr.workspace.server.repository.template.TemplateRepository; +import com.fanruan.repository.TemplateRepository; import javax.swing.BorderFactory; import javax.swing.JDialog; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index e280028646..4fba7b581d 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -101,9 +101,8 @@ import com.fr.stable.core.UUID; import com.fr.widgettheme.designer.WidgetThemeDisplayAction; import com.fr.workspace.WorkContext; import com.fr.workspace.server.lock.TplOperator; -import com.fr.workspace.server.repository.WorkplaceConstants; import com.fr.workspace.server.repository.connection.ConnectionRepository; -import com.fr.workspace.server.repository.template.TemplateRepository; +import com.fanruan.repository.TemplateRepository; import javax.swing.BorderFactory; import javax.swing.Icon; diff --git a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java index 8ca9918274..06620ba719 100644 --- a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java +++ b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java @@ -22,7 +22,6 @@ import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.NodeAuthProcessor; import com.fr.design.fun.ReportSupportedFileUIProvider; import com.fr.design.gui.ibutton.UIButton; -import com.fr.design.gui.ibutton.UIButtonUI; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.DefaultCompletionFilter; @@ -55,7 +54,7 @@ import com.fr.stable.project.ProjectConstants; import com.fr.workspace.WorkContext; import com.fr.workspace.Workspace; import com.fr.workspace.WorkspaceEvent; -import com.fr.workspace.server.repository.template.TemplateRepository; +import com.fanruan.repository.TemplateRepository; import javax.swing.AbstractAction; import javax.swing.AbstractListModel; diff --git a/designer-base/src/main/java/com/fr/file/FileNodeFILE.java b/designer-base/src/main/java/com/fr/file/FileNodeFILE.java index 72570935a9..168a3c315a 100644 --- a/designer-base/src/main/java/com/fr/file/FileNodeFILE.java +++ b/designer-base/src/main/java/com/fr/file/FileNodeFILE.java @@ -23,9 +23,9 @@ import com.fr.workspace.WorkContext; import com.fr.workspace.Workspace; import com.fr.workspace.WorkspaceEvent; import com.fr.workspace.server.entity.WorkResourceTempRenameStream; -import com.fr.workspace.server.entity.template.TemplateListBean; +import com.fanruan.entity.template.TemplateListBean; import com.fr.workspace.server.repository.system.WorkspaceSystemInfo; -import com.fr.workspace.server.repository.template.TemplateRepository; +import com.fanruan.repository.TemplateRepository; import javax.swing.*; import java.io.InputStream; diff --git a/designer-base/src/main/java/com/fr/nx/app/designer/transform/ui/TransformFileTree.java b/designer-base/src/main/java/com/fr/nx/app/designer/transform/ui/TransformFileTree.java index cbfcd253fc..f73a6d4870 100644 --- a/designer-base/src/main/java/com/fr/nx/app/designer/transform/ui/TransformFileTree.java +++ b/designer-base/src/main/java/com/fr/nx/app/designer/transform/ui/TransformFileTree.java @@ -1,6 +1,7 @@ package com.fr.nx.app.designer.transform.ui; -import com.fr.base.FRContext; +import com.fanruan.entity.template.TemplateListBean; +import com.fanruan.repository.TemplateRepository; import com.fr.base.extension.FileExtension; import com.fr.design.gui.itree.checkboxtree.CheckBoxTree; import com.fr.design.gui.itree.checkboxtree.CheckBoxTreeCellRenderer; @@ -10,13 +11,12 @@ import com.fr.design.remote.ui.tree.FileAuthorityTree; import com.fr.file.filetree.FileNode; import com.fr.general.ComparatorUtils; import com.fr.nx.app.designer.transform.BatchTransformUtil; +import com.fr.stable.StringUtils; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreeCellRenderer; import javax.swing.tree.TreePath; -import java.awt.AlphaComposite; -import java.awt.Graphics; -import java.awt.Graphics2D; +import java.awt.*; import java.awt.event.MouseEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; @@ -166,10 +166,8 @@ public class TransformFileTree extends FileAuthorityTree { for (String temp : this.filter.getSupportedTypes()) { supportTypes.add(FileExtension.parse(temp)); } - FileNode[] fileNodes = FRContext.getFileNodes().list( - path, - supportTypes.toArray(new FileExtension[supportTypes.size()]) - ); + TemplateListBean bean = new TemplateListBean(path, StringUtils.EMPTY, supportTypes.toArray(new FileExtension[supportTypes.size()]), false, true, false); + FileNode[] fileNodes = TemplateRepository.getInstance().list(bean); return BatchTransformUtil.filterTransformedFile(fileNodes, transformedList); } diff --git a/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java b/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java index 1756a1952c..7f4f976ce8 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java @@ -1,5 +1,6 @@ package com.fanruan.boot.init; +import com.fanruan.boot.RepositorySourceRegister; import com.fanruan.carina.Carina; import com.fanruan.carina.annotions.DependsOn; import com.fanruan.carina.annotions.FineComponent; @@ -7,18 +8,14 @@ import com.fanruan.carina.annotions.Start; import com.fanruan.carina.annotions.Stop; import com.fanruan.carina.annotions.Supplemental; import com.fanruan.plugin.autonomy.AutonomyClassManagerGroup; +import com.fanruan.repository.TemplateRepository; import com.fanruan.workplace.conetxt.CompatiblePool; import com.fanruan.workplace.http.HttpConstants; import com.fanruan.workplace.http.RepositoryManager; import com.fanruan.workplace.http.WorkspaceHeartBeatShell; import com.fanruan.workplace.http.exception.DefaultRemoteExceptionHandler; -import com.fr.report.UnLockedHandler; -import com.fr.workspace.engine.exception.RemoteDesignLoginLockHandler; -import com.fr.workspace.engine.exception.RemoteDesignNoAuthHandler; -import com.fr.workspace.engine.exception.RemoteDesignPasswordNeedUpdateHandler; -import com.fr.workspace.engine.exception.RemoteDesignPasswordStrengthHandler; -import com.fr.workspace.engine.exception.RemoteDesignUserPwdErrorHandler; import com.fanruan.workplace.http.exception.RemoteExceptionConvert; +import com.fanruan.workplace.network.RemoteNetworkRepository; import com.fanruan.workplace.standard.ServerInfo; import com.fanruan.workplace.standard.ServerInfoOperator; import com.fr.base.io.FileAssistUtils; @@ -38,6 +35,7 @@ import com.fr.file.filetree.FileNodes; import com.fr.file.filetree.LocalFileNodes; import com.fr.general.build.BuildInfoOperator; import com.fr.general.build.impl.BuildInfoOperatorImpl; +import com.fr.report.UnLockedHandler; import com.fr.security.encryption.storage.StorageEncryptors; import com.fr.security.encryption.storage.StorageTransfer; import com.fr.stable.StringUtils; @@ -50,6 +48,11 @@ import com.fr.workspace.engine.FineWorkspaceFactory; import com.fr.workspace.engine.base.FineObjectPool; import com.fr.workspace.engine.client.heartbeart.FineWorkspaceHeartbeat; import com.fr.workspace.engine.client.heartbeart.WorkspaceHeartbeat; +import com.fr.workspace.engine.exception.RemoteDesignLoginLockHandler; +import com.fr.workspace.engine.exception.RemoteDesignNoAuthHandler; +import com.fr.workspace.engine.exception.RemoteDesignPasswordNeedUpdateHandler; +import com.fr.workspace.engine.exception.RemoteDesignPasswordStrengthHandler; +import com.fr.workspace.engine.exception.RemoteDesignUserPwdErrorHandler; import com.fr.workspace.engine.exception.RemoteDriverUnExistHandler; import com.fr.workspace.engine.exception.RemoteProcedureErrorHandler; import com.fr.workspace.engine.resource.FineWorkResource; @@ -60,7 +63,6 @@ import com.fr.workspace.resource.WorkResource; import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository; import com.fr.workspace.server.repository.compatible.CompatibleConnectionOperator; import com.fr.workspace.server.repository.compatible.register.CompatibleRegister; -import com.fanruan.workplace.network.RemoteNetworkRepository; import com.fr.workspace.server.repository.config.ConfigRepository; import com.fr.workspace.server.repository.connection.ConnectionRepository; import com.fr.workspace.server.repository.plugin.PluginRepository; @@ -68,7 +70,6 @@ import com.fr.workspace.server.repository.resource.PublicResourceRepository; import com.fr.workspace.server.repository.resource.WorkResourceRepository; import com.fr.workspace.server.repository.system.SystemInfoRepository; import com.fr.workspace.server.repository.tabledata.TableDataRepository; -import com.fr.workspace.server.repository.template.TemplateRepository; import com.fr.workspace.server.repository.vcs.VcsRepository; import com.fr.workspace.server.repository.widget.ShareRepository; @@ -94,6 +95,7 @@ public class DesignWorkContextComponent { public void prepare() { supplementalExtra(); supplementalCommon(); + RepositorySourceRegister.registerRepositorySource(); } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java index 5f358bbb5e..a5ed74e5fc 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java @@ -1,6 +1,5 @@ package com.fr.design.mainframe.alphafine.search.manager.impl; -import com.fr.base.FRContext; import com.fr.base.extension.FileExtension; import com.fr.design.DesignerEnvManager; import com.fr.design.actions.help.alphafine.AlphaFineConstants; @@ -12,14 +11,12 @@ import com.fr.design.mainframe.alphafine.model.SearchResult; import com.fr.design.mainframe.alphafine.search.SearchTextBean; import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider; import com.fr.file.filetree.FileNode; -import com.fr.file.filetree.FileNodes; import com.fr.general.ComparatorUtils; import com.fr.json.JSONObject; -import com.fr.rpc.ExceptionHandler; -import com.fr.rpc.RPCInvokerExceptionInfo; import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; -import com.fr.workspace.WorkContext; +import com.fanruan.entity.template.TemplateListBean; +import com.fanruan.repository.TemplateRepository; import java.util.List; @@ -83,12 +80,8 @@ public class FileSearchManager implements AlphaFineSearchProvider { return lessModelList; } AlphaFineHelper.checkCancel(); - fileNodes = WorkContext.getCurrent().get(FileNodes.class, new ExceptionHandler() { - @Override - public Object callHandler(RPCInvokerExceptionInfo exceptionInfo) { - return FRContext.getFileNodes().list(ProjectConstants.REPORTLETS_NAME, AlphaFineConstants.FILE_EXTENSIONS, true); - } - }).list(ProjectConstants.REPORTLETS_NAME, AlphaFineConstants.FILE_EXTENSIONS, true, false); + TemplateListBean bean = new TemplateListBean(ProjectConstants.REPORTLETS_NAME, StringUtils.EMPTY, AlphaFineConstants.FILE_EXTENSIONS, true, false, false); + fileNodes = TemplateRepository.getInstance().list(bean); isContainCpt = true; isContainFrm = true; doSearch(this.searchText); @@ -161,12 +154,8 @@ public class FileSearchManager implements AlphaFineSearchProvider { */ private void doFileContentSearch(String searchText) { if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainFileContent()) { - FileNode[] fileNodes = WorkContext.getCurrent().get(FileNodes.class, new ExceptionHandler() { - @Override - public Object callHandler(RPCInvokerExceptionInfo exceptionInfo) { - return FRContext.getFileNodes().filterFiles(searchText, ProjectConstants.REPORTLETS_NAME, new FileExtension[]{FileExtension.CPT, FileExtension.FRM}, true); - } - }).filterFiles(searchText, ProjectConstants.REPORTLETS_NAME, new FileExtension[]{FileExtension.CPT, FileExtension.FRM}, true, false); + TemplateListBean bean = new TemplateListBean(ProjectConstants.REPORTLETS_NAME, searchText, new FileExtension[]{FileExtension.CPT, FileExtension.FRM}, true, false, false); + FileNode[] fileNodes = TemplateRepository.getInstance().filterFiles(bean); for (FileNode node : fileNodes) { FileModel model = new FileModel(node.getName(), node.getEnvPath()); if (!AlphaFineHelper.getFilterResult().contains(model) && !filterModelList.contains(model)) {