test_class.declarator: RES_DIR = Paths.get("src").resolve("test").resolve("resources").toAbsolutePath()
test_class.modifier: private static final
test_class.original_string: private static final Path RES_DIR = Paths.get("src").resolve("test").resolve("resources").toAbsolutePath();
test_class.type: Path
test_class.var_name: RES_DIR
test_class.declarator: NOT_A_PROJECT = "notAProject"
test_class.modifier: private static final
test_class.original_string: private static final String NOT_A_PROJECT = "notAProject";
test_class.type: String
test_class.var_name: NOT_A_PROJECT
test_class.file: misc/formatter/modules/formatter-cli/src/test/java/org/ballerinalang/formatter/cli/FormatCmdTest.java
test_class.identifier: FormatCmdTest
test_case.body: @Test(description = "Test to check the exception for no existing ballerina file.")
      public void formatCLINoBallerinaFileTest() {
          List<String> argList = new ArrayList<>();
          argList.add(RES_DIR.resolve("invalidFile.bal").toString());
          try {
              FormatUtil.execute(argList, false, false, RES_DIR);
          } catch (BLauncherException e) {
              List<String> exception = e.getMessages();
              if (exception.size() == 1) {
                  Assert.assertEquals(exception.get(0), "error: "
                                  + Messages.getNoBallerinaFile(RES_DIR.resolve("invalidFile.bal").toString()),
                          "actual exception didn't match the expected.");
              } else {
                  Assert.fail("failed the test with " + exception.size()
                          + " exceptions where there needs to be 1 exception");
              }
          }
      }
test_case.class_method_signature: FormatCmdTest.formatCLINoBallerinaFileTest()
test_case.full_signature: @Test(description = "Test to check the exception for no existing ballerina file.") public void formatCLINoBallerinaFileTest()
test_case.identifier: formatCLINoBallerinaFileTest
test_case.invocations: add toString resolve execute getMessages size assertEquals get getNoBallerinaFile toString resolve fail size
test_case.modifiers: @Test(description = "Test to check the exception for no existing ballerina file.") public
test_case.parameters: ()
test_case.return: void
test_case.signature: void formatCLINoBallerinaFileTest()
focal_class.declarator: USER_DIR = "user.dir"
focal_class.modifier: private static final
focal_class.original_string: private static final String USER_DIR = "user.dir";
focal_class.type: String
focal_class.var_name: USER_DIR
focal_class.declarator: argList
focal_class.modifier: @CommandLine.Parameters
      private
focal_class.original_string: @CommandLine.Parameters
      private List<String> argList;
focal_class.type: List<String>
focal_class.var_name: argList
focal_class.declarator: helpFlag
focal_class.modifier: @CommandLine.Option(names = {"-h", "--help"}, hidden = true)
      private
focal_class.original_string: @CommandLine.Option(names = {"-h", "--help"}, hidden = true)
      private boolean helpFlag;
focal_class.type: boolean
focal_class.var_name: helpFlag
focal_class.declarator: dryRun
focal_class.modifier: @CommandLine.Option(names = {"-d", "--dry-run"})
      private
focal_class.original_string: @CommandLine.Option(names = {"-d", "--dry-run"})
      private boolean dryRun;
focal_class.type: boolean
focal_class.var_name: dryRun
focal_class.file: misc/formatter/modules/formatter-cli/src/main/java/org/ballerinalang/formatter/cli/FormatCmd.java
focal_class.identifier: FormatCmd
focal_class.interfaces: implements BLauncherCmd
focal_class.class_method_signature: FormatCmd.execute()
focal_class.full_signature: @Override public void execute()
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void execute()
focal_class.class_method_signature: FormatCmd.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: FormatCmd.printLongDesc(StringBuilder out)
focal_class.full_signature: @Override public void printLongDesc(StringBuilder out)
focal_class.identifier: printLongDesc
focal_class.modifiers: @Override public
focal_class.parameters: (StringBuilder out)
focal_class.return: void
focal_class.signature: void printLongDesc(StringBuilder out)
focal_class.class_method_signature: FormatCmd.printUsage(StringBuilder out)
focal_class.full_signature: @Override public void printUsage(StringBuilder out)
focal_class.identifier: printUsage
focal_class.modifiers: @Override public
focal_class.parameters: (StringBuilder out)
focal_class.return: void
focal_class.signature: void printUsage(StringBuilder out)
focal_class.class_method_signature: FormatCmd.setParentCmdParser(CommandLine parentCmdParser)
focal_class.full_signature: @Override public void setParentCmdParser(CommandLine parentCmdParser)
focal_class.identifier: setParentCmdParser
focal_class.modifiers: @Override public
focal_class.parameters: (CommandLine parentCmdParser)
focal_class.return: void
focal_class.signature: void setParentCmdParser(CommandLine parentCmdParser)
focal_method.body: @Override
      public void execute() {
          // Get source root path.
          Path sourceRootPath = Paths.get(System.getProperty(USER_DIR));
          FormatUtil.execute(argList, helpFlag, dryRun, sourceRootPath);
      }
focal_method.class_method_signature: FormatCmd.execute()
focal_method.full_signature: @Override public void execute()
focal_method.identifier: execute
focal_method.invocations: get getProperty execute
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void execute()