test_class.declarator: RES_DIR = Paths.get("src/test/resources/").toAbsolutePath()
test_class.modifier: private static final
test_class.original_string: private static final Path RES_DIR = Paths.get("src/test/resources/").toAbsolutePath();
test_class.type: Path
test_class.var_name: RES_DIR
test_class.file: language-server/modules/langserver-compiler/src/test/java/org/ballerinalang/langserver/compiler/workspace/repository/WorkspacePackageRepositoryTest.java
test_class.identifier: WorkspacePackageRepositoryTest
test_case.body: @Test
      public void testLookupPackageSourceForSinglePkg() {
          Path filePath = RES_DIR.resolve("source").resolve("singlepackage").resolve("io-sample.bal");
          Pair pair = compileAndGetWorkspacePackageRepo(filePath);
          WorkspacePackageRepository workspacePackageRepository = pair.getWorkspacePackageRepository();
  
          //Prepare package id
          String sourceFileName = filePath.getFileName().toString();
          PackageID packageId = new PackageID(sourceFileName);
  
          PackageSource packageSource = workspacePackageRepository.lookupPackageSource(packageId);
          Assert.assertEquals(packageId, packageSource.getPackageId());
          boolean found = packageSource.getPackageSourceEntries().stream().anyMatch(
                  compilerInput -> compilerInput.getEntryName().equals(sourceFileName)
          );
          Assert.assertTrue(found, "PackageSource should contain '" + sourceFileName + "'");
      }
test_case.class_method_signature: WorkspacePackageRepositoryTest.testLookupPackageSourceForSinglePkg()
test_case.full_signature: @Test public void testLookupPackageSourceForSinglePkg()
test_case.identifier: testLookupPackageSourceForSinglePkg
test_case.invocations: resolve resolve resolve compileAndGetWorkspacePackageRepo getWorkspacePackageRepository toString getFileName lookupPackageSource assertEquals getPackageId anyMatch stream getPackageSourceEntries equals getEntryName assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLookupPackageSourceForSinglePkg()
focal_class.declarator: BAL_SOURCE_EXT = ".bal"
focal_class.modifier: private static final
focal_class.original_string: private static final String BAL_SOURCE_EXT = ".bal";
focal_class.type: String
focal_class.var_name: BAL_SOURCE_EXT
focal_class.declarator: documentManager
focal_class.modifier: private
focal_class.original_string: private WorkspaceDocumentManager documentManager;
focal_class.type: WorkspaceDocumentManager
focal_class.var_name: documentManager
focal_class.file: language-server/modules/langserver-compiler/src/main/java/org/ballerinalang/langserver/compiler/workspace/repository/WorkspacePackageRepository.java
focal_class.identifier: WorkspacePackageRepository
focal_class.class_method_signature: WorkspacePackageRepository.WorkspacePackageRepository(String programDirRoot, WorkspaceDocumentManager documentManager)
focal_class.full_signature: public  WorkspacePackageRepository(String programDirRoot, WorkspaceDocumentManager documentManager)
focal_class.identifier: WorkspacePackageRepository
focal_class.modifiers: public
focal_class.parameters: (String programDirRoot, WorkspaceDocumentManager documentManager)
focal_class.signature:  WorkspacePackageRepository(String programDirRoot, WorkspaceDocumentManager documentManager)
focal_class.class_method_signature: WorkspacePackageRepository.lookupPackageSource(PackageID pkgID)
focal_class.full_signature: protected PackageSource lookupPackageSource(PackageID pkgID)
focal_class.identifier: lookupPackageSource
focal_class.modifiers: protected
focal_class.parameters: (PackageID pkgID)
focal_class.return: PackageSource
focal_class.signature: PackageSource lookupPackageSource(PackageID pkgID)
focal_class.class_method_signature: WorkspacePackageRepository.lookupPackageSource(PackageID pkgID, String entryName)
focal_class.full_signature: protected PackageSource lookupPackageSource(PackageID pkgID, String entryName)
focal_class.identifier: lookupPackageSource
focal_class.modifiers: protected
focal_class.parameters: (PackageID pkgID, String entryName)
focal_class.return: PackageSource
focal_class.signature: PackageSource lookupPackageSource(PackageID pkgID, String entryName)
focal_class.class_method_signature: WorkspacePackageRepository.getResolvedPathFromPackagePath(Path pkgPath)
focal_class.full_signature: private Path getResolvedPathFromPackagePath(Path pkgPath)
focal_class.identifier: getResolvedPathFromPackagePath
focal_class.modifiers: private
focal_class.parameters: (Path pkgPath)
focal_class.return: Path
focal_class.signature: Path getResolvedPathFromPackagePath(Path pkgPath)
focal_class.superclass: extends GeneralFSPackageRepository
focal_method.body: protected PackageSource lookupPackageSource(PackageID pkgID) {
          Path path = this.generatePath(pkgID);
          return new WorkspacePackageSource(pkgID, path);
      }
focal_method.class_method_signature: WorkspacePackageRepository.lookupPackageSource(PackageID pkgID)
focal_method.full_signature: protected PackageSource lookupPackageSource(PackageID pkgID)
focal_method.identifier: lookupPackageSource
focal_method.invocations: generatePath
focal_method.modifiers: protected
focal_method.parameters: (PackageID pkgID)
focal_method.return: PackageSource
focal_method.signature: PackageSource lookupPackageSource(PackageID pkgID)