201: ProjectManagerEx.forceCloseProject(project, true) - no second parameter
This commit is contained in:
committed by
Nikolay Krasko
parent
41ca51cb9e
commit
2cc4d878a8
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.idea.testFramework
|
||||||
|
|
||||||
|
import com.intellij.openapi.project.Project
|
||||||
|
import com.intellij.openapi.project.ex.ProjectManagerEx
|
||||||
|
|
||||||
|
// BUNCH: 193
|
||||||
|
fun ProjectManagerEx.forceCloseProjectEx(project: Project, dispose: Boolean): Boolean {
|
||||||
|
if (!dispose) error("dispose should be true")
|
||||||
|
return this.forceCloseProject(project, true)
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.idea.testFramework
|
||||||
|
|
||||||
|
import com.intellij.openapi.project.Project
|
||||||
|
import com.intellij.openapi.project.ex.ProjectManagerEx
|
||||||
|
|
||||||
|
// BUNCH: 193
|
||||||
|
fun ProjectManagerEx.forceCloseProjectEx(project: Project, dispose: Boolean): Boolean {
|
||||||
|
if (!dispose) error("dispose should be true")
|
||||||
|
return this.forceCloseProject(project)
|
||||||
|
}
|
||||||
@@ -22,9 +22,9 @@ import com.intellij.testFramework.ExtensionTestUtil
|
|||||||
import com.intellij.testFramework.runInEdtAndWait
|
import com.intellij.testFramework.runInEdtAndWait
|
||||||
import com.intellij.util.ui.UIUtil
|
import com.intellij.util.ui.UIUtil
|
||||||
import org.jetbrains.kotlin.idea.parameterInfo.HintType
|
import org.jetbrains.kotlin.idea.parameterInfo.HintType
|
||||||
import java.nio.file.Paths
|
|
||||||
import java.io.PrintWriter
|
import java.io.PrintWriter
|
||||||
import java.io.StringWriter
|
import java.io.StringWriter
|
||||||
|
import java.nio.file.Paths
|
||||||
|
|
||||||
fun commitAllDocuments() {
|
fun commitAllDocuments() {
|
||||||
val fileDocumentManager = FileDocumentManager.getInstance()
|
val fileDocumentManager = FileDocumentManager.getInstance()
|
||||||
@@ -72,7 +72,7 @@ fun loadProjectWithName(path: String, name: String): Project? =
|
|||||||
fun closeProject(project: Project) {
|
fun closeProject(project: Project) {
|
||||||
dispatchAllInvocationEvents()
|
dispatchAllInvocationEvents()
|
||||||
val projectManagerEx = ProjectManagerEx.getInstanceEx()
|
val projectManagerEx = ProjectManagerEx.getInstanceEx()
|
||||||
projectManagerEx.forceCloseProject(project, true)
|
projectManagerEx.forceCloseProjectEx(project, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun runStartupActivities(project: Project) {
|
fun runStartupActivities(project: Project) {
|
||||||
|
|||||||
+1
-1
@@ -76,7 +76,7 @@ fun loadProjectWithName(path: String, name: String): Project? =
|
|||||||
fun closeProject(project: Project) {
|
fun closeProject(project: Project) {
|
||||||
dispatchAllInvocationEvents()
|
dispatchAllInvocationEvents()
|
||||||
val projectManagerEx = ProjectManagerEx.getInstanceEx()
|
val projectManagerEx = ProjectManagerEx.getInstanceEx()
|
||||||
projectManagerEx.forceCloseProject(project, true)
|
projectManagerEx.forceCloseProjectEx(project, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun runStartupActivities(project: Project) {
|
fun runStartupActivities(project: Project) {
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@ fun loadProjectWithName(path: String, name: String): Project? =
|
|||||||
fun closeProject(project: Project) {
|
fun closeProject(project: Project) {
|
||||||
dispatchAllInvocationEvents()
|
dispatchAllInvocationEvents()
|
||||||
val projectManagerEx = ProjectManagerEx.getInstanceEx()
|
val projectManagerEx = ProjectManagerEx.getInstanceEx()
|
||||||
projectManagerEx.forceCloseProject(project, true)
|
projectManagerEx.forceCloseProjectEx(project, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun runStartupActivities(project: Project) {
|
fun runStartupActivities(project: Project) {
|
||||||
|
|||||||
Reference in New Issue
Block a user