Java 类com.intellij.openapi.vfs.newvfs.impl.NullVirtualFile 实例源码

项目:intellij-ce-playground    文件:IgnoredFileBean.java   
public boolean matchesFile(VirtualFile file) {
  if (myType == IgnoreSettingsType.MASK) {
    myMatcher.reset(file.getName());
    return myMatcher.matches();
  }
  else {
    // quick check for 'file' == exact match pattern
    if (IgnoreSettingsType.FILE.equals(myType) && !StringUtil.equals(myFilenameIfFile, file.getNameSequence())) return false;

    VirtualFile selector = resolve();
    if (Comparing.equal(selector, NullVirtualFile.INSTANCE)) return false;

    if (myType == IgnoreSettingsType.FILE) {
      return Comparing.equal(selector, file);
    }
    else {
      if ("./".equals(myPath)) {
        // special case for ignoring the project base dir (IDEADEV-16056)
        return !file.isDirectory() && Comparing.equal(file.getParent(), selector);
      }
      return VfsUtilCore.isAncestor(selector, file, false);
    }
  }
}
项目:tools-idea    文件:IgnoredFileBean.java   
public boolean matchesFile(VirtualFile file) {
  if (myType == IgnoreSettingsType.MASK) {
    myMatcher.reset(file.getName());
    return myMatcher.matches();
  } else {
    // quick check for 'file' == exact match pattern
    if (IgnoreSettingsType.FILE.equals(myType) && ! myFilenameIfFile.equals(file.getName())) return false;

    VirtualFile selector = resolve();
    if (Comparing.equal(selector, NullVirtualFile.INSTANCE)) return false;

    if (myType == IgnoreSettingsType.FILE) {
      return Comparing.equal(selector, file);
    }
    else {
      if ("./".equals(myPath)) {
        // special case for ignoring the project base dir (IDEADEV-16056)
        return !file.isDirectory() && Comparing.equal(file.getParent(), selector);
      }
      return VfsUtil.isAncestor(selector, file, false);
    }
  }
}
项目:consulo    文件:IgnoredFileBean.java   
public boolean matchesFile(VirtualFile file) {
  if (myType == IgnoreSettingsType.MASK) {
    myMatcher.reset(file.getName());
    return myMatcher.matches();
  } else {
    // quick check for 'file' == exact match pattern
    if (IgnoreSettingsType.FILE.equals(myType) && ! myFilenameIfFile.equals(file.getName())) return false;

    VirtualFile selector = resolve();
    if (Comparing.equal(selector, NullVirtualFile.INSTANCE)) return false;

    if (myType == IgnoreSettingsType.FILE) {
      return Comparing.equal(selector, file);
    }
    else {
      if ("./".equals(myPath)) {
        // special case for ignoring the project base dir (IDEADEV-16056)
        return !file.isDirectory() && Comparing.equal(file.getParent(), selector);
      }
      return VfsUtil.isAncestor(selector, file, false);
    }
  }
}
项目:intellij-ce-playground    文件:IgnoredFileBean.java   
private VirtualFile resolve() {
  if (myCachedResolved == null) {
    VirtualFile resolved = doResolve();
    myCachedResolved = resolved != null ? resolved : NullVirtualFile.INSTANCE;
  }

  return myCachedResolved;
}
项目:tools-idea    文件:IgnoredFileBean.java   
private VirtualFile resolve() {
  if (myCachedResolved == null) {
    VirtualFile resolved = doResolve();
    myCachedResolved = resolved != null ? resolved : NullVirtualFile.INSTANCE;
  }

  return myCachedResolved;
}
项目:tools-idea    文件:DetailsLoaderImpl.java   
private GitHeavyCommit createNotLoadedCommit(AbstractHash shortHash) {
  final String notKnown = "Can not load";
  return new GitHeavyCommit(NullVirtualFile.INSTANCE, shortHash, SHAHash.emulate(shortHash), notKnown, notKnown, new Date(0), notKnown,
                          "Can not load details", Collections.<String>emptySet(), Collections.<FilePath>emptyList(), notKnown,
                          notKnown, Collections.<String>emptyList(), Collections.<String>emptyList(), Collections.<String>emptyList(),
                          Collections.<Change>emptyList(), 0);
}
项目:tools-idea    文件:GitCherryPickStepdefs.java   
private static GitHeavyCommit mockCommit(String hash, String message) {
  AbstractHash ahash = AbstractHash.create(hash);
  List<Change> changes = new ArrayList<Change>();
  changes.add(new Change(null, new MockContentRevision(new FilePathImpl(new MockVirtualFile("name")), VcsRevisionNumber.NULL)));
  return new GitHeavyCommit(NullVirtualFile.INSTANCE, ahash, SHAHash.emulate(ahash), "John Smith", null, null, message, message,
                       null, null, null, null, null, null, null, changes, 0);
}
项目:consulo    文件:IgnoredFileBean.java   
private VirtualFile resolve() {
  if (myCachedResolved == null) {
    VirtualFile resolved = doResolve();
    myCachedResolved = resolved != null ? resolved : NullVirtualFile.INSTANCE;
  }

  return myCachedResolved;
}