test_class.declarator: documentManager
test_class.modifier: private
test_class.original_string: private ExtendedWorkspaceDocumentManagerImpl documentManager;
test_class.type: ExtendedWorkspaceDocumentManagerImpl
test_class.var_name: documentManager
test_class.declarator: filePath
test_class.modifier: private
test_class.original_string: private Path filePath;
test_class.type: Path
test_class.var_name: filePath
test_class.file: language-server/modules/langserver-compiler/src/test/java/org/ballerinalang/langserver/compiler/workspace/ExtendedWorkspaceDocumentManagerImplTest.java
test_class.identifier: ExtendedWorkspaceDocumentManagerImplTest
test_case.body: @Test(dependsOnMethods = "testGetFileContent", enabled = false)
      public void testUpdateFile() throws IOException, WorkspaceDocumentException {
          String updateContent = readAll(filePath.toFile()) + "\nfunction foo(){\n}\n";
          // Update the file
          Optional<Lock> lock = documentManager.lockFile(filePath);
          try {
              TextDocumentContentChangeEvent changeEvent = new TextDocumentContentChangeEvent(updateContent);
              documentManager.updateFile(filePath, Collections.singletonList(changeEvent));
          } finally {
              lock.ifPresent(Lock::unlock);
          }
          // Call get file content
          String actualContent = documentManager.getFileContent(filePath);
          // Test actual against expected content
          Assert.assertEquals(actualContent, updateContent);
      }
test_case.class_method_signature: ExtendedWorkspaceDocumentManagerImplTest.testUpdateFile()
test_case.full_signature: @Test(dependsOnMethods = "testGetFileContent", enabled = false) public void testUpdateFile()
test_case.identifier: testUpdateFile
test_case.invocations: readAll toFile lockFile updateFile singletonList ifPresent getFileContent assertEquals
test_case.modifiers: @Test(dependsOnMethods = "testGetFileContent", enabled = false) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUpdateFile()
focal_class.declarator: tempDocument
focal_class.modifier: private volatile
focal_class.original_string: private volatile WorkspaceDocument tempDocument;
focal_class.type: WorkspaceDocument
focal_class.var_name: tempDocument
focal_class.declarator: isExplicitMode
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean isExplicitMode;
focal_class.type: boolean
focal_class.var_name: isExplicitMode
focal_class.declarator: INSTANCE = new ExtendedWorkspaceDocumentManagerImpl()
focal_class.modifier: private static final
focal_class.original_string: private static final ExtendedWorkspaceDocumentManagerImpl INSTANCE = new ExtendedWorkspaceDocumentManagerImpl();
focal_class.type: ExtendedWorkspaceDocumentManagerImpl
focal_class.var_name: INSTANCE
focal_class.file: language-server/modules/langserver-compiler/src/main/java/org/ballerinalang/langserver/compiler/workspace/ExtendedWorkspaceDocumentManagerImpl.java
focal_class.identifier: ExtendedWorkspaceDocumentManagerImpl
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.getInstance()
focal_class.full_signature: public static ExtendedWorkspaceDocumentManagerImpl getInstance()
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: ExtendedWorkspaceDocumentManagerImpl
focal_class.signature: ExtendedWorkspaceDocumentManagerImpl getInstance()
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.ExtendedWorkspaceDocumentManagerImpl()
focal_class.full_signature: private  ExtendedWorkspaceDocumentManagerImpl()
focal_class.identifier: ExtendedWorkspaceDocumentManagerImpl
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  ExtendedWorkspaceDocumentManagerImpl()
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.isFileOpen(Path filePath)
focal_class.full_signature: @Override public boolean isFileOpen(Path filePath)
focal_class.identifier: isFileOpen
focal_class.modifiers: @Override public
focal_class.parameters: (Path filePath)
focal_class.return: boolean
focal_class.signature: boolean isFileOpen(Path filePath)
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.openFile(Path filePath, String content)
focal_class.full_signature: @Override public void openFile(Path filePath, String content)
focal_class.identifier: openFile
focal_class.modifiers: @Override public
focal_class.parameters: (Path filePath, String content)
focal_class.return: void
focal_class.signature: void openFile(Path filePath, String content)
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.updateFile(Path filePath, List<TextDocumentContentChangeEvent> changeEvent)
focal_class.full_signature: @Override public void updateFile(Path filePath, List<TextDocumentContentChangeEvent> changeEvent)
focal_class.identifier: updateFile
focal_class.modifiers: @Override public
focal_class.parameters: (Path filePath, List<TextDocumentContentChangeEvent> changeEvent)
focal_class.return: void
focal_class.signature: void updateFile(Path filePath, List<TextDocumentContentChangeEvent> changeEvent)
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.setCodeLenses(Path filePath, List<CodeLens> codeLens)
focal_class.full_signature: @Override public void setCodeLenses(Path filePath, List<CodeLens> codeLens)
focal_class.identifier: setCodeLenses
focal_class.modifiers: @Override public
focal_class.parameters: (Path filePath, List<CodeLens> codeLens)
focal_class.return: void
focal_class.signature: void setCodeLenses(Path filePath, List<CodeLens> codeLens)
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.openOrUpdateFile(Path filePath, List<TextDocumentContentChangeEvent> content)
focal_class.full_signature: private void openOrUpdateFile(Path filePath, List<TextDocumentContentChangeEvent> content)
focal_class.identifier: openOrUpdateFile
focal_class.modifiers: private
focal_class.parameters: (Path filePath, List<TextDocumentContentChangeEvent> content)
focal_class.return: void
focal_class.signature: void openOrUpdateFile(Path filePath, List<TextDocumentContentChangeEvent> content)
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.closeFile(Path filePath)
focal_class.full_signature: @Override public void closeFile(Path filePath)
focal_class.identifier: closeFile
focal_class.modifiers: @Override public
focal_class.parameters: (Path filePath)
focal_class.return: void
focal_class.signature: void closeFile(Path filePath)
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.getCodeLenses(Path filePath)
focal_class.full_signature: @Override public List<CodeLens> getCodeLenses(Path filePath)
focal_class.identifier: getCodeLenses
focal_class.modifiers: @Override public
focal_class.parameters: (Path filePath)
focal_class.return: List<CodeLens>
focal_class.signature: List<CodeLens> getCodeLenses(Path filePath)
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.getFileContent(Path filePath)
focal_class.full_signature: @Override public String getFileContent(Path filePath)
focal_class.identifier: getFileContent
focal_class.modifiers: @Override public
focal_class.parameters: (Path filePath)
focal_class.return: String
focal_class.signature: String getFileContent(Path filePath)
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.getTree(Path filePath)
focal_class.full_signature: @Override public SyntaxTree getTree(Path filePath)
focal_class.identifier: getTree
focal_class.modifiers: @Override public
focal_class.parameters: (Path filePath)
focal_class.return: SyntaxTree
focal_class.signature: SyntaxTree getTree(Path filePath)
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.setTree(Path filePath, SyntaxTree newTree)
focal_class.full_signature: @Override public void setTree(Path filePath, SyntaxTree newTree)
focal_class.identifier: setTree
focal_class.modifiers: @Override public
focal_class.parameters: (Path filePath, SyntaxTree newTree)
focal_class.return: void
focal_class.signature: void setTree(Path filePath, SyntaxTree newTree)
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.isTempFile(Path filePath)
focal_class.full_signature: private boolean isTempFile(Path filePath)
focal_class.identifier: isTempFile
focal_class.modifiers: private
focal_class.parameters: (Path filePath)
focal_class.return: boolean
focal_class.signature: boolean isTempFile(Path filePath)
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.enableExplicitMode(Path tempFile)
focal_class.full_signature: public Optional<Lock> enableExplicitMode(Path tempFile)
focal_class.identifier: enableExplicitMode
focal_class.modifiers: public
focal_class.parameters: (Path tempFile)
focal_class.return: Optional<Lock>
focal_class.signature: Optional<Lock> enableExplicitMode(Path tempFile)
focal_class.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.disableExplicitMode(Lock lock)
focal_class.full_signature: public void disableExplicitMode(Lock lock)
focal_class.identifier: disableExplicitMode
focal_class.modifiers: public
focal_class.parameters: (Lock lock)
focal_class.return: void
focal_class.signature: void disableExplicitMode(Lock lock)
focal_class.superclass: extends WorkspaceDocumentManagerImpl
focal_method.body: @Override
      public void updateFile(Path filePath, List<TextDocumentContentChangeEvent> changeEvent)
              throws WorkspaceDocumentException {
          // if file is not already open; gracefully handle it
          openOrUpdateFile(filePath, changeEvent);
      }
focal_method.class_method_signature: ExtendedWorkspaceDocumentManagerImpl.updateFile(Path filePath, List<TextDocumentContentChangeEvent> changeEvent)
focal_method.full_signature: @Override public void updateFile(Path filePath, List<TextDocumentContentChangeEvent> changeEvent)
focal_method.identifier: updateFile
focal_method.invocations: openOrUpdateFile
focal_method.modifiers: @Override public
focal_method.parameters: (Path filePath, List<TextDocumentContentChangeEvent> changeEvent)
focal_method.return: void
focal_method.signature: void updateFile(Path filePath, List<TextDocumentContentChangeEvent> changeEvent)