ju 7 years ago
parent
commit
f6f88de665
  1. 2
      designer-base/src/com/fr/design/actions/file/LocalePane.java
  2. 2
      designer-base/src/com/fr/design/file/TemplateTreePane.java
  3. 2
      designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java
  4. 10
      designer-base/src/com/fr/design/gui/itree/filetree/FileNodeComparator.java
  5. 2
      designer-base/src/com/fr/design/gui/itree/filetree/TemplateFileTree.java
  6. 10
      designer-base/src/com/fr/file/FILEChooserPane.java
  7. 2
      designer-base/src/com/fr/file/FileNodeFILE.java
  8. 2
      designer-realize/src/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java

2
designer-base/src/com/fr/design/actions/file/LocalePane.java

@ -182,7 +182,7 @@ public class LocalePane extends BasicPane {
private void initCustomProperties() throws Exception {
FileNode[] fileNodes = FRContext.getFileOperator().list(ProjectConstants.LOCALE_NAME);
FileNode[] fileNodes = FRContext.getFileNodes().list(ProjectConstants.LOCALE_NAME);
if (ArrayUtils.getLength(fileNodes) == 0) {
return;
}

2
designer-base/src/com/fr/design/file/TemplateTreePane.java

@ -98,7 +98,7 @@ public class TemplateTreePane extends JPanel implements FileOperations {
* 刷新
*/
public void refreshDockingView() {
reportletsTree.setFileNodeFilter(new IOFileNodeFilter(FRContext.getFileOperator().getSupportedTypes()));
reportletsTree.setFileNodeFilter(new IOFileNodeFilter(FRContext.getFileNodes().getSupportedTypes()));
reportletsTree.refreshEnv();
}

2
designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java

@ -190,7 +190,7 @@ public class EnvFileTree extends RefreshableJTree {
FileNode[] res_fns = null;
try {
res_fns = WorkContext.getCurrent() == null ? new FileNode[0] : FRContext.getFileOperator().list(filePath);
res_fns = WorkContext.getCurrent() == null ? new FileNode[0] : FRContext.getFileNodes().list(filePath);
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e);
}

10
designer-base/src/com/fr/design/gui/itree/filetree/FileNodeComparator.java

@ -1,6 +1,6 @@
package com.fr.design.gui.itree.filetree;
import com.fr.base.operator.file.LocalFileOperator;
import com.fr.file.filetree.LocalFileNodes;
import com.fr.file.filetree.FileNode;
import java.util.Comparator;
@ -59,13 +59,13 @@ public class FileNodeComparator implements Comparator<FileNode> {
private int groupByFileType(FileNode nameNode1, FileNode nameNode2,
int i) {
if (i < LocalFileOperator.FILE_TYPE.length) {
if (nameNode1.isFileType(LocalFileOperator.FILE_TYPE[i]))
if (nameNode2.isFileType(LocalFileOperator.FILE_TYPE[i]))
if (i < LocalFileNodes.FILE_TYPE.length) {
if (nameNode1.isFileType(LocalFileNodes.FILE_TYPE[i]))
if (nameNode2.isFileType(LocalFileNodes.FILE_TYPE[i]))
return nameNode1.getName().toLowerCase().compareTo(nameNode2.getName().toLowerCase());
else
return-1;
else if (nameNode2.isFileType(LocalFileOperator.FILE_TYPE[i]))
else if (nameNode2.isFileType(LocalFileNodes.FILE_TYPE[i]))
return 1;
else{
return groupByFileType(nameNode1, nameNode2, i+1);

2
designer-base/src/com/fr/design/gui/itree/filetree/TemplateFileTree.java

@ -101,7 +101,7 @@ public class TemplateFileTree extends EnvFileTree {
}
public FileNode[] listFile(String path) throws Exception {
return FRContext.getFileOperator().list(
return FRContext.getFileNodes().list(
path,
new FileExtension[]{FileExtension.CPT, FileExtension.FRM, FileExtension.CPTX, FileExtension.FRMX});
}

10
designer-base/src/com/fr/file/FILEChooserPane.java

@ -3,7 +3,7 @@ package com.fr.file;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.extension.FileExtension;
import com.fr.base.operator.file.LocalFileOperator;
import com.fr.file.filetree.LocalFileNodes;
import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.BasicPane;
@ -545,10 +545,10 @@ public class FILEChooserPane extends BasicPane {
return;
}
if (editing == null || !editing.isChartBook()) {
String[] fileSuffix_local = LocalFileOperator.FILE_TYPE;
String[] fileSuffix_local = LocalFileNodes.FILE_TYPE;
EnumSet<FileExtension> fileExtensions = EnumSet.of(FileExtension.CPT, FileExtension.CPTX, FileExtension.FRM, FileExtension.FRMX, FileExtension.CHT);
if (type == JFileChooser.OPEN_DIALOG) {
if (FRContext.getFileOperator().isSupportLocalFileOperate()) { //本地连接
if (FRContext.getFileNodes().isSupportLocalFileOperate()) { //本地连接
this.addChooseFILEFilter(new ChooseFileFilter(fileSuffix_local, appName + Inter.getLocText(new String[]{"FR-App-Report_Template", "FR-App-All_File"})));
} else {
this.addChooseFILEFilter(new ChooseFileFilter(fileExtensions, appName + Inter.getLocText(new String[]{"FR-App-Report_Template", "FR-App-All_File"})));
@ -569,7 +569,7 @@ public class FILEChooserPane extends BasicPane {
}
// 添加 xls 文件类型过滤 kt
if (FRContext.getFileOperator().isSupportLocalFileOperate()) { //本地连接
if (FRContext.getFileNodes().isSupportLocalFileOperate()) { //本地连接
this.addChooseFILEFilter(new ChooseFileFilter(FileExtension.XLS, Inter.getLocText("Import-Excel_Source")));
this.addChooseFILEFilter(new ChooseFileFilter(FileExtension.XLSX, Inter.getLocText("Import-Excel2007_Source")));
}
@ -592,7 +592,7 @@ public class FILEChooserPane extends BasicPane {
for (FILEFilter aFilterList : filterList) {
defaultComboBoxModel.addElement(aFilterList);
}
if (FRContext.getFileOperator().isSupportLocalFileOperate()) { //本地连接
if (FRContext.getFileNodes().isSupportLocalFileOperate()) { //本地连接
if (!showWebReport) {
defaultComboBoxModel.addElement(Inter.getLocText("FR-Utils-App_AllFiles") + "(*.*)");
}

2
designer-base/src/com/fr/file/FileNodeFILE.java

@ -181,7 +181,7 @@ public class FileNodeFILE implements FILE {
*/
private FileNode[] listFile(String rootFilePath) {
try {
return FRContext.getFileOperator().list(rootFilePath);
return FRContext.getFileNodes().list(rootFilePath);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}

2
designer-realize/src/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java

@ -231,7 +231,7 @@ public class FileSearchManager implements AlphaFineSearchProvider {
*/
private void listAll(String rootFilePath, List<FileNode> nodeList, boolean recurse) throws Exception {
FileNode[] fns = FRContext.getFileOperator().list(rootFilePath);
FileNode[] fns = FRContext.getFileNodes().list(rootFilePath);
for (int i = 0; i < fns.length; i++) {
FileNode fileNode = fns[i];
if (fileNode.isDirectory()) {

Loading…
Cancel
Save