@Test(dependsOnMethods = "testCloseFile", expectedExceptions = WorkspaceDocumentException.class, enabled = false) public void testGetFileContentOnNonExistentFile() throws WorkspaceDocumentException { documentManager.getFileContent(filePath.resolve("non-existent")); }
@Override public String getFileContent(Path filePath) throws WorkspaceDocumentException { if (isExplicitMode && isTempFile(filePath)) { return tempDocument.getContent(); } return super.getFileContent(filePath); }
ExtendedWorkspaceDocumentManagerImpl extends WorkspaceDocumentManagerImpl { @Override public String getFileContent(Path filePath) throws WorkspaceDocumentException { if (isExplicitMode && isTempFile(filePath)) { return tempDocument.getContent(); } return super.getFileContent(filePath); } }
ExtendedWorkspaceDocumentManagerImpl extends WorkspaceDocumentManagerImpl { @Override public String getFileContent(Path filePath) throws WorkspaceDocumentException { if (isExplicitMode && isTempFile(filePath)) { return tempDocument.getContent(); } return super.getFileContent(filePath); } private  ExtendedWorkspaceDocumentManagerImpl(); }
ExtendedWorkspaceDocumentManagerImpl extends WorkspaceDocumentManagerImpl { @Override public String getFileContent(Path filePath) throws WorkspaceDocumentException { if (isExplicitMode && isTempFile(filePath)) { return tempDocument.getContent(); } return super.getFileContent(filePath); } private  ExtendedWorkspaceDocumentManagerImpl(); static ExtendedWorkspaceDocumentManagerImpl 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 String getFileContent(Path filePath); @Override SyntaxTree getTree(Path filePath); @Override void setTree(Path filePath, SyntaxTree newTree); Optional<Lock> enableExplicitMode(Path tempFile); void disableExplicitMode(Lock lock); }
ExtendedWorkspaceDocumentManagerImpl extends WorkspaceDocumentManagerImpl { @Override public String getFileContent(Path filePath) throws WorkspaceDocumentException { if (isExplicitMode && isTempFile(filePath)) { return tempDocument.getContent(); } return super.getFileContent(filePath); } private  ExtendedWorkspaceDocumentManagerImpl(); static ExtendedWorkspaceDocumentManagerImpl 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 String getFileContent(Path filePath); @Override SyntaxTree getTree(Path filePath); @Override void setTree(Path filePath, SyntaxTree newTree); Optional<Lock> enableExplicitMode(Path tempFile); void disableExplicitMode(Lock lock);  }