XiaXiang 8 years ago
parent
commit
ce1bccd2ed
  1. 6
      designer/src/com/fr/design/mainframe/alphafine/cell/model/FileModel.java
  2. 7
      designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java

6
designer/src/com/fr/design/mainframe/alphafine/cell/model/FileModel.java

@ -16,10 +16,10 @@ public class FileModel extends AlphaCellModel{
super(name, content, type);
}
public FileModel(String name, String content, String filePath) {
super(name, content, CellType.FILE);
public FileModel(String name, String filePath) {
super(name, null, CellType.FILE);
this.filePath = filePath;
setDescription(AlphaFineHelper.findFolderName(content));
setDescription(AlphaFineHelper.findFolderName(filePath));
}
public String getFilePath() {

7
designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java

@ -95,7 +95,7 @@ public class FileSearchManager implements AlphaFineSearchProcessor {
}
}
if (test && !isAlreadyContain) {
FileModel model = new FileModel(node.getName(), node.getEnvPath().substring(ProjectConstants.REPORTLETS_NAME.length()), node.getEnvPath());
FileModel model = new FileModel(node.getName(), node.getEnvPath());
this.filterModelList.add(model);
}
reader.close();
@ -117,7 +117,7 @@ public class FileSearchManager implements AlphaFineSearchProcessor {
private boolean searchFile(String searchText, FileNode node, boolean isAlreadyContain) {
if (DesignerEnvManager.getEnvManager().getAlphafineConfigManager().isContainTemplate()) {
if (node.getName().toLowerCase().contains(searchText.toLowerCase())) {
FileModel model = new FileModel(node.getName(), node.getEnvPath().substring(node.getName().length(), node.getEnvPath().length()),node.getEnvPath());
FileModel model = new FileModel(node.getName(), node.getEnvPath());
this.filterModelList.add(model);
isAlreadyContain = true;
}
@ -178,8 +178,7 @@ public class FileSearchManager implements AlphaFineSearchProcessor {
*/
public static FileModel getModelFromCloud(String filePath) {
String name = AlphaFineHelper.findFileName(filePath);
String content = AlphaFineHelper.findFolderName(filePath);
return new FileModel(name, content, filePath);
return new FileModel(name, filePath);
}
}

Loading…
Cancel
Save