mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-119826 Do not require confirmation each time I open an IPR file
This commit is contained in:
@@ -118,13 +118,12 @@ public class OpenFileAction extends AnAction implements DumbAware {
|
||||
return;
|
||||
}
|
||||
|
||||
if (OpenProjectFileChooserDescriptor.isProjectFile(file)) {
|
||||
int answer = Messages.showYesNoDialog(project,
|
||||
IdeBundle.message("message.open.file.is.project", file.getName()),
|
||||
IdeBundle.message("title.open.project"),
|
||||
Messages.getQuestionIcon());
|
||||
if (answer == Messages.YES) {
|
||||
FileChooserUtil.setLastOpenedFile(ProjectUtil.openOrImport(file.getPath(), project, false), file);
|
||||
if (OpenProjectFileChooserDescriptor.isProjectFile(file) &&
|
||||
// if the ipr-based project is already open, just open the ipr file
|
||||
(project == null || file != project.getProjectFile())) {
|
||||
Project openedProject = ProjectUtil.openOrImport(file.getPath(), project, false);
|
||||
if (openedProject != null) {
|
||||
FileChooserUtil.setLastOpenedFile(openedProject, file);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,7 +399,6 @@ title.popup.new.element=New
|
||||
title.popup.new.element.same.place=New in Current Directory
|
||||
command.go.to.next.split=Go to next split
|
||||
message.occurrence.N.of.M=Occurrence {0} of {1}
|
||||
message.open.file.is.project={0} is a project file.\nWould you like to open this project?
|
||||
error.files.of.this.type.cannot.be.opened=Files of this type cannot be opened in {0}
|
||||
title.cannot.open.file=Cannot Open File
|
||||
filter.all.file.types=All file types
|
||||
|
||||
Reference in New Issue
Block a user