You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val ioFile =File(javaFile.getPath().replace('/', File.separatorChar))
51
+
52
+
var i =0
53
+
while (true) {
54
+
val fileName = javaFile.getNameWithoutExtension() + (if (i >0) i else"") +".kt"
55
+
if (!ioFile.resolveSibling(fileName).exists()) return fileName
56
+
i++
57
+
}
56
58
}
57
59
58
-
val title ="Convert Java to Kotlin"
59
-
if (!ProgressManager.getInstance().runProcessWithProgressSynchronously(
60
-
{
61
-
runReadAction(::convert)
62
-
},
63
-
title,
64
-
true,
65
-
project)) return
66
-
67
-
68
-
var externalCodeUpdate: (() ->Unit)?=null
69
-
70
-
if (converterResult!!.externalCodeProcessing !=null) {
71
-
val question ="Some code in the rest of your project may require corrections after performing this conversion. Do you want to find such code and correct it too?"
72
-
if (Messages.showOkCancelDialog(project, question, title, Messages.getQuestionIcon()) ==Messages.OK) {
if (!ProgressManager.getInstance().runProcessWithProgressSynchronously(
88
+
{
89
+
runReadAction(::convert)
90
+
},
91
+
title,
92
+
true,
93
+
project)) return emptyList()
94
+
95
+
96
+
var externalCodeUpdate: (() ->Unit)?=null
97
+
98
+
if (enableExternalCodeProcessing && converterResult!!.externalCodeProcessing !=null) {
99
+
val question ="Some code in the rest of your project may require corrections after performing this conversion. Do you want to find such code and correct it too?"
100
+
if (Messages.showOkCancelDialog(project, question, title, Messages.getQuestionIcon()) ==Messages.OK) {
0 commit comments