[vcs-log] remove unnecessary findLogUi method

This commit is contained in:
Julia Beliaeva
2017-08-09 00:05:12 +03:00
parent 98eaea83ec
commit f701aaad1a
@@ -65,8 +65,9 @@ public class GitShowCommitInLogAction extends DumbAwareAction {
return;
}
boolean logReady = findLogUi(project) != null;
VcsProjectLog projectLog = VcsProjectLog.getInstance(project);
boolean logReady = projectLog.getMainLogUi() != null;
ToolWindow window = ToolWindowManager.getInstance(project).getToolWindow(ChangesViewContentManager.TOOLWINDOW_ID);
ContentManager cm = window.getContentManager();
Content[] contents = cm.getContents();
@@ -77,7 +78,7 @@ public class GitShowCommitInLogAction extends DumbAwareAction {
}
}
VcsLogUiImpl logUi = findLogUi(project);
VcsLogUiImpl logUi = projectLog.getMainLogUi();
if (logUi == null) {
showLogNotReadyMessage(project);
return;
@@ -133,15 +134,6 @@ public class GitShowCommitInLogAction extends DumbAwareAction {
Comparing.equal(getVcsKey(e), GitVcs.getKey()));
}
@Nullable
private static VcsLogUiImpl findLogUi(@NotNull Project project) {
VcsProjectLog projectLog = VcsProjectLog.getInstance(project);
if (projectLog != null) {
return projectLog.getMainLogUi();
}
return null;
}
private static void jumpToRevisionUnderProgress(@NotNull Project project,
@NotNull VcsLogUiImpl logUi,
@NotNull VcsRevisionNumber revision) {