mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-123959 cannot create a new file
This commit is contained in:
@@ -170,7 +170,12 @@ public class CreateFileAction extends CreateElementActionBase implements DumbAwa
|
||||
|
||||
final PsiDirectory psiDirectory = getDirectory();
|
||||
|
||||
final FileType type = FileTypeChooser.getKnownFileTypeOrAssociate(new FakeVirtualFile(psiDirectory.getVirtualFile(), getFileName(inputString)),
|
||||
final FileType type = FileTypeChooser.getKnownFileTypeOrAssociate(new FakeVirtualFile(psiDirectory.getVirtualFile(), getFileName(inputString)) {
|
||||
@Override
|
||||
public boolean isDirectory() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
psiDirectory.getProject());
|
||||
return type != null && super.canClose(getFileName(inputString));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user