示例#1
0
  private void doClearCaches(String reason) {
    final FileElement tree = getTreeElement();
    if (tree != null) {
      tree.clearCaches();
    }

    synchronized (PsiLock.LOCK) {
      clearStub(reason);
    }
    if (tree != null) {
      tree.putUserData(STUB_TREE_IN_PARSED_TREE, null);
    }

    clearCaches();
  }
示例#2
0
 public void unloadContent() {
   ApplicationManager.getApplication().assertWriteAccessAllowed();
   clearCaches();
   myViewProvider.beforeContentsSynchronized();
   synchronized (PsiLock.LOCK) {
     FileElement treeElement = derefTreeElement();
     DebugUtil.startPsiModification("unloadContent");
     try {
       if (treeElement != null) {
         myTreeElementPointer = null;
         treeElement.detachFromFile();
         DebugUtil.onInvalidated(treeElement);
       }
       clearStub("unloadContent");
     } finally {
       DebugUtil.finishPsiModification();
     }
   }
 }