/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_4() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [ENABLED]\n" +
        "Open [ENABLED]\n" +
        "Unstage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_4() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "Contextual_Menu_Open [ENABLED]\n" +
        "Contextual_Menu_Unstage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_4() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_5.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_5() throws Exception {
    // Create repositories
    String localTestRepository = "target/test-resources/testActionsEnabling5_local";
    String remoteTestRepository = "target/test-resources/testActionsEnabling5_remote";
    Repository remoteRepo = createRepository(remoteTestRepository);
    Repository localRepo = createRepository(localTestRepository);
    // Bind the local repository to the remote one.
    bindLocalToRemote(localRepo , remoteRepo);

    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        // In merging state
        RepositoryState.MERGING);

    assertEquals("\n" +
        "Open_In_Compare [ENABLED]\n" +
        "Open [ENABLED]\n" +
        "Unstage [DISABLED]\n" +
        "Resolve_Conflict [ENABLED]\n" +
        "  Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [ENABLED]\n" +
        "  Resolve_Using_Theirs [ENABLED]\n" +
        "  Mark_Resolved [ENABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [ENABLED]\n" +
        "Discard [DISABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_5() throws Exception {
    // Create repositories
    String localTestRepository = "target/test-resources/testActionsEnabling5_local";
    String remoteTestRepository = "target/test-resources/testActionsEnabling5_remote";
    Repository remoteRepo = createRepository(remoteTestRepository);
    Repository localRepo = createRepository(localTestRepository);
    // Bind the local repository to the remote one.
    bindLocalToRemote(localRepo , remoteRepo);

    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        // In merging state
        true);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "Contextual_Menu_Open [ENABLED]\n" +
        "Contextual_Menu_Unstage [DISABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [ENABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [ENABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [ENABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [ENABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [ENABLED]\n" +
        "Contextual_Menu_Discard [DISABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_5() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test2.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test2.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_6.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_6() throws Exception {
    // Create repositories
    String localTestRepository = "target/test-resources/testActionsEnabling6_local";
    String remoteTestRepository = "target/test-resources/testActionsEnabling6_remote";
    Repository remoteRepo = createRepository(remoteTestRepository);
    Repository localRepo = createRepository(localTestRepository);
    // Bind the local repository to the remote one.
    bindLocalToRemote(localRepo , remoteRepo);

    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        // In merging state
        RepositoryState.MERGING);

    assertEquals("\n" +
        "Open_In_Compare [DISABLED]\n" +
        "Open [ENABLED]\n" +
        "Unstage [DISABLED]\n" +
        "Resolve_Conflict [ENABLED]\n" +
        "  Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [ENABLED]\n" +
        "  Resolve_Using_Theirs [ENABLED]\n" +
        "  Mark_Resolved [ENABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [ENABLED]\n" +
        "Discard [DISABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_6() throws Exception {
    // Create repositories
    String localTestRepository = "target/test-resources/testActionsEnabling6_local";
    String remoteTestRepository = "target/test-resources/testActionsEnabling6_remote";
    Repository remoteRepo = createRepository(remoteTestRepository);
    Repository localRepo = createRepository(localTestRepository);
    // Bind the local repository to the remote one.
    bindLocalToRemote(localRepo , remoteRepo);

    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        // In merging state
        true);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "Contextual_Menu_Open [ENABLED]\n" +
        "Contextual_Menu_Unstage [DISABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [ENABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [ENABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [ENABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [ENABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [ENABLED]\n" +
        "Contextual_Menu_Discard [DISABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_6() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.ADD, "test2.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.ADD, "test2.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_7.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_7() throws Exception {
    // Create repositories
    String localTestRepository = "target/test-resources/testActionsEnabling7_local";
    String remoteTestRepository = "target/test-resources/testActionsEnabling7_remote";
    Repository remoteRepo = createRepository(remoteTestRepository);
    Repository localRepo = createRepository(localTestRepository);
    // Bind the local repository to the remote one.
    bindLocalToRemote(localRepo , remoteRepo);

    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.ADD, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        // In merging state
        RepositoryState.MERGING);

    assertEquals("\n" +
        "Open_In_Compare [DISABLED]\n" +
        "Open [ENABLED]\n" +
        "Unstage [DISABLED]\n" +
        "Resolve_Conflict [ENABLED]\n" +
        "  Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [ENABLED]\n" +
        "Discard [DISABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_7() throws Exception {
    // Create repositories
    String localTestRepository = "target/test-resources/testActionsEnabling7_local";
    String remoteTestRepository = "target/test-resources/testActionsEnabling7_remote";
    Repository remoteRepo = createRepository(remoteTestRepository);
    Repository localRepo = createRepository(localTestRepository);
    // Bind the local repository to the remote one.
    bindLocalToRemote(localRepo , remoteRepo);

    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.CONFLICT, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.ADD, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        // In merging state
        true);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "Contextual_Menu_Open [ENABLED]\n" +
        "Contextual_Menu_Unstage [DISABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [ENABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [ENABLED]\n" +
        "Contextual_Menu_Discard [DISABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_7() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_8.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_8() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [ENABLED]\n" +
        "Open [DISABLED]\n" +
        "Stage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_8() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "Contextual_Menu_Open [DISABLED]\n" +
        "Contextual_Menu_Stage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_8() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test2.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test2.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_9.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_9() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [DISABLED]\n" +
        "Open [DISABLED]\n" +
        "Stage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_9() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "Contextual_Menu_Open [DISABLED]\n" +
        "Contextual_Menu_Stage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_9() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test2.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test2.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_10.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_10() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [DISABLED]\n" +
        "Open [DISABLED]\n" +
        "Stage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_10() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.MISSING, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "Contextual_Menu_Open [DISABLED]\n" +
        "Contextual_Menu_Stage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_10() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_11.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_11() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [ENABLED]\n" +
        "Open [DISABLED]\n" +
        "Unstage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_11() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "Contextual_Menu_Open [DISABLED]\n" +
        "Contextual_Menu_Unstage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_11() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test2.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test2.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_12.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_12() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [DISABLED]\n" +
        "Open [DISABLED]\n" +
        "Unstage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_12() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "Contextual_Menu_Open [DISABLED]\n" +
        "Contextual_Menu_Unstage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_12() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test2.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test2.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_13.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_13() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [DISABLED]\n" +
        "Open [DISABLED]\n" +
        "Unstage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_13() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.REMOVED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "Contextual_Menu_Open [DISABLED]\n" +
        "Contextual_Menu_Unstage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_13() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_14.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_14() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [ENABLED]\n" +
        "Open [ENABLED]\n" +
        "Stage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_14() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "Contextual_Menu_Open [ENABLED]\n" +
        "Contextual_Menu_Stage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_14() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test2.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test2.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_15.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_15() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [DISABLED]\n" +
        "Open [ENABLED]\n" +
        "Stage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_15() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "Contextual_Menu_Open [ENABLED]\n" +
        "Contextual_Menu_Stage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_15() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test2.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test2.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_16.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_16() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [DISABLED]\n" +
        "Open [ENABLED]\n" +
        "Stage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_16() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.UNTRACKED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "Contextual_Menu_Open [ENABLED]\n" +
        "Contextual_Menu_Stage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_16() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test2.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test2.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_17.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_17() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [ENABLED]\n" +
        "Open [ENABLED]\n" +
        "Stage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_17() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "Contextual_Menu_Open [ENABLED]\n" +
        "Contextual_Menu_Stage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_17() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test2.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test2.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_18.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_18() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [DISABLED]\n" +
        "Open [ENABLED]\n" +
        "Stage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the unstaged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_18() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.MODIFIED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For unstaged resources
        false,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "Contextual_Menu_Open [ENABLED]\n" +
        "Contextual_Menu_Stage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_18() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test2.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test2.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_19.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_19() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [DISABLED]\n" +
        "Open [ENABLED]\n" +
        "Unstage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the staged resources.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_19() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test.xml"));
            fileStatuses.add(new FileStatus(GitChangeType.CHANGED, "test2.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "Contextual_Menu_Open [ENABLED]\n" +
        "Contextual_Menu_Unstage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_19() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.SUBMODULE, "test.xml"));
            return fileStatuses;
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.SUBMODULE, "test.xml"));
            return fileStatuses;
          }

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public getAllSelectedResources() : List<FileStatus> from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest.testActionsEnablingState_20.menu.new GitViewResourceContextualMenu.new SelectedResourcesProvider


/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the submodules.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_20() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<>();
            fileStatuses.add(new FileStatus(GitChangeType.SUBMODULE, "test.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        RepositoryState.SAFE);

    assertEquals("\n" +
        "Open_In_Compare [ENABLED]\n" +
        "Open [DISABLED]\n" +
        "Unstage [ENABLED]\n" +
        "Resolve_Conflict [DISABLED]\n" +
        "  Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Resolve_Using_Mine [DISABLED]\n" +
        "  Resolve_Using_Theirs [DISABLED]\n" +
        "  Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Restart_Merge [DISABLED]\n" +
        "Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

/**
   *
Description: test the enabling state of the actions
   * from the contextual menu of the submodules.

   *
Bug ID: EXM-40615

   *
   * @author sorin_carbunaru
   *
   * @throws Exception
   */
  public void testActionsEnablingState_20() throws Exception {
    GitViewResourceContextualMenu menu = new GitViewResourceContextualMenu(
        new SelectedResourcesProvider() {
          @Override
          public List<FileStatus> getOnlySelectedLeaves() {
            return getAllSelectedResources();
          }

          @Override
          public List<FileStatus> getAllSelectedResources() {
            List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
            fileStatuses.add(new FileStatus(GitChangeType.SUBMODULE, "test.xml"));
            return fileStatuses;
          }
        },
        stagingCtrl,
        // For staged resources
        true,
        false);

    assertEquals("\n" +
        "Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "Contextual_Menu_Open [DISABLED]\n" +
        "Contextual_Menu_Unstage [ENABLED]\n" +
        "Contextual_Menu_Resolve_Conflict [DISABLED]\n" +
        "  Contextual_Menu_Open_In_Compare [ENABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Resolve_Using_Mine [DISABLED]\n" +
        "  Contextual_Menu_Resolve_Using_Theirs [DISABLED]\n" +
        "  Contextual_Menu_Mark_Resolved [DISABLED]\n" +
        "  ----\n" +
        "  Contextual_Menu_Restart_Merge [DISABLED]\n" +
        "Contextual_Menu_Discard [ENABLED]",
        PopupMenuSerializer.serializePopupStructure(menu, true, true));
  }

Replace Generic With Diamond GitViewResourceContextualMenu with GitViewResourceContextualMenu in method public testActionsEnablingState_20() : void from class com.oxygenxml.git.view.GitViewResourceContextualMenuActionsTest


  /**
   *  Shows the commit history for the given file.
   *
   * @param filePath Path of the file, relative to the working copy.
   * @param activeRevCommit The commit to select in the view.
   */
  public void showCommit(String filePath, RevCommit activeRevCommit) {
    // TODO Check if we don't already present the history for this path!!!!
    showHistory(filePath);
    if (activeRevCommit != null) {
      HistoryCommitTableModel model =  (HistoryCommitTableModel) historyTable.getModel();
      List<CommitCharacteristics> commitVector = model.getCommitVector();
      for (int i = 0; i < commitVector.size(); i++) {
        CommitCharacteristics commitCharacteristics = commitVector.get(i);

        if (activeRevCommit.getId().getName().equals(commitCharacteristics.getCommitId())) {
          final int sel = i;
          SwingUtilities.invokeLater(() -> {
            historyTable.scrollRectToVisible(historyTable.getCellRect(sel, 0, true));
            historyTable.getSelectionModel().setSelectionInterval(sel, sel);
          });
          break;
        }
      }
    }
  }

  /**
   *  Shows the commit history for the given file.
   *
   * @param filePath Path of the file, relative to the working copy.
   * @param activeRevCommit The commit to select in the view.
   */
  public void showCommit(String filePath, RevCommit activeRevCommit) {
    // TODO Present revisions just for the given resource.
    if (activeRevCommit != null) {
      HistoryCommitTableModel model =  (HistoryCommitTableModel) historyTable.getModel();
      List<CommitCharacteristics> commitVector = model.getCommitVector();
      for (int i = 0; i < commitVector.size(); i++) {
        CommitCharacteristics commitCharacteristics = commitVector.get(i);

        if (activeRevCommit.getId().getName().equals(commitCharacteristics.getCommitId())) {
          final int sel = i;
          SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
              historyTable.scrollRectToVisible(historyTable.getCellRect(sel, 0, true));
              historyTable.getSelectionModel().setSelectionInterval(sel, sel);
            }
          });
          break;
        }
      }
    }
  }

Replace Anonymous With Lambda com.oxygenxml.git.view.historycomponents.HistoryPanel.showCommit.invokeLater.new Runnable with () -> {historyTable.scrollRectToVisible(historyTable.getCellRect(sel,0,true)); in method public showCommit(filePath String, activeRevCommit RevCommit) : void from class com.oxygenxml.git.view.historycomponents.HistoryPanel


	@Test
	public void testRemoveModifyFile() {
		try {
			PrintWriter out = new PrintWriter(LOCAL_TEST_REPOSITPRY + "/test.txt");
			out.println("modificare");
			out.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}

		List<FileStatus> files = gitAccess.getUnstagedFiles();
		gitAccess.addAll(files);
		gitAccess.resetAll(files);
		List<FileStatus> actual = gitAccess.getUnstagedFiles();
		List<FileStatus> expected = new ArrayList<>();
		expected.add(new FileStatus(GitChangeType.MODIFIED, "test.txt"));
		assertEquals(expected, actual);
	}

	@Test
	public void testRemoveModifyFile() {
		try {
			PrintWriter out = new PrintWriter(LOCAL_TEST_REPOSITPRY + "/test.txt");
			out.println("modificare");
			out.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}

		List<FileStatus> files = gitAccess.getUnstagedFiles();
		gitAccess.addAll(files);
		gitAccess.resetAll(files);
		List<FileStatus> actual = gitAccess.getUnstagedFiles();
		List<FileStatus> expected = new ArrayList<FileStatus>();
		expected.add(new FileStatus(GitChangeType.MODIFIED, "test.txt"));
		assertEquals(expected, actual);
	}

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public testRemoveModifyFile() : void from class com.oxygenxml.git.service.GitAccessRemoveTest


	@Test
	public void testRemoveAddFile() {
		File file = new File(LOCAL_TEST_REPOSITPRY + "/add.txt");
		try {
			file.createNewFile();
		} catch (IOException e) {
			e.printStackTrace();
		}
		List<FileStatus> files = gitAccess.getUnstagedFiles();
		gitAccess.addAll(files);
		gitAccess.resetAll(files);
		List<FileStatus> actual = gitAccess.getUnstagedFiles();
		List<FileStatus> expected = new ArrayList<>();
		expected.add(new FileStatus(GitChangeType.UNTRACKED, "add.txt"));
		assertEquals(expected, actual);
	}

	@Test
	public void testRemoveAddFile() {
		File file = new File(LOCAL_TEST_REPOSITPRY + "/add.txt");
		try {
			file.createNewFile();
		} catch (IOException e) {
			e.printStackTrace();
		}
		List<FileStatus> files = gitAccess.getUnstagedFiles();
		gitAccess.addAll(files);
		gitAccess.resetAll(files);
		List<FileStatus> actual = gitAccess.getUnstagedFiles();
		List<FileStatus> expected = new ArrayList<FileStatus>();
		expected.add(new FileStatus(GitChangeType.UNTRACKED, "add.txt"));
		assertEquals(expected, actual);
	}

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public testRemoveAddFile() : void from class com.oxygenxml.git.service.GitAccessRemoveTest


	@Test
	public void testRemoveDeleteFile() {
		File file = new File(LOCAL_TEST_REPOSITPRY + "/test.txt");
		file.delete();

		List<FileStatus> files = gitAccess.getUnstagedFiles();
		gitAccess.addAll(files);
		gitAccess.resetAll(files);
		List<FileStatus> actual = gitAccess.getUnstagedFiles();
		List<FileStatus> expected = new ArrayList<>();
		expected.add(new FileStatus(GitChangeType.MISSING, "test.txt"));
		assertEquals(expected, actual);
	}

	@Test
	public void testRemoveDeleteFile() {
		File file = new File(LOCAL_TEST_REPOSITPRY + "/test.txt");
		file.delete();

		List<FileStatus> files = gitAccess.getUnstagedFiles();
		gitAccess.addAll(files);
		gitAccess.resetAll(files);
		List<FileStatus> actual = gitAccess.getUnstagedFiles();
		List<FileStatus> expected = new ArrayList<FileStatus>();
		expected.add(new FileStatus(GitChangeType.MISSING, "test.txt"));
		assertEquals(expected, actual);
	}

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public testRemoveDeleteFile() : void from class com.oxygenxml.git.service.GitAccessRemoveTest


	@Test
	public void testGetUnstagedFilesForModifyFiles() {
		try {
			PrintWriter out = new PrintWriter(LOCAL_TEST_REPOSITPRY + "/test.txt");
			out.println("modificare");
			out.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}

		List<FileStatus> actual = gitAccess.getUnstagedFiles();
		List<FileStatus> expected = new ArrayList<>();
		expected.add(new FileStatus(GitChangeType.MODIFIED, "test.txt"));
		assertEquals(actual.toString(), expected.toString());
	}

	@Test
	public void testGetUnstagedFilesForModifyFiles() {
		try {
			PrintWriter out = new PrintWriter(LOCAL_TEST_REPOSITPRY + "/test.txt");
			out.println("modificare");
			out.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}

		List<FileStatus> actual = gitAccess.getUnstagedFiles();
		List<FileStatus> expected = new ArrayList<FileStatus>();
		expected.add(new FileStatus(GitChangeType.MODIFIED, "test.txt"));
		assertEquals(actual.toString(), expected.toString());
	}

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public testGetUnstagedFilesForModifyFiles() : void from class com.oxygenxml.git.service.GitAccessUnstageFilesTest


	@Test
	public void testGetUnstagedFilesForAddedFiles() {
		File file = new File(LOCAL_TEST_REPOSITPRY + "/add.txt");
		try {
			file.createNewFile();
		} catch (IOException e) {
			e.printStackTrace();
		}

		List<FileStatus> actual = gitAccess.getUnstagedFiles();
		List<FileStatus> expected = new ArrayList<>();
		expected.add(new FileStatus(GitChangeType.UNTRACKED, "add.txt"));
		assertEquals(actual, expected);
	}

	@Test
	public void testGetUnstagedFilesForAddedFiles() {
		File file = new File(LOCAL_TEST_REPOSITPRY + "/add.txt");
		try {
			file.createNewFile();
		} catch (IOException e) {
			e.printStackTrace();
		}

		List<FileStatus> actual = gitAccess.getUnstagedFiles();
		List<FileStatus> expected = new ArrayList<FileStatus>();
		expected.add(new FileStatus(GitChangeType.UNTRACKED, "add.txt"));
		assertEquals(actual, expected);
	}

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public testGetUnstagedFilesForAddedFiles() : void from class com.oxygenxml.git.service.GitAccessUnstageFilesTest


	@Test
	public void testGetUnstagedFilesForDeletedFiles() {
		File file = new File(LOCAL_TEST_REPOSITPRY + "/test.txt");
		file.delete();

		List<FileStatus> actual = gitAccess.getUnstagedFiles();
		List<FileStatus> expected = new ArrayList<>();
		expected.add(new FileStatus(GitChangeType.MISSING, "test.txt"));
		assertEquals(actual, expected);
	}

	@Test
	public void testGetUnstagedFilesForDeletedFiles() {
		File file = new File(LOCAL_TEST_REPOSITPRY + "/test.txt");
		file.delete();

		List<FileStatus> actual = gitAccess.getUnstagedFiles();
		List<FileStatus> expected = new ArrayList<FileStatus>();
		expected.add(new FileStatus(GitChangeType.MISSING, "test.txt"));
		assertEquals(actual, expected);
	}

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public testGetUnstagedFilesForDeletedFiles() : void from class com.oxygenxml.git.service.GitAccessUnstageFilesTest


	@Test
	public void testGetStagedFilesForModify(){
		try {
			PrintWriter out = new PrintWriter(LOCAL_TEST_REPOSITPRY + "/test.txt");
			out.println("modificare");
			out.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		gitAccess.addAll(gitAccess.getUnstagedFiles());
		List<FileStatus> actual = gitAccess.getStagedFiles();
		List<FileStatus> expected = new ArrayList<>();
		expected.add(new FileStatus(GitChangeType.CHANGED, "test.txt"));
		assertEquals(actual, expected);
	}

	@Test
	public void testGetStagedFilesForModify(){
		try {
			PrintWriter out = new PrintWriter(LOCAL_TEST_REPOSITPRY + "/test.txt");
			out.println("modificare");
			out.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		gitAccess.addAll(gitAccess.getUnstagedFiles());
		List<FileStatus> actual = gitAccess.getStagedFiles();
		List<FileStatus> expected = new ArrayList<FileStatus>();
		expected.add(new FileStatus(GitChangeType.CHANGED, "test.txt"));
		assertEquals(actual, expected);
	}

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public testGetStagedFilesForModify() : void from class com.oxygenxml.git.service.GItAccessStagedFilesTest


	@Test
	public void testGetStagedFilesForAddedFiles() {
		File file = new File(LOCAL_TEST_REPOSITPRY + "/add.txt");
		try {
			file.createNewFile();
		} catch (IOException e) {
			e.printStackTrace();
		}
		gitAccess.addAll(gitAccess.getUnstagedFiles());
		List<FileStatus> actual = gitAccess.getStagedFiles();
		List<FileStatus> expected = new ArrayList<>();
		expected.add(new FileStatus(GitChangeType.ADD, "add.txt"));
		assertEquals(actual, expected);
	}

	@Test
	public void testGetStagedFilesForAddedFiles() {
		File file = new File(LOCAL_TEST_REPOSITPRY + "/add.txt");
		try {
			file.createNewFile();
		} catch (IOException e) {
			e.printStackTrace();
		}
		gitAccess.addAll(gitAccess.getUnstagedFiles());
		List<FileStatus> actual = gitAccess.getStagedFiles();
		List<FileStatus> expected = new ArrayList<FileStatus>();
		expected.add(new FileStatus(GitChangeType.ADD, "add.txt"));
		assertEquals(actual, expected);
	}

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public testGetStagedFilesForAddedFiles() : void from class com.oxygenxml.git.service.GItAccessStagedFilesTest


	@Test
	public void testGetStagedFilesForDeletedFiles() {
		File file = new File(LOCAL_TEST_REPOSITPRY + "/test.txt");
		file.delete();

		gitAccess.addAll(gitAccess.getUnstagedFiles());
		List<FileStatus> actual = gitAccess.getStagedFiles();
		List<FileStatus> expected = new ArrayList<>();
		expected.add(new FileStatus(GitChangeType.REMOVED, "test.txt"));
		assertEquals(actual, expected);
	}

	@Test
	public void testGetStagedFilesForDeletedFiles() {
		File file = new File(LOCAL_TEST_REPOSITPRY + "/test.txt");
		file.delete();

		gitAccess.addAll(gitAccess.getUnstagedFiles());
		List<FileStatus> actual = gitAccess.getStagedFiles();
		List<FileStatus> expected = new ArrayList<FileStatus>();
		expected.add(new FileStatus(GitChangeType.REMOVED, "test.txt"));
		assertEquals(actual, expected);
	}

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public testGetStagedFilesForDeletedFiles() : void from class com.oxygenxml.git.service.GItAccessStagedFilesTest


	/**
	 * Pulls the files that are not on the local repository from the remote
	 * repository
	 *
	 * @param username Git username
	 * @param password Git password
	 *
	 * @return The result, if successful.
	 *
	 * @throws CheckoutConflictException There is a conflict between the local repository and the remote one.
	 *  The same file that is in conflict is changed inside the working copy so operation is aborted.
	 * @throws GitAPIException other errors.
	 */
	public PullResponse pull(String username, String password) throws CheckoutConflictException, GitAPIException {
	  AuthenticationInterceptor.install();

		PullResponse response = new PullResponse(PullStatus.OK, new HashSet<String>());
		if (!getConflictingFiles().isEmpty()) {
			response.setStatus(PullStatus.REPOSITORY_HAS_CONFLICTS);
		} else {
			git.reset().call();
			String sshPassphrase = OptionsManager.getInstance().getSshPassphrase();
			Repository repository = git.getRepository();

			ObjectId oldHead = null;
			try {
        oldHead = repository.resolve("HEAD^{tree}");
      } catch (RevisionSyntaxException | IOException e) {
        if (logger.isDebugEnabled()) {
          logger.debug(e, e);
        }
      }
			// Call "Pull"
			PullResult call = git.pull().setCredentialsProvider(
			    new SSHCapableUserCredentialsProvider(username, password, sshPassphrase, getHostName())).call();
			ObjectId head = null;
			try {
        head = repository.resolve("HEAD^{tree}");
      } catch (RevisionSyntaxException | IOException e) {
        if (logger.isDebugEnabled()) {
          logger.debug(e, e);
        }
      }

			if (oldHead != null && head != null) {
			  refreshProject(repository, oldHead, head);
			}

			MergeResult mergeResult = call.getMergeResult();

			if (mergeResult != null) {
			  if (logger.isDebugEnabled()) {
			    logger.debug("Merge result " + mergeResult);
			    logger.debug("mergeResult.getMergeStatus() " + mergeResult.getMergeStatus());
			  }

			  if (mergeResult.getMergeStatus() == MergeStatus.FAILED) {

			    if (logger.isDebugEnabled()) {
			      Map<String, MergeFailureReason> failingPaths = mergeResult.getFailingPaths();
			      if (failingPaths != null) {
			        Set<String> keySet = failingPaths.keySet();
			        for (String string : keySet) {
			          logger.debug("path " + string);
			          logger.debug("reason " + failingPaths.get(string));
			        }
			      }
			    }

			    throw new CheckoutConflictException(
			        new ArrayList<>(mergeResult.getFailingPaths().keySet()),
			        new org.eclipse.jgit.errors.CheckoutConflictException(""));
			  }
			}

			if (mergeResult != null && mergeResult.getConflicts() != null) {
			  // This is a successful merge but there are conflicts that should be resolved
			  // by the user.
			  Set<String> conflictingFiles = mergeResult.getConflicts().keySet();
			  if (conflictingFiles != null) {
			    response.setConflictingFiles(conflictingFiles);
			    response.setStatus(PullStatus.CONFLICTS);
			  }
			}
			if (call.getMergeResult().getMergeStatus() == MergeStatus.ALREADY_UP_TO_DATE) {
				response.setStatus(PullStatus.UP_TO_DATE);
			}
		}

		return response;

	}

	/**
	 * Pulls the files that are not on the local repository from the remote
	 * repository
	 *
	 * @param username Git username
	 * @param password Git password
	 *
	 * @return The result, if successful.
	 *
	 * @throws CheckoutConflictException There is a conflict between the local repository and the remote one.
	 *  The same file that is in conflict is changed inside the working copy so operation is aborted.
	 * @throws GitAPIException other errors.
	 */
	public PullResponse pull(String username, String password) throws CheckoutConflictException, GitAPIException {
	  AuthenticationInterceptor.install();

		PullResponse response = new PullResponse(PullStatus.OK, new HashSet<String>());
		if (!getConflictingFiles().isEmpty()) {
			response.setStatus(PullStatus.REPOSITORY_HAS_CONFLICTS);
		} else {
			git.reset().call();
			String sshPassphrase = OptionsManager.getInstance().getSshPassphrase();
			Repository repository = git.getRepository();

			ObjectId oldHead = null;
			try {
        oldHead = repository.resolve("HEAD^{tree}");
      } catch (RevisionSyntaxException | IOException e) {
        if (logger.isDebugEnabled()) {
          logger.debug(e, e);
        }
      }
			// Call "Pull"
			PullResult call = git.pull().setCredentialsProvider(
			    new SSHCapableUserCredentialsProvider(username, password, sshPassphrase, getHostName())).call();
			ObjectId head = null;
			try {
        head = repository.resolve("HEAD^{tree}");
      } catch (RevisionSyntaxException | IOException e) {
        if (logger.isDebugEnabled()) {
          logger.debug(e, e);
        }
      }

			if (oldHead != null && head != null) {
			  refreshProject(repository, oldHead, head);
			}

			MergeResult mergeResult = call.getMergeResult();

			if (mergeResult != null) {
			  if (logger.isDebugEnabled()) {
			    logger.debug("Merge result " + mergeResult);
			    logger.debug("mergeResult.getMergeStatus() " + mergeResult.getMergeStatus());
			  }

			  if (mergeResult.getMergeStatus() == MergeStatus.FAILED) {

			    if (logger.isDebugEnabled()) {
			      Map<String, MergeFailureReason> failingPaths = mergeResult.getFailingPaths();
			      if (failingPaths != null) {
			        Set<String> keySet = failingPaths.keySet();
			        for (String string : keySet) {
			          logger.debug("path " + string);
			          logger.debug("reason " + failingPaths.get(string));
			        }
			      }
			    }

			    throw new CheckoutConflictException(
			        new ArrayList<String>(mergeResult.getFailingPaths().keySet()),
			        new org.eclipse.jgit.errors.CheckoutConflictException(""));
			  }
			}

			if (mergeResult != null && mergeResult.getConflicts() != null) {
			  // This is a successful merge but there are conflicts that should be resolved
			  // by the user.
			  Set<String> conflictingFiles = mergeResult.getConflicts().keySet();
			  if (conflictingFiles != null) {
			    response.setConflictingFiles(conflictingFiles);
			    response.setStatus(PullStatus.CONFLICTS);
			  }
			}
			if (call.getMergeResult().getMergeStatus() == MergeStatus.ALREADY_UP_TO_DATE) {
				response.setStatus(PullStatus.UP_TO_DATE);
			}
		}

		return response;

	}

Replace Generic With Diamond CheckoutConflictException with CheckoutConflictException in method public pull(username String, password String) : PullResponse from class com.oxygenxml.git.service.GitAccess


	/**
	 * Generate a tree structure with the given files. The given path is used to
	 * get the root for the structure that will be generated from the files. An
	 * example will be: if path = "C:/test/repository" the root node name will be
	 * "repository", then the files will pe placed under this root
	 *
	 * @param path
	 *          - the root
	 * @param filesStatus
	 *          - files to generate the nodes
	 */
	private void updateTreeView(String rootFolder, List<FileStatus> filesStatus) {
	  if (tree != null) {
	    if (rootFolder == null) {
	      rootFolder = "";
	    }
	    StagingResourcesTreeModel treeModel = (StagingResourcesTreeModel) tree.getModel();
	    GitTreeNode rootNode = (GitTreeNode) treeModel.getRoot();
	    Enumeration<TreePath> expandedPaths = getLastExpandedPaths();
	    TreePath[] selectionPaths = tree.getSelectionPaths();

	    if (rootNode == null || !rootFolder.equals(rootNode.getUserObject())) {
	      GitTreeNode root = new GitTreeNode(rootFolder);
	      // Create the tree model and add the root node to it
	      treeModel = new StagingResourcesTreeModel(stageController, root, forStagedResources, new ArrayList<>(filesStatus));

	      // Create the tree with the new model
	      tree.setModel(treeModel);
	    }

	    treeModel.setFilesStatus(filesStatus);

	    tree.setCellRenderer(new ChangesTreeCellRenderer());

	    // restore last expanded paths after refresh
	    TreeFormatter.restoreLastExpandedPaths(expandedPaths, tree);
	    tree.setSelectionPaths(selectionPaths);
	  }
	}

	/**
	 * Generate a tree structure with the given files. The given path is used to
	 * get the root for the structure that will be generated from the files. An
	 * example will be: if path = "C:/test/repository" the root node name will be
	 * "repository", then the files will pe placed under this root
	 *
	 * @param path
	 *          - the root
	 * @param filesStatus
	 *          - files to generate the nodes
	 */
	private void updateTreeView(String rootFolder, List<FileStatus> filesStatus) {
	  if (tree != null) {
	    if (rootFolder == null) {
	      rootFolder = "";
	    }
	    StagingResourcesTreeModel treeModel = (StagingResourcesTreeModel) tree.getModel();
	    GitTreeNode rootNode = (GitTreeNode) treeModel.getRoot();
	    Enumeration<TreePath> expandedPaths = getLastExpandedPaths();
	    TreePath[] selectionPaths = tree.getSelectionPaths();

	    if (rootNode == null || !rootFolder.equals(rootNode.getUserObject())) {
	      GitTreeNode root = new GitTreeNode(rootFolder);
	      // Create the tree model and add the root node to it
	      treeModel = new StagingResourcesTreeModel(stageController, root, forStagedResources, new ArrayList<FileStatus>(filesStatus));

	      // Create the tree with the new model
	      tree.setModel(treeModel);
	    }

	    treeModel.setFilesStatus(filesStatus);

	    tree.setCellRenderer(new ChangesTreeCellRenderer());

	    // restore last expanded paths after refresh
	    TreeFormatter.restoreLastExpandedPaths(expandedPaths, tree);
	    tree.setSelectionPaths(selectionPaths);
	  }
	}

Replace Generic With Diamond StagingResourcesTreeModel with StagingResourcesTreeModel in method private updateTreeView(rootFolder String, filesStatus List<FileStatus>) : void from class com.oxygenxml.git.view.ChangesPanel


	/**
	 * Change the files stage state from unstaged to staged or from staged to
	 * unstaged
	 *
	 * @param selectedFiles
	 *          - the files to change their stage state
	 */
	public void switchAllFilesStageState() {
		List<FileStatus> filesToBeUpdated = new ArrayList<>();
		for (FileStatus fileStatus : filesStatus) {
			if (fileStatus.getChangeType() != GitChangeType.CONFLICT) {
				filesToBeUpdated.add(fileStatus);
			}
		}

		GitCommand action = GitCommand.UNSTAGE;
		if (!inIndex) {
		  action = GitCommand.STAGE;
		}

    stageController.doGitCommand(filesToBeUpdated, action);
	}

	/**
	 * Change the files stage state from unstaged to staged or from staged to
	 * unstaged
	 *
	 * @param selectedFiles
	 *          - the files to change their stage state
	 */
	public void switchAllFilesStageState() {
		List<FileStatus> filesToBeUpdated = new ArrayList<FileStatus>();
		for (FileStatus fileStatus : filesStatus) {
			if (fileStatus.getChangeType() != GitChangeType.CONFLICT) {
				filesToBeUpdated.add(fileStatus);
			}
		}

		GitCommand action = GitCommand.UNSTAGE;
		if (!inIndex) {
		  action = GitCommand.STAGE;
		}

    stageController.doGitCommand(filesToBeUpdated, action);
	}

Replace Generic With Diamond ArrayList<FileStatus> with ArrayList<> in method public switchAllFilesStageState() : void from class com.oxygenxml.git.view.StagingResourcesTableModel


	/**
	 * Removes any duplicate entries
	 */
	private void removeDuplicates() {
		Set<FileStatus> set = new HashSet<>();
		set.addAll(this.filesStatus);
		this.filesStatus.clear();
		this.filesStatus.addAll(set);
	}

	/**
	 * Removes any duplicate entries
	 */
	private void removeDuplicates() {
		Set<FileStatus> set = new HashSet<FileStatus>();
		set.addAll(this.filesStatus);
		this.filesStatus.clear();
		this.filesStatus.addAll(set);
	}

Replace Generic With Diamond HashSet<FileStatus> with HashSet<> in method private removeDuplicates() : void from class com.oxygenxml.git.view.StagingResourcesTableModel