Create from Usage: Do not delete temporary file as this operation is not supported by IDEA anymore
This commit is contained in:
committed by
Nikolay Krasko
parent
8e51f1aadd
commit
73b2de95ab
+3
-11
@@ -216,7 +216,7 @@ class CallableBuilder(val config: CallableBuilderConfiguration) {
|
||||
val receiverTypeCandidate: TypeCandidate?
|
||||
val mandatoryTypeParametersAsCandidates: List<TypeCandidate>
|
||||
val substitutions: List<JetTypeSubstitution>
|
||||
var released: Boolean = false
|
||||
var finished: Boolean = false
|
||||
|
||||
init {
|
||||
// gather relevant information
|
||||
@@ -1041,7 +1041,7 @@ class CallableBuilder(val config: CallableBuilderConfiguration) {
|
||||
}
|
||||
}
|
||||
finally {
|
||||
release()
|
||||
finished = true
|
||||
onFinish()
|
||||
}
|
||||
}
|
||||
@@ -1057,18 +1057,10 @@ class CallableBuilder(val config: CallableBuilderConfiguration) {
|
||||
}
|
||||
|
||||
fun showDialogIfNeeded() {
|
||||
if (!ApplicationManager.getApplication().isUnitTestMode() && dialogWithEditor != null && !released) {
|
||||
if (!ApplicationManager.getApplication().isUnitTestMode() && dialogWithEditor != null && !finished) {
|
||||
dialogWithEditor.show()
|
||||
}
|
||||
}
|
||||
|
||||
private fun release() {
|
||||
if (released) return
|
||||
dialogWithEditor?.let {
|
||||
jetFileToEdit.delete()
|
||||
released = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user