Search in sources :

Example 1 with FileInfo

use of com.google.jstestdriver.FileInfo in project intellij-plugins by JetBrains.

the class JstdTestFilePathIndex method doPutAll.

private static void doPutAll(@NotNull Map<String, Void> map, @NotNull Collection<FileInfo> fileInfos) {
    for (FileInfo fileInfo : fileInfos) {
        File file = fileInfo.toFile();
        String path = FileUtil.toSystemIndependentName(file.getAbsolutePath());
        map.put(path, null);
    }
}
Also used : FileInfo(com.google.jstestdriver.FileInfo) VirtualFile(com.intellij.openapi.vfs.VirtualFile)

Example 2 with FileInfo

use of com.google.jstestdriver.FileInfo in project intellij-plugins by JetBrains.

the class JstdDebuggingFileFinderProvider method addAllRemoteUrlMappings.

private void addAllRemoteUrlMappings(@NotNull Collection<FileInfo> filesInfo, @NotNull BiMap<String, VirtualFile> map) {
    LocalFileSystem fileSystem = LocalFileSystem.getInstance();
    for (FileInfo fileInfo : filesInfo) {
        String displayPath = fileInfo.getDisplayPath();
        File file = fileInfo.toFile();
        if (StringUtil.isNotEmpty(displayPath) && file.isFile()) {
            VirtualFile virtualFile = fileSystem.findFileByIoFile(file);
            if (virtualFile != null) {
                String url = "http://127.0.0.1:" + myServer.getSettings().getPort() + "/test/" + UriUtil.trimLeadingSlashes(displayPath);
                map.forcePut(url, virtualFile);
            }
        }
    }
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) FileInfo(com.google.jstestdriver.FileInfo) LocalFileSystem(com.intellij.openapi.vfs.LocalFileSystem) VirtualFile(com.intellij.openapi.vfs.VirtualFile)

Aggregations

FileInfo (com.google.jstestdriver.FileInfo)2 VirtualFile (com.intellij.openapi.vfs.VirtualFile)2 LocalFileSystem (com.intellij.openapi.vfs.LocalFileSystem)1