use of org.springframework.ide.vscode.commons.util.BasicFileObserver in project sts4 by spring-projects.
the class MavenProjectCacheTest method setup.
@Before
public void setup() throws Exception {
fileObserver = new BasicFileObserver();
server = mock(Sts4LanguageServer.class);
SimpleWorkspaceService workspaceService = mock(SimpleWorkspaceService.class);
when(workspaceService.getFileObserver()).thenReturn(fileObserver);
when(server.getWorkspaceService()).thenReturn(workspaceService);
testProjectPath = Paths.get(DependencyTreeTest.class.getResource("/empty-boot-project-with-classpath-file").toURI());
pomFile = testProjectPath.resolve(MavenCore.POM_XML).toFile();
pomFileContents = new String(Files.readAllBytes(pomFile.toPath()), Charset.defaultCharset());
Path cacheFolerPath = testProjectPath.resolve(IJavaProject.PROJECT_CACHE_FOLDER);
if (cacheFolerPath.toFile().exists()) {
Files.walk(cacheFolerPath, FileVisitOption.FOLLOW_LINKS).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);
}
}
use of org.springframework.ide.vscode.commons.util.BasicFileObserver in project sts4 by spring-projects.
the class GradleProjectTest method setup.
@Before
public void setup() throws Exception {
fileObserver = new BasicFileObserver();
server = mock(Sts4LanguageServer.class);
SimpleWorkspaceService workspaceService = mock(SimpleWorkspaceService.class);
when(workspaceService.getFileObserver()).thenReturn(fileObserver);
when(server.getWorkspaceService()).thenReturn(workspaceService);
}
Aggregations