diff --git a/platform/platform-impl/src/com/intellij/ide/actions/OpenFileAction.java b/platform/platform-impl/src/com/intellij/ide/actions/OpenFileAction.java index b6e4471ea596..5f335bea9770 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/OpenFileAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/OpenFileAction.java @@ -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; } } diff --git a/platform/platform-resources-en/src/messages/IdeBundle.properties b/platform/platform-resources-en/src/messages/IdeBundle.properties index f8c0cfec7b12..0d02c72ea6a9 100644 --- a/platform/platform-resources-en/src/messages/IdeBundle.properties +++ b/platform/platform-resources-en/src/messages/IdeBundle.properties @@ -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