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

项目:intellij-ce-playground    文件:LightPlatformTestCase.java   
@Override
protected void setUp() throws Exception {
  EdtTestUtil.runInEdtAndWait(new ThrowableRunnable<Throwable>() {
    @Override
    public void run() throws Exception {
      LightPlatformTestCase.super.setUp();
      initApplication();
      ApplicationInfoImpl.setInPerformanceTest(isPerformanceTest());

      ourApplication.setDataProvider(LightPlatformTestCase.this);
      LightProjectDescriptor descriptor = new SimpleLightProjectDescriptor(getModuleType(), getProjectJDK());
      doSetup(descriptor, configureLocalInspectionTools(), getTestRootDisposable());
      InjectedLanguageManagerImpl.pushInjectors(getProject());

      storeSettings();

      myThreadTracker = new ThreadTracker();
      ModuleRootManager.getInstance(ourModule).orderEntries().getAllLibrariesAndSdkClassesRoots();
      VirtualFilePointerManagerImpl filePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance();
      filePointerManager.storePointers();
    }
  });
}
项目:tools-idea    文件:LightPlatformTestCase.java   
@Override
protected void tearDown() throws Exception {
  Project project = getProject();
  CodeStyleSettingsManager.getInstance(project).dropTemporarySettings();
  checkForSettingsDamage();
  VirtualFilePointerManagerImpl filePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance();
  doTearDown(project, ourApplication, true);

  try {
    super.tearDown();
  }
  finally {
    myThreadTracker.checkLeak();
    InjectedLanguageManagerImpl.checkInjectorsAreDisposed(project);
    filePointerManager.assertPointersAreDisposed();
  }
}
项目:consulo    文件:LightPlatformTestCase.java   
@Override
@RequiredDispatchThread
protected void setUp() throws Exception {
  super.setUp();
  initApplication();
  //ourApplication.setDataProvider(this);
  doSetup(createTestModuleDescriptor(), configureLocalInspectionTools(), myAvailableInspectionTools);
  InjectedLanguageManagerImpl.pushInjectors(getProject());

  storeSettings();

  myThreadTracker = new ThreadTracker();
  ApplicationInfoImpl.setInPerformanceTest(isPerformanceTest());
  ModuleRootManager.getInstance(ourModule).orderEntries().getAllLibrariesAndSdkClassesRoots();
  VirtualFilePointerManagerImpl filePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance();
  filePointerManager.storePointers();
}
项目:consulo    文件:LightPlatformTestCase.java   
@Override
protected void tearDown() throws Exception {
  Project project = getProject();
  CodeStyleSettingsManager.getInstance(project).dropTemporarySettings();
  checkForSettingsDamage();
  VirtualFilePointerManagerImpl filePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance();
  doTearDown(project, ourApplication, true);

  try {
    super.tearDown();
  }
  finally {
    myThreadTracker.checkLeak();
    InjectedLanguageManagerImpl.checkInjectorsAreDisposed(project);
    filePointerManager.assertPointersAreDisposed();
  }
}
项目:intellij-ce-playground    文件:IdeaTestCase.java   
@Override
protected void setUp() throws Exception {
  super.setUp();
  myJavaFacade = JavaPsiFacadeEx.getInstanceEx(myProject);
  VirtualFilePointerManagerImpl filePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance();
  filePointerManager.storePointers();
}
项目:intellij-ce-playground    文件:IdeaTestCase.java   
@Override
protected void tearDown() throws Exception {
  myJavaFacade = null;
  super.tearDown();
  VirtualFilePointerManagerImpl filePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance();
  filePointerManager.assertPointersAreDisposed();
}
项目:tools-idea    文件:IdeaTestCase.java   
@Override
protected void setUp() throws Exception {
  super.setUp();
  myJavaFacade = JavaPsiFacadeEx.getInstanceEx(myProject);
  VirtualFilePointerManagerImpl filePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance();
  filePointerManager.storePointers();
}
项目:tools-idea    文件:IdeaTestCase.java   
@Override
protected void tearDown() throws Exception {
  myJavaFacade = null;
  super.tearDown();
  VirtualFilePointerManagerImpl filePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance();
  filePointerManager.assertPointersAreDisposed();
}
项目:tools-idea    文件:LightPlatformTestCase.java   
@Override
protected void setUp() throws Exception {
  super.setUp();
  initApplication();
  ourApplication.setDataProvider(this);
  doSetup(new SimpleLightProjectDescriptor(getModuleType(), getProjectJDK()), configureLocalInspectionTools(), myAvailableInspectionTools);
  InjectedLanguageManagerImpl.pushInjectors(getProject());

  storeSettings();

  myThreadTracker = new ThreadTracker();
  ModuleRootManager.getInstance(ourModule).orderEntries().getAllLibrariesAndSdkClassesRoots();
  VirtualFilePointerManagerImpl filePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance();
  filePointerManager.storePointers();
}
项目:consulo    文件:IdeaTestCase.java   
@Override
protected void tearDown() throws Exception {
  //myJavaFacade = null;
  super.tearDown();
  VirtualFilePointerManagerImpl filePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance();
  filePointerManager.assertPointersAreDisposed();
}
项目:consulo-java    文件:IdeaTestCase.java   
@Override
protected void setUp() throws Exception {
  super.setUp();
  myJavaFacade = JavaPsiFacadeEx.getInstanceEx(myProject);
  VirtualFilePointerManagerImpl filePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance();
  filePointerManager.storePointers();
}
项目:consulo-java    文件:IdeaTestCase.java   
@Override
protected void tearDown() throws Exception {
  myJavaFacade = null;
  super.tearDown();
  VirtualFilePointerManagerImpl filePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance();
  filePointerManager.assertPointersAreDisposed();
}
项目:intellij-ce-playground    文件:LightPlatformTestCase.java   
private static void initProject(@NotNull final LightProjectDescriptor descriptor) throws Exception {
  ourProjectDescriptor = descriptor;

  AccessToken token = WriteAction.start();
  try {
    if (ourProject != null) {
      closeAndDeleteProject();
    }
    else {
      cleanPersistedVFSContent();
    }
  }
  finally {
    token.finish();
  }

  final File projectFile = FileUtil.createTempFile("light_temp_", ProjectFileType.DOT_DEFAULT_EXTENSION);
  LocalFileSystem.getInstance().refreshAndFindFileByIoFile(projectFile);

  ByteArrayOutputStream buffer = new ByteArrayOutputStream();
  new Throwable(projectFile.getPath()).printStackTrace(new PrintStream(buffer));

  ourProject = PlatformTestCase.createProject(projectFile, LIGHT_PROJECT_MARK + buffer);
  ourPathToKeep = projectFile.getPath();
  if (!ourHaveShutdownHook) {
    ourHaveShutdownHook = true;
    registerShutdownHook();
  }
  ourPsiManager = null;

  ourProjectDescriptor.setUpProject(ourProject, new LightProjectDescriptor.SetupHandler() {
    @Override
    public void moduleCreated(@NotNull Module module) {
      //noinspection AssignmentToStaticFieldFromInstanceMethod
      ourModule = module;
    }

    @Override
    public void sourceRootCreated(@NotNull VirtualFile sourceRoot) {
      //noinspection AssignmentToStaticFieldFromInstanceMethod
      ourSourceRoot = sourceRoot;
    }
  });

  // project creation may make a lot of pointers, do not regard them as leak
  ((VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance()).storePointers();
}
项目:consulo    文件:IdeaTestCase.java   
@Override
protected void setUp() throws Exception {
  super.setUp();
  VirtualFilePointerManagerImpl filePointerManager = (VirtualFilePointerManagerImpl)VirtualFilePointerManager.getInstance();
  filePointerManager.storePointers();
}