|
|
@ -87,15 +87,15 @@ public class FileSearchManager implements AlphaFineSearchProcessor { |
|
|
|
BufferedReader reader = new BufferedReader(new FileReader(filePath)); |
|
|
|
BufferedReader reader = new BufferedReader(new FileReader(filePath)); |
|
|
|
String line; |
|
|
|
String line; |
|
|
|
int columnNumber; |
|
|
|
int columnNumber; |
|
|
|
boolean test = false; |
|
|
|
boolean isFoundInContent = false; |
|
|
|
while ((line = reader.readLine()) != null) { |
|
|
|
while ((line = reader.readLine()) != null) { |
|
|
|
columnNumber = line.toLowerCase().indexOf(searchText); |
|
|
|
columnNumber = line.toLowerCase().indexOf(searchText); |
|
|
|
if (columnNumber != -1) { |
|
|
|
if (columnNumber != -1) { |
|
|
|
test = true; |
|
|
|
isFoundInContent = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (test && !isAlreadyContain) { |
|
|
|
if (isFoundInContent && !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); |
|
|
|
this.filterModelList.add(model); |
|
|
|
} |
|
|
|
} |
|
|
|
reader.close(); |
|
|
|
reader.close(); |
|
|
@ -117,7 +117,7 @@ public class FileSearchManager implements AlphaFineSearchProcessor { |
|
|
|
private boolean searchFile(String searchText, FileNode node, boolean isAlreadyContain) { |
|
|
|
private boolean searchFile(String searchText, FileNode node, boolean isAlreadyContain) { |
|
|
|
if (DesignerEnvManager.getEnvManager().getAlphafineConfigManager().isContainTemplate()) { |
|
|
|
if (DesignerEnvManager.getEnvManager().getAlphafineConfigManager().isContainTemplate()) { |
|
|
|
if (node.getName().toLowerCase().contains(searchText.toLowerCase())) { |
|
|
|
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); |
|
|
|
this.filterModelList.add(model); |
|
|
|
isAlreadyContain = true; |
|
|
|
isAlreadyContain = true; |
|
|
|
} |
|
|
|
} |
|
|
@ -178,8 +178,7 @@ public class FileSearchManager implements AlphaFineSearchProcessor { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static FileModel getModelFromCloud(String filePath) { |
|
|
|
public static FileModel getModelFromCloud(String filePath) { |
|
|
|
String name = AlphaFineHelper.findFileName(filePath); |
|
|
|
String name = AlphaFineHelper.findFileName(filePath); |
|
|
|
String content = AlphaFineHelper.findFolderName(filePath); |
|
|
|
return new FileModel(name, filePath); |
|
|
|
return new FileModel(name, content, filePath); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|