mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] remove unnecessary findLogUi method
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user