当前位置: 首页>>代码示例>>Java>>正文


Java ChangeListManager.isIgnoredFile方法代码示例

本文整理汇总了Java中com.intellij.openapi.vcs.changes.ChangeListManager.isIgnoredFile方法的典型用法代码示例。如果您正苦于以下问题:Java ChangeListManager.isIgnoredFile方法的具体用法?Java ChangeListManager.isIgnoredFile怎么用?Java ChangeListManager.isIgnoredFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.vcs.changes.ChangeListManager的用法示例。


在下文中一共展示了ChangeListManager.isIgnoredFile方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: fillAddedFiles

import com.intellij.openapi.vcs.changes.ChangeListManager; //导入方法依赖的package包/类
private void fillAddedFiles(Project project,
                            SvnVcs vcs,
                            List<VirtualFile> addedVFiles,
                            Map<VirtualFile, File> copyFromMap,
                            Set<VirtualFile> recursiveItems) {
  final Collection<AddedFileInfo> addedFileInfos = myAddedFiles.remove(project);
  final ChangeListManager changeListManager = ChangeListManager.getInstance(project);

  for (AddedFileInfo addedFileInfo : addedFileInfos) {
    final File ioFile = new File(getIOFile(addedFileInfo.myDir), addedFileInfo.myName);
    VirtualFile addedFile = addedFileInfo.myDir.findChild(addedFileInfo.myName);
    if (addedFile == null) {
      addedFile = myLfs.refreshAndFindFileByIoFile(ioFile);
    }
    if (addedFile != null) {
      final Status fileStatus = getFileStatus(vcs, ioFile);
      if (fileStatus == null || !fileStatus.is(StatusType.STATUS_IGNORED)) {
        boolean isIgnored = changeListManager.isIgnoredFile(addedFile);
        if (!isIgnored) {
          addedVFiles.add(addedFile);
          copyFromMap.put(addedFile, addedFileInfo.myCopyFrom);
          if (addedFileInfo.myRecursive) {
            recursiveItems.add(addedFile);
          }
        }
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:SvnFileSystemListener.java

示例2: isFileIgnored

import com.intellij.openapi.vcs.changes.ChangeListManager; //导入方法依赖的package包/类
private static boolean isFileIgnored(@NotNull VirtualFile file, @NotNull Project project) {
  ChangeListManager manager = ChangeListManager.getInstance(project);
  return manager.isIgnoredFile(file) || FileTypeManager.getInstance().isFileIgnored(file);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GithubCreateGistAction.java

示例3: execute

import com.intellij.openapi.vcs.changes.ChangeListManager; //导入方法依赖的package包/类
@SuppressWarnings({"UnnecessaryContinue"})
public void execute() {
  //for(final File file: myIOFiles) {
  //  ApplicationManager.getApplication().runWriteAction(new Runnable() {
  //    public void run() {
  //      final VirtualFile virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file);
  //      if (virtualFile != null) {
  //        myAllFiles.add(virtualFile);
  //      }
  //    }
  //  });
  //}
  final ChangeListManager changeListManager = ChangeListManager.getInstance(myProject);
  final CvsEntriesManager cvsEntriesManager = CvsEntriesManager.getInstance();
  for (VirtualFile file : myAllFiles) {
    if (changeListManager.isIgnoredFile(file)) {
      continue;
    }
    else if (!CvsUtil.fileIsUnderCvs(file.getParent())) {
      continue;
    }
    else if (CvsUtil.fileIsLocallyRemoved(file)) {
      CvsUtil.restoreFile(file);
    }
    else if (CvsUtil.fileIsUnderCvs(file)) {
      continue;
    }
    else if (cvsEntriesManager.getCvsConnectionSettingsFor(file.getParent()).isOffline()) {
      continue;
    }
    else if (cvsEntriesManager.fileIsIgnored(file)) {
      continue;
    }
    else {
      myAddedFiles.add(file);
    }

  }

  if (!myAddedFiles.isEmpty()) {
    if (CvsVcs2.getInstance(myProject).getAddConfirmation().getValue() != VcsShowConfirmationOption.Value.DO_NOTHING_SILENTLY) {
      final Runnable addRunnable = new Runnable() {
        public void run() {
          if (!myCvsStorageComponent.getIsActive()) return;
          AddFileOrDirectoryAction.createActionToAddNewFileAutomatically()
            .actionPerformed(createDataContext(myAddedFiles));
        }
      };
      if (ApplicationManager.getApplication().isUnitTestMode()) {
        addRunnable.run();
      }
      else {
        WaitForProgressToShow.runOrInvokeLaterAboveProgress(addRunnable, null, myProject);
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:58,代码来源:AddHandler.java

示例4: isIgnoredInAnySense

import com.intellij.openapi.vcs.changes.ChangeListManager; //导入方法依赖的package包/类
public static boolean isIgnoredInAnySense(final ChangeListManager clManager, final VirtualFile file) {
  return clManager.isIgnoredFile(file) || FileStatus.IGNORED.equals(clManager.getStatus(file));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:SvnStatusUtil.java


注:本文中的com.intellij.openapi.vcs.changes.ChangeListManager.isIgnoredFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。