mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
allow to turn off suggestion to create a file when creating a directory with file-like name (IDEA-118250)
This commit is contained in:
+2
-1
@@ -28,6 +28,7 @@ import com.intellij.openapi.fileTypes.UnknownFileType;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.InputValidatorEx;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiDirectory;
|
||||
import com.intellij.psi.PsiFileSystemItem;
|
||||
@@ -104,7 +105,7 @@ public class CreateDirectoryOrPackageHandler implements InputValidatorEx {
|
||||
}
|
||||
|
||||
boolean createFile = false;
|
||||
if (StringUtil.countChars(subDirName, '.') == 1) {
|
||||
if (StringUtil.countChars(subDirName, '.') == 1 && Registry.is("ide.suggest.file.when.creating.filename.like.directory")) {
|
||||
FileType fileType = findFileTypeBoundToName(subDirName);
|
||||
if (fileType != null) {
|
||||
String message = "The name you entered looks like a file name. Do you want to create a file named " + subDirName + " instead?";
|
||||
|
||||
@@ -202,6 +202,9 @@ psi.incremental.reparse.depth.limit=1000
|
||||
psi.deferIconLoading=true
|
||||
psi.track.invalidation=true
|
||||
|
||||
ide.suggest.file.when.creating.filename.like.directory=true
|
||||
ide.suggest.file.when.creating.filename.like.directory.description=When creating a directory named foo.txt, suggest to create a file with such a name instead
|
||||
|
||||
find.search.in.project.files=false
|
||||
|
||||
structureView.coalesceTime=500
|
||||
|
||||
Reference in New Issue
Block a user