diff options
author | Tor Norbye <tnorbye@google.com> | 2014-09-18 11:43:07 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2014-09-18 11:43:28 -0700 |
commit | e782c57d74000722f9db4c9426317410520670c6 (patch) | |
tree | 6e5d3e8934107ffabb7661f8bfc0e1a08eb37faf /platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.java | |
parent | c3d3a90f6b4ead083d63e28e6b9fcea93d675678 (diff) | |
download | idea-e782c57d74000722f9db4c9426317410520670c6.tar.gz |
Snapshot idea/138.2210 from git://git.jetbrains.org/idea/community.git
Change-Id: I8f0204d7887ee78cf1fd8c09f936c5afff0edd2f
Diffstat (limited to 'platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.java')
-rw-r--r-- | platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.java b/platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.java index 1a6bffbcd297..7991c3af0104 100644 --- a/platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.java +++ b/platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.java @@ -86,6 +86,7 @@ public abstract class RecentProjectsManagerBase implements ProjectManagerListene messageBus.connect().subscribe(AppLifecycleListener.TOPIC, new MyAppLifecycleListener()); } + @Override public State getState() { synchronized (myStateLock) { myState.validateRecentProjects(); @@ -93,6 +94,7 @@ public abstract class RecentProjectsManagerBase implements ProjectManagerListene } } + @Override public void loadState(final State state) { synchronized (myStateLock) { myState = state; @@ -212,7 +214,7 @@ public abstract class RecentProjectsManagerBase implements ProjectManagerListene if (addClearListItem) { AnAction clearListAction = new DumbAwareAction(IdeBundle.message("action.clear.list")) { @Override - public void actionPerformed(AnActionEvent e) { + public void actionPerformed(@NotNull AnActionEvent e) { String message = IdeBundle.message("action.clear.list.message"); String title = IdeBundle.message("action.clear.list.title"); if (Messages.showOkCancelDialog(e.getProject(), message, title, Messages.getQuestionIcon()) == Messages.OK) { @@ -249,6 +251,7 @@ public abstract class RecentProjectsManagerBase implements ProjectManagerListene return file.exists() && (!file.isDirectory() || new File(file, Project.DIRECTORY_STORE_FOLDER).exists()); } + @Override public void projectOpened(final Project project) { String path = getProjectPath(project); if (path != null) { @@ -269,6 +272,7 @@ public abstract class RecentProjectsManagerBase implements ProjectManagerListene } } + @Override public void projectClosed(final Project project) { Project[] openProjects = ProjectManager.getInstance().getOpenProjects(); if (openProjects.length > 0) { @@ -347,6 +351,7 @@ public abstract class RecentProjectsManagerBase implements ProjectManagerListene } private class MyAppLifecycleListener extends AppLifecycleListener.Adapter { + @Override public void appFrameCreated(final String[] commandLineArgs, @NotNull final Ref<Boolean> willOpenProject) { if (!ApplicationManager.getApplication().isHeadlessEnvironment()) { ProjectManager.getInstance().addProjectManagerListener(RecentProjectsManagerBase.this); @@ -356,19 +361,23 @@ public abstract class RecentProjectsManagerBase implements ProjectManagerListene } } + @Override public void appStarting(Project projectFromCommandLine) { if (projectFromCommandLine != null) return; doReopenLastProject(); } + @Override public void projectFrameClosed() { updateLastProjectPath(); } + @Override public void projectOpenFailed() { updateLastProjectPath(); } + @Override public void appClosing() { updateLastProjectPath(); } |