use of com.android.tools.idea.rendering.LogWrapper in project android by JetBrains.
the class FrameworkResourceLoader method load.
@Nullable
public static FrameworkResources load(@NotNull IAndroidTarget myTarget, boolean withLocale) throws IOException {
final ILogger logger = new LogWrapper(LOG);
final File resFolder = myTarget.getFile(IAndroidTarget.RESOURCES);
if (!resFolder.isDirectory()) {
LOG.error(AndroidBundle.message("android.directory.cannot.be.found.error", resFolder.getPath()));
return null;
}
return loadPlatformResources(resFolder, logger, withLocale);
}
use of com.android.tools.idea.rendering.LogWrapper in project android by JetBrains.
the class FileResourceRepository method createResourceMerger.
private static ResourceMerger createResourceMerger(File file, String libraryName) {
ILogger logger = new LogWrapper(LOG);
ResourceMerger merger = new ResourceMerger(0);
ResourceSet resourceSet = new ResourceSet(file.getName(), libraryName, false);
resourceSet.addSource(file);
resourceSet.setTrackSourcePositions(false);
try {
resourceSet.loadFromFiles(logger);
} catch (DuplicateDataException e) {
// This should not happen; resourceSet validation is disabled.
assert false;
} catch (MergingException e) {
LOG.warn(e);
}
merger.addDataSet(resourceSet);
return merger;
}
Aggregations