Move: Suggest creating Kotlin file if it doesn't exist
#KT-5379 Fixed
This commit is contained in:
@@ -42,4 +42,6 @@ package.private.0.will.no.longer.be.accessible.from.1=Package-private {0} will n
|
||||
0.will.become.invisible.after.extraction={0} will become invisible after extraction
|
||||
setter.of.0.will.become.invisible.after.extraction = Setter of {0} will become invisible after extraction
|
||||
|
||||
naming.convention.will.be.violated.after.rename=Naming conventions will be violated after rename
|
||||
naming.convention.will.be.violated.after.rename=Naming conventions will be violated after rename
|
||||
|
||||
file.does.not.exist=File {0} does not exist.\nDo you want to create it?
|
||||
+8
@@ -297,6 +297,14 @@ public class MoveKotlinTopLevelDeclarationsDialog extends RefactoringDialog {
|
||||
JetFile jetFile = (JetFile) RefactoringPackage.toPsiFile(targetFile, myProject);
|
||||
if (jetFile != null) return new JetFileKotlinMoveTarget(jetFile);
|
||||
|
||||
int ret = Messages.showYesNoDialog(
|
||||
myProject,
|
||||
JetRefactoringBundle.message("file.does.not.exist", targetFile.getName()),
|
||||
RefactoringBundle.message("move.title"),
|
||||
Messages.getQuestionIcon()
|
||||
);
|
||||
if (ret != Messages.YES) return null;
|
||||
|
||||
File targetDir = targetFile.getParentFile();
|
||||
final PsiDirectory psiDirectory = RefactoringPackage.toPsiDirectory(targetDir, myProject);
|
||||
assert psiDirectory != null : "No directory found: " + targetDir.getPath();
|
||||
|
||||
Reference in New Issue
Block a user