コード例 #1
0
    private void populateCandidates(
        List<File> addCandidates, List<File> deleteCandidates, List<File> commitCandidates) {
      List<String> excPaths = new ArrayList<String>();
      List<String> incPaths = new ArrayList<String>();

      Iterator<GitFileNode> it = commitFiles.iterator();
      while (it.hasNext()) {
        if (isCanceled()) {
          return;
        }
        GitFileNode node = (GitFileNode) it.next();
        FileInformation info = node.getInformation();

        VCSCommitOptions option = node.getCommitOptions();
        File file = node.getFile();
        if (option != VCSCommitOptions.EXCLUDE) {
          if (info.containsStatus(Status.NEW_INDEX_WORKING_TREE)
              || info.containsStatus(Status.MODIFIED_INDEX_WORKING_TREE)
                  && selectedFilter == GitCommitPanel.FILTER_HEAD_VS_WORKING) {
            addCandidates.add(file);
          } else if (info.containsStatus(FileInformation.STATUS_REMOVED)) {
            deleteCandidates.add(file);
          }
          commitCandidates.add(file);
          incPaths.add(file.getAbsolutePath());
        } else {
          excPaths.add(file.getAbsolutePath());
        }
      }

      if (!excPaths.isEmpty()) {
        GitModuleConfig.getDefault().addExclusionPaths(excPaths);
      }
      if (!incPaths.isEmpty()) {
        GitModuleConfig.getDefault().removeExclusionPaths(incPaths);
      }
    }
コード例 #2
0
 @Override
 public String getValue() {
   FileInformation finfo = fileNode.getInformation();
   return finfo.getStatusText(mode);
 }