missing files handling in converter
- silently continue if no files were found to convert
This commit is contained in:
committed by
Yan Zhulanow
parent
155d2fa979
commit
2c44f5c4b7
+5
-3
@@ -121,7 +121,7 @@ public enum TopDownAnalyzerFacadeForJVM {
|
||||
@Nullable IncrementalCacheProvider incrementalCacheProvider
|
||||
) {
|
||||
List<JetFile> filesToAnalyze = new ArrayList<JetFile>(files);
|
||||
filesToAnalyze.add(searchForAndroidDeclarations(project));
|
||||
searchAndAddAndroidDeclarations(project, filesToAnalyze);
|
||||
|
||||
FileBasedDeclarationProviderFactory providerFactory =
|
||||
new FileBasedDeclarationProviderFactory(topDownAnalysisParameters.getStorageManager(), filesToAnalyze);
|
||||
@@ -177,9 +177,11 @@ public enum TopDownAnalyzerFacadeForJVM {
|
||||
return module;
|
||||
}
|
||||
|
||||
private static JetFile searchForAndroidDeclarations(Project project) {
|
||||
private static Collection<JetFile> searchAndAddAndroidDeclarations(Project project, Collection<JetFile> files) {
|
||||
AndroidUIXmlPathProvider provider = ServiceManager.getService(project, AndroidUIXmlPathProvider.class);
|
||||
Collection<File> paths = provider.getPaths();
|
||||
return new AndroidUIXmlParser(project, paths).parseToPsi();
|
||||
JetFile file = new AndroidUIXmlParser(project, paths).parseToPsi();
|
||||
if (file != null) files.add(file);
|
||||
return files;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user