Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
270,900 | void () { VirtualFile userHome = myFS.refreshAndFindFileByPath(SystemProperties.getUserHome()); assertNotNull(userHome); VirtualFile home = userHome.getParent(); assumeTrue("User home is mapped to root (" + userHome + ")", home != null); assertThat(myFS.list(home)).containsExactlyInAnyOrder(new File(home.getPath()).lis... | testMountFilterSanity |
270,901 | void () { File newDir = tempDir.newDirectory("someDir-32"); VirtualFile newDirFile = myFS.refreshAndFindFileByPath(newDir.getPath()); assertNotNull(newDirFile); assertThat(newDirFile.toNioPath()).isNotNull().isEqualTo(newDir.toPath()); } | testNioPathIsImplementedForDir |
270,902 | void () { File newDir = tempDir.newFile("someFile-32"); VirtualFile newDirFile = myFS.refreshAndFindFileByPath(newDir.getPath()); assertNotNull(newDirFile); assertThat(newDirFile.toNioPath()).isNotNull().isEqualTo(newDir.toPath()); } | testNioPathIsImplementedForFile |
270,903 | void () { VirtualFileManager virtualFileManager = VirtualFileManager.getInstance(); PlatformTestUtil.startPerformanceTest("findFileByUrl", 2000, () -> { for (int i=0; i<10_000_000;i++) { assertNull(virtualFileManager.findFileByUrl("temp://")); } }).assertTiming(); } | testFindFileByUrlPerformance |
270,904 | void () { File file = tempDir.newFile("some-new-file"); VirtualFile nioFile = VirtualFileManager.getInstance().refreshAndFindFileByNioPath(file.toPath()); VirtualFile nioFile2 = VirtualFileManager.getInstance().findFileByNioPath(file.toPath()); assertNotNull(nioFile); assertNotNull(nioFile2); assertEquals(nioFile, nioF... | testFindFileByNioPath |
270,905 | void () { File file = tempDir.newFile("some-new-file"); VirtualFile ioFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file); VirtualFile nioFile = VirtualFileManager.getInstance().refreshAndFindFileByNioPath(file.toPath()); assertNotNull(ioFile); assertNotNull(nioFile); assertEquals(nioFile, ioFile); as... | testFindNioPathConsistency |
270,906 | void () { File file = tempDir.newFile("dir/0"); assertFalse(FileSystemUtil.isCaseToggleable(file.getName())); VirtualDirectoryImpl dir = (VirtualDirectoryImpl)LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file.getParentFile()); assertNotNull(dir); assertEquals(CaseSensitivity.UNKNOWN, dir.getChildrenCaseSens... | caseSensitivityNativeAPIMustWorkInSimpleCasesAndIsCachedInVirtualFileFlags |
270,907 | void () { assumeUnix(); Path fifo = tempDir.getRoot().toPath().resolve("test.fifo"); createFifo(fifo.toString()); VirtualFile file = requireNonNull(myFS.refreshAndFindFileByNioFile(fifo)); assertThat(file.is(VFileProperty.SPECIAL)).isTrue(); assertThat(file.getLength()).isEqualTo(0); assertThatExceptionOfType(FileNotFo... | specialFileDoesNotCauseHangs |
270,908 | void () { var dir = tempDir.newVirtualFile("dir/1").getParent(); assertDirectoryListing(dir, "1"); var file = tempDir.newVirtualFile("file"); assertDirectoryListing(file); var missing = new FakeVirtualFile(tempDir.getVirtualFileRoot(), "missing"); assertDirectoryListing(missing); } | directoryListing |
270,909 | void (VirtualFile vFile, String... expected) { var list1 = myFS.list(vFile); var list2 = ((LocalFileSystemImpl)myFS).listWithCaching(vFile); ((LocalFileSystemImpl)myFS).clearListCache(); assertThat(list1). containsExactlyInAnyOrder(expected). containsExactlyInAnyOrder(list2); } | assertDirectoryListing |
270,910 | void () { VirtualFile jarRoot = findByPath(PathManager.getJarPathForClass(Test.class) + JarFileSystem.JAR_SEPARATOR); assertTrue(jarRoot.isDirectory()); VirtualFile metaInf = jarRoot.findChild("META-INF"); assertNotNull(metaInf); assertNotNull(metaInf.findChild("MANIFEST.MF")); } | testMetaInf |
270,911 | void (@NotNull List<? extends @NotNull VFileEvent> events) { for (VFileEvent event : events) { if (event instanceof VFileContentChangeEvent && entry.equals(event.getFile())) { updated.set(true); break; } } } | before |
270,912 | void () { File jar = IoTestUtil.createTestJar(tempDir.newFile("test.jar")); JarFileSystemImpl fs = (JarFileSystemImpl)JarFileSystem.getInstance(); fs.setNoCopyJarForPath(jar.getPath()); assertFalse(fs.isMakeCopyOfJar(jar)); } | testJarHandlerDoNotCreateCopyWhenListingArchive |
270,913 | void () { VirtualFile zip = createJar( "/", "a", "a/b", "a/b/c.txt", "x\\y\\z.txt", "/x/f.txt", "d1/aB", "d1/ab", "D2/f1", "//d2//f2", "empty/", "w/../W"); VirtualFile jarRoot = JarFileSystem.getInstance().getJarRootForLocalFile(zip); assertNotNull(jarRoot); int prefixLength = zip.getPath().length() + JarFileSystem.JAR... | testInvalidZip |
270,914 | boolean (@NotNull VirtualFile file) { if (!jarRoot.equals(file)) { String path = file.getPath().substring(prefixLength); entries.add(file.isDirectory() ? path + '/' : path); } return true; } | visitFile |
270,915 | void () { String jarPath = PathManager.getJarPathForClass(Test.class); VirtualFile jarFile = LocalFileSystem.getInstance().findFileByPath(jarPath); assertNotNull(jarFile); VirtualFile jarRoot = JarFileSystem.getInstance().getJarRootForLocalFile(jarFile); assertNotNull(jarRoot); VirtualFile entryFile = findByPath(jarPat... | testJarRootForLocalFile |
270,916 | VirtualFile (@NotNull String path) { VirtualFile file = JarFileSystem.getInstance().findFileByPath(path); assertNotNull(file); assertPathsEqual(path, file.getPath()); return file; } | findByPath |
270,917 | int () { return 0; } | read |
270,918 | int (byte @NotNull [] b, int off, int len) { return len; } | read |
270,919 | void () { VirtualFile vFile = createJar("src\\core\\log/", "src\\core\\log/log4sql_conf.jsp", "META-INF/MANIFEST.MF"); String jarPath = vFile.getPath(); VirtualFile manifest = findByPath(jarPath + JarFileSystem.JAR_SEPARATOR + JarFile.MANIFEST_NAME); assertNotNull(manifest); VirtualFile jarRoot = JarFileSystem.getInsta... | testCrazyBackSlashesInZipEntriesMustBeTreatedAsRegularDirectorySeparators |
270,920 | void () { VirtualFile vFile = createJar("com", "/com/Hello.class"); assertNotNull(vFile); VirtualFile jarRoot = JarFileSystem.getInstance().getRootByLocal(vFile); assertNotNull(jarRoot); String[] children = JarFileSystem.getInstance().list(jarRoot); assertEquals("com", UsefulTestCase.assertOneElement(children)); assert... | testCrazyJarWithDuplicateFileAndDirEntriesMustNotCrashAnything |
270,921 | VirtualFile (String... entryNames) { String[] namesAndTexts = Arrays.stream(entryNames).flatMap(n -> Stream.of(n, null)).toArray(String[]::new); File jar = IoTestUtil.createTestJar(tempDir.newFile("p.jar"), namesAndTexts); return LocalFileSystem.getInstance().refreshAndFindFileByIoFile(jar); } | createJar |
270,922 | void () { VirtualFile vFile = createJar("META-INF/MANIFEST.MF", "\\META-INF\\RET-LD00.00015.xml"); VirtualFile jarRoot = JarFileSystem.getInstance().getRootByLocal(vFile); assertNotNull(jarRoot); VirtualFile child = UsefulTestCase.assertOneElement(jarRoot.getChildren()); String[] children = JarFileSystem.getInstance().... | testCrazyJarWithBackSlashedLongEntryMustNotCrashAnything |
270,923 | void () { File jar = IoTestUtil.createTestJar(tempDir.newFile("..p.jar")); VirtualFile vf = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(jar); VirtualFile jarRoot = JarFileSystem.getInstance().getRootByLocal(vf); assertNotNull(jarRoot); assertNotNull(jarRoot.findFileByRelativePath(JarFile.MANIFEST_NAME)); } | testJarNameCouldBePrependedWithDotDot |
270,924 | void () { VirtualFile vf = createJar("a", "a/b"); VirtualFile jarRoot = JarFileSystem.getInstance().getJarRootForLocalFile(vf); assertNotNull(jarRoot); VirtualFile a = jarRoot.findChild("a"); assertNotNull(a); assertTrue(a.isValid()); assertTrue(jarRoot.isValid()); VirtualFile local = JarFileSystem.getInstance().getLoc... | testJarFileMustInvalidateOnDeleteLocalEntryFile |
270,925 | void (@NotNull List<? extends @NotNull VFileEvent> events) { // jars must be invalidated immediately after deleting the local root assertFalse(a.isValid()); assertFalse(jarRoot.isValid()); } | after |
270,926 | String () { return "corrupted-jar"; } | getProtocol |
270,927 | ArchiveHandler (@NotNull VirtualFile entryFile) { return VfsImplUtil.getHandler(this, entryFile, path -> new ZipHandler(path) { @Override protected @NotNull Map<String, EntryInfo> getEntriesMap() { return corrupted ? Map.of() : super.getEntriesMap(); } }); } | getHandler |
270,928 | void () { assumeSymLinkCreationIsSupported(); } | setUp |
270,929 | void () { VirtualFile root = refreshAndFind(tempDir.getRoot()); // purge VFS to avoid persisting these specific file names through to the next launch VfsTestUtil.deleteFile(root); } | tearDown |
270,930 | void () { File missingFile = new File(tempDir.getRoot(), "missing_file"); assertTrue(missingFile.getPath(), !missingFile.exists() || missingFile.delete()); File missingLinkFile = createSymLink(missingFile.getPath(), tempDir.getRoot() + "/missing_link", false); VirtualFile missingLinkVFile = refreshAndFind(missingLinkFi... | testMissingLink |
270,931 | void () { String target = new File(tempDir.getRoot(), "self_link").getPath(); File selfLinkFile = createSymLink(target, target, false); VirtualFile selfLinkVFile = refreshAndFind(selfLinkFile); assertNotNull(selfLinkVFile); assertBrokenLink(selfLinkVFile); assertVisitedPaths(selfLinkVFile.getPath()); } | testSelfLink |
270,932 | void () { File dotLinkFile = createSymLink(".", tempDir.getRoot() + "/dot_link"); VirtualFile dotLinkVFile = refreshAndFind(dotLinkFile); assertNotNull(dotLinkVFile); assertTrue(dotLinkVFile.is(VFileProperty.SYMLINK)); assertTrue(dotLinkVFile.isDirectory()); assertPathsEqual(tempDir.getRoot().getPath(), dotLinkVFile.ge... | testDotLink |
270,933 | void () { File upDir = tempDir.newDirectory("sub"); File upLinkFile = createSymLink(upDir.getPath(), upDir.getPath() + "/up_link"); VirtualFile upLinkVFile = refreshAndFind(upLinkFile); assertNotNull(upLinkVFile); assertTrue(upLinkVFile.is(VFileProperty.SYMLINK)); assertTrue(upLinkVFile.isDirectory()); assertPathsEqual... | testCircularLink |
270,934 | void () { File circularDir1 = tempDir.newDirectory("dir1"); File circularDir2 = tempDir.newDirectory("dir2"); File circularLink1 = createSymLink(circularDir2.getPath(), circularDir1 + "/link1"); File circularLink2 = createSymLink(circularDir1.getPath(), circularDir2 + "/link2"); VirtualFile circularLink1VFile = refresh... | testMutualRecursiveLinks |
270,935 | void () { File targetDir = tempDir.newDirectory("target"); File link1 = createSymLink(targetDir.getPath(), tempDir.getRoot() + "/link1"); File link2 = createSymLink(targetDir.getPath(), tempDir.getRoot() + "/link2"); assertVisitedPaths(targetDir.getPath(), link1.getPath(), link2.getPath()); } | testDuplicateLinks |
270,936 | void () { File a = tempDir.newDirectory("a"); File b = createTestDir(a, "b"); File link1 = createSymLink(SystemInfo.isWindows ? a.getPath() : "../../" + a.getName(), b.getPath() + "/link1"); File project = tempDir.newDirectory("project"); File c = createTestDir(project, "c"); File d = createTestDir(c, "d"); File link2 ... | testSidewaysRecursiveLink |
270,937 | void () { File target = tempDir.newDirectory("target"); File child = createTestDir(target, "child"); File link1 = createSymLink(target.getPath(), tempDir.getRoot() + "/link1"); File link2 = createSymLink(target.getPath(), tempDir.getRoot() + "/link2"); assertVisitedPaths(target.getPath(), child.getPath(), link1.getPath... | testVisitAllNonRecursiveLinks |
270,938 | void () { File targetFile = tempDir.newFile("target.txt"); File linkFile = createSymLink(targetFile.getPath(), tempDir.getRoot() + "/link"); VirtualFile linkVFile = refreshAndFind(linkFile); assertTrue("link=" + linkFile + ", vLink=" + linkVFile, linkVFile != null && !linkVFile.isDirectory() && linkVFile.is(VFileProper... | testTargetIsWritable |
270,939 | void (File file, boolean writable) { assertTrue(file.getPath(), file.setWritable(writable, false)); assertEquals(file.getPath(), writable, file.canWrite()); } | setWritableAndCheck |
270,940 | void () { File topDir = tempDir.newDirectory("top"); File subDir1 = createTestDir(topDir, "sub1"); File link = createSymLink(subDir1.getPath(), tempDir.getRoot() + "/link"); VirtualFile vLink = refreshAndFind(link); assertNotNull(link.getPath(), vLink); File subDir2 = createTestDir(topDir, "sub2"); File subChild = crea... | testTraversePathBehindLink |
270,941 | void () { File top = tempDir.newDirectory("top"); File sub1 = createTestDir(top, "sub1"); File link = createSymLink(top.getPath(), sub1.getPath() + "/link"); VirtualFile vLink = refreshAndFind(link); assertNotNull(link.getPath(), vLink); String path = sub1.getPath() + StringUtil.repeat("/" + link.getName() + "/" + sub1... | testCircularSymlinksMustBeDetected |
270,942 | void () { File top = tempDir.newDirectory("top"); File sub1 = createTestDir(top, "s1"); File ss1 = createTestDir(sub1, "ss1"); File link1 = createSymLink(sub1.getPath(), ss1.getPath() + "/l1"); File sub2 = createTestDir(top, "s2"); File ss2 = createTestDir(sub2, "ss2"); File link2 = createSymLink(sub1.getPath(), ss2.ge... | testCircularSymlinksMustBeDetectedEvenForAsideLinks |
270,943 | void (File root) { VirtualFile tempDir = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(root); assertNotNull(root.getPath(), tempDir); tempDir.getChildren(); tempDir.refresh(false, true); VfsUtilCore.visitChildrenRecursively(tempDir, new VirtualFileVisitor<Void>() { }); } | refresh |
270,944 | void (@NotNull VirtualFile link) { assertTrue(link.is(VFileProperty.SYMLINK)); assertEquals(0, link.getLength()); assertNull(link.getCanonicalPath(), link.getCanonicalPath()); } | assertBrokenLink |
270,945 | void (String... expected) { assertVisitedPaths(tempDir.getRoot(), expected); } | assertVisitedPaths |
270,946 | void (File from, String... expected) { VirtualFile vDir = refreshAndFind(from); assertNotNull(vDir); Set<String> expectedSet = StreamEx.of(expected).map(FileUtil::toSystemIndependentName).append(vDir.getPath()).toSet(); Set<String> actualSet = new HashSet<>(); VfsUtilCore.visitChildrenRecursively(vDir, new VirtualFileV... | assertVisitedPaths |
270,947 | boolean (@NotNull VirtualFile file) { if (!actualSet.add(file.getPath())) { throw new AssertionError(file + " already visited"); } return true; } | visitFile |
270,948 | void () { myRoot = null; } | tearDown |
270,949 | void () { doTest( null, null, """ -> / [0] -> d1 [1] -> d11 [2] -> f11.1 [3] <- f11.1 [4] -> f11.2 [3] <- f11.2 [4] <- d11 [3] -> d11_link [2] -> f11.1 [3] <- f11.1 [4] -> f11.2 [3] <- f11.2 [4] <- d11_link [3] -> d12 [2] <- d12 [3] -> d13 [2] -> f13.1 [3] <- f13.1 [4] -> f13.2 [3] <- f13.2 [4] <- d13 [3] -> f1.1 [2] <... | visitAll |
270,950 | void () { doTest( file -> "d11".equals(file.getName()) ? VirtualFileVisitor.SKIP_CHILDREN : VirtualFileVisitor.CONTINUE, null, """ -> / [0] -> d1 [1] -> d11 [2] -> d11_link [2] -> f11.1 [3] <- f11.1 [4] -> f11.2 [3] <- f11.2 [4] <- d11_link [3] -> d12 [2] <- d12 [3] -> d13 [2] -> f13.1 [3] <- f13.1 [4] -> f13.2 [3] <- ... | skipChildrenForDirectory |
270,951 | void () { doTest( file -> file.isDirectory() ? VirtualFileVisitor.CONTINUE : VirtualFileVisitor.SKIP_CHILDREN, null, """ -> / [0] -> d1 [1] -> d11 [2] -> f11.1 [3] -> f11.2 [3] <- d11 [3] -> d11_link [2] -> f11.1 [3] -> f11.2 [3] <- d11_link [3] -> d12 [2] <- d12 [3] -> d13 [2] -> f13.1 [3] -> f13.2 [3] <- d13 [3] -> f... | skipChildrenForFiles |
270,952 | void () { Ref<VirtualFile> skip = Ref.create(); doTest( file -> { if ("d1".equals(file.getName())) skip.set(file); return "f11.1".equals(file.getName()) ? skip.get() : VirtualFileVisitor.CONTINUE; }, null, """ -> / [0] -> d1 [1] -> d11 [2] -> f11.1 [3] -> d2 [1] -> f2.1 [2] <- f2.1 [3] -> f2.2 [2] <- f2.2 [3] <- d2 [2]... | skipToParent |
270,953 | void () { doTest( file -> "f11.1".equals(file.getName()) ? myRoot : VirtualFileVisitor.CONTINUE, null, """ -> / [0] -> d1 [1] -> d11 [2] -> f11.1 [3] """); } | skipToRoot |
270,954 | void () { doTest( file -> { if ("f11.1".equals(file.getName())) throw new AbortException(); return VirtualFileVisitor.CONTINUE; }, null, """ -> / [0] -> d1 [1] -> d11 [2] -> f11.1 [3] """); } | abort |
270,955 | void () { doTest( null, null, """ -> / [0] <- / [1] """, VirtualFileVisitor.limit(0) ); doTest( null, null, """ -> / [0] -> d1 [1] <- d1 [2] -> d2 [1] <- d2 [2] -> d3 [1] <- d3 [2] <- / [1] """, VirtualFileVisitor.ONE_LEVEL_DEEP ); doTest( null, null, """ -> d1 [0] <- d1 [1] -> d2 [0] <- d2 [1] -> d3 [0] <- d3 [1] """,... | depthLimit |
270,956 | void () { doTest( null, file -> "d13".equals(file.getName()) ? Collections.singletonList(file.getChildren()[1]) : null, """ -> / [0] -> d1 [1] -> d11 [2] -> f11.1 [3] <- f11.1 [4] -> f11.2 [3] <- f11.2 [4] <- d11 [3] -> d11_link [2] -> f11.1 [3] <- f11.1 [4] -> f11.2 [3] <- f11.2 [4] <- d11_link [3] -> d12 [2] <- d12 [... | customIterable |
270,957 | void (@Nullable Function<? super VirtualFile, Object> condition, @Nullable Function<? super VirtualFile, ? extends Iterable<VirtualFile>> iterable, @NotNull String expected, VirtualFileVisitor.Option @NotNull ... options) { MultiMap<VirtualFile, Pair<VirtualFile, String>> visitLog = MultiMap.create(); Map<VirtualFile, ... | doTest |
270,958 | boolean (@NotNull VirtualFile file) { if (!visited.add(file)) { throw new AssertionError(file + " already visited"); } return true; } | visitFile |
270,959 | Result (@NotNull VirtualFile file) { if (!visited.add(file)) { throw new AssertionError(file + " already visited"); } String name = file.equals(myRoot) ? "/" : file.getName(); String s = "-> " + name + " [" + getCurrentValue() + "]\n"; visitLog.putValue(file.getParent(), Pair.create(file, s)); setValueForChildren(getCu... | visitFileEx |
270,960 | void (@NotNull VirtualFile file) { String name = file.equals(myRoot) ? "/" : file.getName(); String s = "<- " + name + " [" + getCurrentValue() + "]\n"; backLog.put(file, s); } | afterChildrenVisited |
270,961 | void (VirtualFile root, MultiMap<VirtualFile, Pair<VirtualFile, String>> visitLog, Map<VirtualFile, String> backLog, int level, StringBuilder out) { List<Pair<VirtualFile, String>> visited = new ArrayList<>(visitLog.get(root)); visited.sort(Comparator.comparing(o -> o.first.getName())); for (Pair<VirtualFile, String> p... | toLog |
270,962 | void () { PlatformTestUtil.startPerformanceTest(getTestName(false), 1000, () -> { Disposable parent = Disposer.newDisposable(); for (int i = 0; i < 100_000; i++) { myVirtualFilePointerManager.createContainer(parent); } Disposer.dispose(parent); }).assertTiming(); } | testContainerCreateDeletePerformance |
270,963 | void (VirtualFile dir) { VirtualFile[] roots = ModuleRootManager.getInstance(getModule()).getSourceRoots(); if (dir == null) { assertEmpty(roots); } else { VirtualFile root = assertOneElement(roots); assertEquals(dir, root); } } | assertSourceIs |
270,964 | void (VirtualFile dir) { VirtualFile[] roots = OrderEntryUtil.getModuleLibraries(ModuleRootManager.getInstance(getModule())).get(0).getFiles(OrderRootType.CLASSES); VirtualFile root = assertOneElement(roots); assertEquals(dir, root); } | assertLibIs |
270,965 | void (@NotNull VirtualFileEvent event) { ProjectRootManager.getInstance(getProject()).getFileIndex().getModuleForFile(dir1); } | fileDeleted |
270,966 | void () { myVirtualFilePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance(); pointersBefore = myVirtualFilePointerManager.dumpAllPointers(); numberOfListenersBefore = myVirtualFilePointerManager.numberOfListeners(); } | setUp |
270,967 | void () { Disposer.dispose(disposable); Collection<VirtualFilePointer> pointersAfter = myVirtualFilePointerManager.dumpAllPointers(); int nListeners = myVirtualFilePointerManager.numberOfListeners(); myVirtualFilePointerManager = null; assertEquals(numberOfListenersBefore, nListeners); assertEquals(pointersBefore, poin... | tearDown |
270,968 | VirtualFile () { return getVirtualFile(tempDir.getRoot()); } | getVirtualTempRoot |
270,969 | VirtualFile (File file) { return LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file); } | getVirtualFile |
270,970 | VirtualFilePointer (@NotNull File file, VirtualFilePointerListener fileListener) { String url = VirtualFileManager.constructUrl(LocalFileSystem.PROTOCOL, FileUtil.toSystemIndependentName(file.getPath())); VirtualFile vFile = getVirtualFile(file); return vFile == null ? myVirtualFilePointerManager.create(url, disposable... | createPointerByFile |
270,971 | void (VirtualFilePointer @NotNull [] pointers) { for (VirtualFilePointer pointer : pointers) { VirtualFile file = pointer.getFile(); assertTrue(file == null || file.isValid()); } } | verifyPointersInCorrectState |
270,972 | void (VirtualFilePointer @NotNull [] pointers) { verifyPointersInCorrectState(pointers); log.add(buildMessage("before", pointers)); } | beforeValidityChanged |
270,973 | void (VirtualFilePointer @NotNull [] pointers) { verifyPointersInCorrectState(pointers); log.add(buildMessage("after", pointers)); } | validityChanged |
270,974 | String (@NotNull String startMsg, VirtualFilePointer @NotNull [] pointers) { StringBuilder buffer = new StringBuilder(); buffer.append(startMsg).append(':'); for (int i = 0; i < pointers.length; i++) { if (i > 0) buffer.append(':'); VirtualFilePointer pointer = pointers[i]; if (myVerbose) { buffer.append(pointer.getFil... | buildMessage |
270,975 | void () { File fileToDelete = tempDir.newFile("toDelete.txt"); LoggingListener fileToDeleteListener = new LoggingListener(); VirtualFilePointer fileToDeletePointer = createPointerByFile(fileToDelete, fileToDeleteListener); assertTrue(fileToDeletePointer.isValid()); VfsTestUtil.deleteFile(getVirtualFile(fileToDelete)); ... | testDelete |
270,976 | void () { final var file = tempDir.newFile("myfile.txt"); // avoiding root resolve in tempDir // otherwise there will be an exception on its remove using VirtualFile final var pointer = myVirtualFilePointerManager.create( LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file), disposable, null ); assertTrue(poi... | testSwitchingVfs |
270,977 | void () { File fileToDelete = tempDir.newFile("toDelete.txt"); LoggingListener fileToDeleteListener = new LoggingListener(); VirtualFilePointer fileToDeletePointer = createPointerByFile(fileToDelete, fileToDeleteListener); assertTrue(fileToDeletePointer.isValid()); VirtualFile file = fileToDeletePointer.getFile(); asse... | testPointerAfterFileDeleteAndRecreateMustBeValid |
270,978 | void () { File fileToDelete = tempDir.newFile("file.txt"); VirtualFilePointer pointer = createPointerByFile(fileToDelete, null); assertTrue(pointer.isValid()); VirtualFile file = pointer.getFile(); assertNotNull(file); MessageBusConnection connection = ApplicationManager.getApplication().getMessageBus().connect(disposa... | testPointerMustBeAlreadyUpToDateInAfterListener |
270,979 | void (@NotNull List<? extends @NotNull VFileEvent> events) { Object url = ((VirtualFilePointerImpl)pointer).myNode.myFileOrUrl; assertTrue(url.toString(), url instanceof String); assertFalse(pointer.isValid()); } | after |
270,980 | void () { File rootDir = new File("/"); assertTrue(rootDir.exists()); VirtualFilePointer pointer = createPointerByFile(rootDir, null); assertTrue(pointer.isValid()); } | testPointerForFileSystemRoot1 |
270,981 | void () { VirtualFilePointer pointer = myVirtualFilePointerManager.create(LocalFileSystem.PROTOCOL_PREFIX + "/", disposable, null); assertTrue(pointer.isValid()); } | testPointerForFileSystemRoot2 |
270,982 | void () { File file = tempDir.newFile("f1"); VirtualFile vFile = getVirtualFile(file); Disposable disposable = Disposer.newDisposable(); VirtualFilePointer pointer = myVirtualFilePointerManager.create(vFile, disposable, null); assertTrue(pointer.isValid()); Disposer.dispose(disposable); assertFalse(pointer.isValid()); ... | testDoubleDispose |
270,983 | void (@NotNull VirtualFileEvent event) { stressRead(pointer, reads); } | fileCreated |
270,984 | void (@NotNull VirtualFileEvent event) { stressRead(pointer, reads); } | fileDeleted |
270,985 | void (VirtualFilePointer pointer, Collection<? super Job<?>> reads) { for (int i = 0; i < 10; i++) { AtomicReference<Job<?>> reference = new AtomicReference<>(); reference.set(JobLauncher.getInstance().submitToJobThread(() -> ApplicationManager.getApplication().runReadAction(() -> { VirtualFile file = pointer.getFile()... | stressRead |
270,986 | void () { VirtualFile mockVirtualFile = new MockVirtualFile("test_name", "test_text"); Disposable disposable = Disposer.newDisposable(); VirtualFilePointer pointer = myVirtualFilePointerManager.create(mockVirtualFile, disposable, null); assertThat(pointer).isInstanceOf(IdentityVirtualFilePointer.class); assertTrue(poin... | testAlienVirtualFileSystemPointerRemovedFromUrlToIdentityCacheOnDispose |
270,987 | void () { VirtualFile vDir = getVirtualTempRoot(); assertNotNull(vDir); vDir.getChildren(); vDir.refresh(false, true); LoggingListener listener = new LoggingListener(); myVirtualFilePointerManager.create(vDir.getUrl() + "/d1/subdir", disposable, listener); myVirtualFilePointerManager.create(vDir.getUrl() + "/d2/subdir"... | testSeveralDirectoriesWithCommonPrefix |
270,988 | void () { File dirToCreate = new File(tempDir.getRoot(), "ToCreate"); VirtualFilePointer dirPointer = createPointerByFile(dirToCreate, null); VirtualFilePointer dirDotPointer = createPointerByFile(new File(dirToCreate, "."), null); assertSame(dirDotPointer, dirPointer); } | testCreatePointerWithCrazyUrlContainingSlashDotMustNotLeadToException |
270,989 | void () { assertEquals("file://", myVirtualFilePointerManager.create("file://", disposable, null).getUrl()); assertEquals("file://", myVirtualFilePointerManager.create("file:///", disposable, null).getUrl()); assertEquals("file://", myVirtualFilePointerManager.create("file:////", disposable, null).getUrl()); } | testFileUrlNormalization |
270,990 | void () { IoTestUtil.assumeWindows(); assertEquals("\\\\wsl$\\Ubuntu\\", createPointerByFile(new File("\\\\wsl$\\Ubuntu"), null).getPresentableUrl()); assertEquals("\\\\wsl$\\Ubuntu\\bin", createPointerByFile(new File("//wsl$//Ubuntu//bin//"), null).getPresentableUrl()); } | testUncPathNormalization |
270,991 | void () { IoTestUtil.assumeUnix(); VirtualFile vDir = getVirtualTempRoot(); VirtualFilePointer pointer = myVirtualFilePointerManager.create(vDir.getUrl() + "/xxx/ /c.txt", disposable, null); assertFalse(pointer.isValid()); } | testSpacesOnlyFileNamesUnderUnixMustBeAllowed |
270,992 | void () { IoTestUtil.assumeWindows(); VirtualFile vDir = getVirtualTempRoot(); String rel = "/xxx/!/c.txt"; VirtualFilePointer pointer = myVirtualFilePointerManager.create(vDir.getUrl() + rel, disposable, null); assertFalse(pointer.isValid()); assertTrue(FileUtil.createIfDoesntExist(new File(vDir.getPath() + rel))); vD... | testCrazyExclamationMarkInFileNameMustBeAllowed |
270,993 | void () { assertNotNull(myVirtualFilePointerManager.create("file://Z://.idea/Q.iml", disposable, null)); } | testProjectUnderNetworkMountDoesntOpenAnymoreAfterUpgradeTo2019_3 |
270,994 | void () { VirtualFile vTemp = getVirtualTempRoot(); VirtualFile file = VfsTestUtil.createFile(vTemp, "f.txt"); vTemp.refresh(false, true); VirtualFilePointer pointer = createPointerByFile(new File(file.getPath()), null); assertTrue(pointer.isValid()); assertNotNull(pointer.getFile()); assertTrue(pointer.getFile().isVal... | testRawGetPerformance |
270,995 | void () { VirtualFilePointer parentPointer = createRecursivePointer("parent"); VirtualFilePointer dirPointer = createRecursivePointer("parent/dir"); VirtualFilePointer subdirPointer = createRecursivePointer("parent/dir/subdir"); VirtualFilePointer filePointer = createPointer("parent/dir/subdir/file.txt"); VirtualFile r... | testRecursivePointersForSubdirectories |
270,996 | void () { VirtualFilePointer parentPointer = createRecursivePointer("parent"); VirtualFilePointer dir1Pointer = createRecursivePointer("parent/dir1"); VirtualFilePointer dir2Pointer = createRecursivePointer("parent/dir2"); VirtualFilePointer subdirPointer = createRecursivePointer("parent/dir1/subdir"); VirtualFilePoint... | testRecursivePointersForDirectoriesWithCommonPrefix |
270,997 | void () { VirtualFilePointer innerPointer = createRecursivePointer("parent/dir/subdir1/inner/subinner"); createPointer("parent/anotherDir"); VirtualFile root = myDir(); VirtualFile parent = HeavyPlatformTestCase.createChildDirectory(root, "parent"); VirtualFile dir = HeavyPlatformTestCase.createChildDirectory(parent, "... | testRecursivePointersUnderSiblingDirectory |
270,998 | void () { VirtualFilePointer innerPointer = createRecursivePointer("temp/res/ext-resources"); VirtualFile root = myDir(); VirtualFile parent = HeavyPlatformTestCase.createChildDirectory(root, "parent"); VirtualFileSystemEntry dir = createChildDirectory(parent, "dir"); assertPointersUnder(dir, "inner"); assertTrue(((Vir... | testRecursivePointersUnderDisparateDirectoriesNearRoot |
270,999 | void () { VirtualFilePointer p1 = createPointer("a/p1"); VirtualFilePointer p2 = createPointer("b/p2"); VirtualFile root = myDir(); VirtualFileSystemEntry a = createChildDirectory(root, "a"); VirtualFileSystemEntry b = createChildDirectory(root, "b"); UsefulTestCase.assertSameElements(myVirtualFilePointerManager.getPoi... | testUrlsHavingOnlyStartingSlashInCommon |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.