类com.intellij.psi.stubs.PsiFileStubImpl源码实例Demo

下面列出了怎么用com.intellij.psi.stubs.PsiFileStubImpl的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: consulo   文件: SubstrateRef.java
private PsiFile reportError(StubElement stub) {
  ApplicationManager.getApplication().assertReadAccessAllowed();

  String reason = ((PsiFileStubImpl<?>)stub).getInvalidationReason();
  PsiInvalidElementAccessException exception = new PsiInvalidElementAccessException(myStub.getPsi(), "no psi for file stub " + stub + ", invalidation reason=" + reason, null);
  if (PsiFileImpl.STUB_PSI_MISMATCH.equals(reason)) {
    // we're between finding stub-psi mismatch and the next EDT spot where the file is reparsed and stub rebuilt
    //    see com.intellij.psi.impl.source.PsiFileImpl.rebuildStub()
    // most likely it's just another highlighting thread accessing the same PSI concurrently and not yet canceled, so cancel it
    throw new ProcessCanceledException(exception);
  }
  throw exception;
}
 
 类所在包
 同包方法