|
|
@ -15,16 +15,11 @@ import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.FRLogger; |
|
|
|
import com.fr.general.FRLogger; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.json.JSONObject; |
|
|
|
import com.fr.json.JSONObject; |
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.project.ProjectConstants; |
|
|
|
import com.fr.stable.project.ProjectConstants; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.BufferedReader; |
|
|
|
import java.io.BufferedReader; |
|
|
|
import java.io.File; |
|
|
|
import java.io.File; |
|
|
|
import java.io.FileInputStream; |
|
|
|
|
|
|
|
import java.io.FileNotFoundException; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
|
|
|
|
import java.io.InputStream; |
|
|
|
|
|
|
|
import java.io.InputStreamReader; |
|
|
|
import java.io.InputStreamReader; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
@ -123,7 +118,9 @@ public class FileSearchManager implements AlphaFineSearchProvider { |
|
|
|
for (FileNode node : fileNodes) { |
|
|
|
for (FileNode node : fileNodes) { |
|
|
|
boolean isAlreadyContain = false; |
|
|
|
boolean isAlreadyContain = false; |
|
|
|
isAlreadyContain = searchFile(searchText, node, isAlreadyContain, needMore); |
|
|
|
isAlreadyContain = searchFile(searchText, node, isAlreadyContain, needMore); |
|
|
|
|
|
|
|
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainFileContent() && node.getLock() == null) { |
|
|
|
searchFileContent(env, searchText, node, isAlreadyContain, needMore); |
|
|
|
searchFileContent(env, searchText, node, isAlreadyContain, needMore); |
|
|
|
|
|
|
|
} |
|
|
|
if (filterModelList.size() > AlphaFineConstants.SHOW_SIZE && stopSearch) { |
|
|
|
if (filterModelList.size() > AlphaFineConstants.SHOW_SIZE && stopSearch) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -150,7 +147,6 @@ public class FileSearchManager implements AlphaFineSearchProvider { |
|
|
|
* @param isAlreadyContain |
|
|
|
* @param isAlreadyContain |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void searchFileContent(Env env, String searchText, FileNode node, boolean isAlreadyContain, boolean needMore) { |
|
|
|
private void searchFileContent(Env env, String searchText, FileNode node, boolean isAlreadyContain, boolean needMore) { |
|
|
|
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainFileContent()) { |
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
InputStreamReader isr = new InputStreamReader(env.readBean(node.getEnvPath().substring(ProjectConstants.REPORTLETS_NAME.length() + 1), ProjectConstants.REPORTLETS_NAME), "UTF-8"); |
|
|
|
InputStreamReader isr = new InputStreamReader(env.readBean(node.getEnvPath().substring(ProjectConstants.REPORTLETS_NAME.length() + 1), ProjectConstants.REPORTLETS_NAME), "UTF-8"); |
|
|
|
BufferedReader reader = new BufferedReader(isr); |
|
|
|
BufferedReader reader = new BufferedReader(isr); |
|
|
@ -180,7 +176,6 @@ public class FileSearchManager implements AlphaFineSearchProvider { |
|
|
|
FRLogger.getLogger().error("file read error: " + e.getMessage()); |
|
|
|
FRLogger.getLogger().error("file read error: " + e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 搜索模板 |
|
|
|
* 搜索模板 |
|
|
@ -198,7 +193,7 @@ public class FileSearchManager implements AlphaFineSearchProvider { |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
|
filterModelList.add(model); |
|
|
|
filterModelList.add(model); |
|
|
|
} |
|
|
|
} |
|
|
|
if(filterModelList.size() > AlphaFineConstants.SHOW_SIZE && needMore) { |
|
|
|
if (filterModelList.size() > AlphaFineConstants.SHOW_SIZE && needMore) { |
|
|
|
stopSearch = true; |
|
|
|
stopSearch = true; |
|
|
|
} |
|
|
|
} |
|
|
|
isAlreadyContain = true; |
|
|
|
isAlreadyContain = true; |
|
|
|