本文整理汇总了Java中com.intellij.psi.stubs.PsiFileStubImpl类的典型用法代码示例。如果您正苦于以下问题:Java PsiFileStubImpl类的具体用法?Java PsiFileStubImpl怎么用?Java PsiFileStubImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PsiFileStubImpl类属于com.intellij.psi.stubs包,在下文中一共展示了PsiFileStubImpl类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onContentReload
import com.intellij.psi.stubs.PsiFileStubImpl; //导入依赖的package包/类
@Override
public void onContentReload()
{
ApplicationManager.getApplication().assertWriteAccessAllowed();
synchronized(myStubLock)
{
StubTree stubTree = SoftReference.dereference(myStub);
myStub = null;
if(stubTree != null)
{
//noinspection unchecked
((PsiFileStubImpl) stubTree.getRoot()).clearPsi("cls onContentReload");
}
}
synchronized(myMirrorLock)
{
putUserData(CLS_DOCUMENT_LINK_KEY, null);
myMirrorFileElement = null;
myPackageStatement = null;
}
}
示例2: reportError
import com.intellij.psi.stubs.PsiFileStubImpl; //导入依赖的package包/类
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;
}
示例3: clearStub
import com.intellij.psi.stubs.PsiFileStubImpl; //导入依赖的package包/类
FileTrees clearStub(@Nonnull String reason) {
StubTree stubHolder = derefStub();
if (stubHolder != null) {
((PsiFileStubImpl<?>)stubHolder.getRoot()).clearPsi(reason);
}
return new FileTrees(null, myTreeElementPointer, astLoaded, useStrongRefs);
}