Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
de38d17b
Commit
de38d17b
authored
8 years ago
by
Sergey Ignatov
Browse files
Options
Download
Email Patches
Plain Diff
allow to override initial selection in open file action
parent
ae8773a2
Branches unavailable
Tags unavailable
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
platform/platform-impl/src/com/intellij/ide/actions/OpenFileAction.java
+6
-1
...orm-impl/src/com/intellij/ide/actions/OpenFileAction.java
with
6 additions
and
1 deletion
+6
-1
platform/platform-impl/src/com/intellij/ide/actions/OpenFileAction.java
+
6
-
1
View file @
de38d17b
...
...
@@ -56,7 +56,7 @@ public class OpenFileAction extends AnAction implements DumbAware {
final
FileChooserDescriptor
descriptor
=
showFiles
?
new
ProjectOrFileChooserDescriptor
()
:
new
ProjectOnlyFileChooserDescriptor
();
descriptor
.
putUserData
(
PathChooserDialog
.
PREFER_LAST_OVER_EXPLICIT
,
showFiles
);
FileChooser
.
chooseFiles
(
descriptor
,
project
,
VfsUtil
.
getUserHomeDir
(),
files
->
{
FileChooser
.
chooseFiles
(
descriptor
,
project
,
getPathToSelect
(),
files
->
{
for
(
VirtualFile
file
:
files
)
{
if
(!
descriptor
.
isFileSelectable
(
file
))
{
String
message
=
IdeBundle
.
message
(
"error.dir.contains.no.project"
,
file
.
getPresentableUrl
());
...
...
@@ -68,6 +68,11 @@ public class OpenFileAction extends AnAction implements DumbAware {
});
}
@Nullable
protected
VirtualFile
getPathToSelect
()
{
return
VfsUtil
.
getUserHomeDir
();
}
@Override
public
void
update
(
@NotNull
AnActionEvent
e
)
{
if
(
NewWelcomeScreen
.
isNewWelcomeScreen
(
e
))
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help