IDEA-119826 Do not require confirmation each time I open an IPR file

This commit is contained in:
peter
2014-01-24 18:41:31 +01:00
parent 9038ec4be1
commit 3d8a6d0969
2 changed files with 6 additions and 8 deletions
@@ -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