@Test(dependsOnMethods = "testOpenFile") public void testGetAllFilePaths() { Set<Path> allFilePaths = documentManager.getAllFilePaths(); Assert.assertEquals(allFilePaths.size(), 4); boolean foundFile = allFilePaths.stream().anyMatch(path -> { try { return Files.isSameFile(path, filePath); } catch (IOException e) { return false; } }); Assert.assertTrue(foundFile); }
@Override public Set<Path> getAllFilePaths() { return documentList.entrySet().stream() .filter(entry -> entry.getValue().getDocument().isPresent()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)).keySet(); }
WorkspaceDocumentManagerImpl implements WorkspaceDocumentManager { @Override public Set<Path> getAllFilePaths() { return documentList.entrySet().stream() .filter(entry -> entry.getValue().getDocument().isPresent()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)).keySet(); } }
WorkspaceDocumentManagerImpl implements WorkspaceDocumentManager { @Override public Set<Path> getAllFilePaths() { return documentList.entrySet().stream() .filter(entry -> entry.getValue().getDocument().isPresent()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)).keySet(); } protected  WorkspaceDocumentManagerImpl(); }
WorkspaceDocumentManagerImpl implements WorkspaceDocumentManager { @Override public Set<Path> getAllFilePaths() { return documentList.entrySet().stream() .filter(entry -> entry.getValue().getDocument().isPresent()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)).keySet(); } protected  WorkspaceDocumentManagerImpl(); static WorkspaceDocumentManagerImpl getInstance(); @Override boolean isFileOpen(Path filePath); @Override void openFile(Path filePath, String content); @Override void updateFile(Path filePath, List<TextDocumentContentChangeEvent> changeEvent); @Override void setCodeLenses(Path filePath, List<CodeLens> codeLens); @Override void closeFile(Path filePath); @Override List<CodeLens> getCodeLenses(Path filePath); @Override LSDocumentIdentifier getLSDocument(Path filePath); @Override String getFileContent(Path filePath); @Override Optional<Lock> lockFile(Path filePath); @Override Set<Path> getAllFilePaths(); @Override void clearAllFilePaths(); @Override SyntaxTree getTree(Path filePath); @Override void setTree(Path filePath, SyntaxTree newTree); }
WorkspaceDocumentManagerImpl implements WorkspaceDocumentManager { @Override public Set<Path> getAllFilePaths() { return documentList.entrySet().stream() .filter(entry -> entry.getValue().getDocument().isPresent()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)).keySet(); } protected  WorkspaceDocumentManagerImpl(); static WorkspaceDocumentManagerImpl getInstance(); @Override boolean isFileOpen(Path filePath); @Override void openFile(Path filePath, String content); @Override void updateFile(Path filePath, List<TextDocumentContentChangeEvent> changeEvent); @Override void setCodeLenses(Path filePath, List<CodeLens> codeLens); @Override void closeFile(Path filePath); @Override List<CodeLens> getCodeLenses(Path filePath); @Override LSDocumentIdentifier getLSDocument(Path filePath); @Override String getFileContent(Path filePath); @Override Optional<Lock> lockFile(Path filePath); @Override Set<Path> getAllFilePaths(); @Override void clearAllFilePaths(); @Override SyntaxTree getTree(Path filePath); @Override void setTree(Path filePath, SyntaxTree newTree);  }