Browse Source

代码质量

master
XiaXiang 8 years ago
parent
commit
7f73b92e0a
  1. 6
      designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java

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

@ -87,14 +87,14 @@ 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()); FileModel model = new FileModel(node.getName(), node.getEnvPath());
this.filterModelList.add(model); this.filterModelList.add(model);
} }

Loading…
Cancel
Save