List of usage examples for com.intellij.openapi.ui TestDialog DEFAULT
TestDialog DEFAULT
To view the source code for com.intellij.openapi.ui TestDialog DEFAULT.
Click Source Link
From source file:com.android.tools.idea.testing.AndroidGradleTestCase.java
License:Apache License
@Override protected void tearDown() throws Exception { try {//w ww . j a va 2 s.c om Messages.setTestDialog(TestDialog.DEFAULT); if (myFixture != null) { try { Project project = myFixture.getProject(); // Since we don't really open the project, but we manually register listeners in the gradle importer // by explicitly calling AndroidGradleProjectComponent#configureGradleProject, we need to counteract // that here, otherwise the testsuite will leak if (AndroidProjectInfo.getInstance(project).requiresAndroidModel()) { AndroidGradleProjectComponent projectComponent = AndroidGradleProjectComponent .getInstance(project); projectComponent.projectClosed(); } } finally { try { myFixture.tearDown(); } catch (Exception e) { LOG.warn("Failed to tear down " + myFixture.getClass().getSimpleName(), e); } myFixture = null; } } GradleProjectImporter.ourSkipSetupFromTest = false; ProjectManagerEx projectManager = ProjectManagerEx.getInstanceEx(); Project[] openProjects = projectManager.getOpenProjects(); if (openProjects.length > 0) { PlatformTestCase.closeAndDisposeProjectAndCheckThatNoOpenProjects(openProjects[0]); } } finally { try { assertEquals(0, ProjectManager.getInstance().getOpenProjects().length); } finally { //noinspection ThrowFromFinallyBlock super.tearDown(); } } }
From source file:com.hp.alm.ali.idea.IntellijTest.java
License:Apache License
@After public void done() throws Throwable { testApplication.waitForBackgroundActivityToFinish(); if (handler != null) { handler.finish();/* w ww.j a va 2 s . co m*/ } Assert.assertTrue("Unhandled messages: " + testMessages.asString(), testMessages.isEmpty()); Messages.setTestDialog(TestDialog.DEFAULT); List<Exception> ex = errorService._shiftErrors(); Assert.assertTrue("Unhandled exceptions: " + ex.toString(), ex.isEmpty()); for (EntityListener listener : entityListeners) { entityService.removeEntityListener(listener); } getComponent(DetailUtil.class)._restore(); if (isIsolated()) { handler.getServer().stop(); } }
From source file:com.twitter.intellij.pants.testFramework.PantsIntegrationTestCase.java
License:Apache License
@Override public void tearDown() throws Exception { // TODO thread leak either a IJ bug https://youtrack.jetbrains.com/issue/IDEA-155496 // or a pants plugin bug https://github.com/pantsbuild/intellij-pants-plugin/issues/130 // Temporarily ignore the following 'leaking' threads to pass CI. ThreadTracker.longRunningThreadCreated(ApplicationManager.getApplication(), "BaseDataReader", "ProcessWaitFor", "Timer"); try {/* w w w .j av a2 s . c o m*/ if (myCompilerTester != null) { myCompilerTester.tearDown(); } // Kill nailgun after usage as memory on travis is limited, at a cost of slower later builds. killNailgun(); cleanProjectRoot(); Messages.setTestDialog(TestDialog.DEFAULT); } finally { super.tearDown(); // double check. if (myProject != null && !myProject.isDisposed()) { Disposer.dispose(myProject); } } }
From source file:org.jetbrains.idea.maven.MavenImportingTestCase.java
License:Apache License
@Override protected void tearDown() throws Exception { Messages.setTestDialog(TestDialog.DEFAULT); myProjectsManager.dispose();// ww w . j a v a 2 s.co m removeFromLocalRepository("test"); super.tearDown(); }
From source file:org.jetbrains.kotlin.idea.codeInsight.gradle.GradleImportingTestCase.java
License:Apache License
@Override public void tearDown() throws Exception { if (myJdkHome == null) { //super.setUp() wasn't called return;/*from w w w. j a va 2 s. com*/ } try { new WriteAction() { @Override protected void run(@NotNull Result result) throws Throwable { Sdk old = ProjectJdkTable.getInstance().findJdk(GRADLE_JDK_NAME); if (old != null) { SdkConfigurationUtil.removeSdk(old); } } }.execute(); Messages.setTestDialog(TestDialog.DEFAULT); FileUtil.delete(BuildManager.getInstance().getBuildSystemDirectory()); } finally { super.tearDown(); } }
From source file:org.jetbrains.kotlin.idea.maven.MavenImportingTestCase.java
License:Apache License
@Override protected void tearDown() throws Exception { try {/*from w w w . j a v a2 s. c om*/ if (myGlobalSettingsFile != null) { VfsRootAccess.disallowRootAccess(myGlobalSettingsFile.getAbsolutePath()); } VfsRootAccess.disallowRootAccess(PathManager.getConfigPath()); Messages.setTestDialog(TestDialog.DEFAULT); removeFromLocalRepository("test"); FileUtil.delete(BuildManager.getInstance().getBuildSystemDirectory()); } finally { super.tearDown(); } }