mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
minor
This commit is contained in:
+1
-1
@@ -112,7 +112,7 @@ public class FileChooserDescriptor implements Cloneable {
|
||||
* If true, the user will be able to choose multiple files.
|
||||
*/
|
||||
public final boolean getChooseMultiple() {
|
||||
return myChooseMultiple;
|
||||
return isChooseMultiple();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -139,8 +139,10 @@ public class FileTypeChooser extends DialogWrapper {
|
||||
* @return Known file type or null. Never returns {@link com.intellij.openapi.fileTypes.FileTypes#UNKNOWN}.
|
||||
*/
|
||||
@Nullable
|
||||
public static FileType getKnownFileTypeOrAssociate(@NotNull VirtualFile file, @NotNull Project project) {
|
||||
((PsiManagerEx)PsiManager.getInstance(project)).getFileManager().findFile(file); // autodetect text file if needed
|
||||
public static FileType getKnownFileTypeOrAssociate(@NotNull VirtualFile file, @Nullable Project project) {
|
||||
if (project != null) {
|
||||
((PsiManagerEx)PsiManager.getInstance(project)).getFileManager().findFile(file); // autodetect text file if needed
|
||||
}
|
||||
FileType type = file.getFileType();
|
||||
if (type == FileTypes.UNKNOWN) {
|
||||
type = getKnownFileTypeOrAssociate(file.getName());
|
||||
|
||||
Reference in New Issue
Block a user