vcs: cleanup - remove dead code

The only usage was removed in 7cafb3a2cc907e845718be436345935de7d7e8a6

GitOrigin-RevId: 4e5984315e940aad137a78fbb46f064788f05c12
This commit is contained in:
Aleksey Pivovarov
2019-10-13 12:02:20 +00:00
committed by intellij-monorepo-bot
parent 0533514415
commit 42ff943a02
6 changed files with 4 additions and 31 deletions
@@ -95,10 +95,6 @@ public abstract class ChangeViewDiffRequestProcessor extends CacheDiffRequestPro
return isRequestValid(request) ? request : null;
}
protected boolean hasSelection() {
return true;
}
private static boolean isRequestValid(@Nullable DiffRequest request) {
if (request instanceof ErrorDiffRequest) return false;
if (request instanceof ContentDiffRequest) {
@@ -28,10 +28,6 @@ private class ChangesViewDiffPreviewProcessor(private val changesView: ChangesLi
override fun getAllChanges(): List<Wrapper> = wrap(changesView.changes, changesView.unversionedFiles)
override fun hasSelection(): Boolean {
return !changesView.isSelectionEmpty
}
override fun selectChange(change: Wrapper) {
changesView.findNodePathInTree(change.userObject)?.let { TreeUtil.selectPath(changesView, it, false) }
}
@@ -7,7 +7,10 @@ import com.intellij.openapi.util.Comparing
import com.intellij.openapi.util.Disposer
import com.intellij.openapi.util.Key
import com.intellij.openapi.wm.ToolWindowId
import com.intellij.ui.content.*
import com.intellij.ui.content.Content
import com.intellij.ui.content.ContentManager
import com.intellij.ui.content.ContentManagerAdapter
import com.intellij.ui.content.ContentManagerEvent
import com.intellij.util.ObjectUtils
import com.intellij.util.containers.ContainerUtil
import java.util.*
@@ -72,13 +75,6 @@ class ChangesViewContentManager : ChangesViewContentI, Disposable {
contentManager.setSelectedContent(content, requestFocus)
}
fun adviseSelectionChanged(listener: ContentManagerListener) {
contentManager?.let {
it.addContentManagerListener(listener)
Disposer.register(this, Disposable { it.removeContentManagerListener(listener) })
}
}
override fun <T> getActiveComponent(aClass: Class<T>): T? {
val selectedContent = contentManager?.selectedContent ?: return null
return ObjectUtils.tryCast(selectedContent.component, aClass)
@@ -796,12 +796,6 @@ public abstract class CommitChangeListDialog extends DialogWrapper implements Si
getBrowser().selectEntries(singletonList(change.getUserObject()));
}
@Override
protected boolean hasSelection() {
CommitDialogChangesBrowser browser = getBrowser();
return !browser.getSelectedChanges().isEmpty() || !browser.getSelectedUnversionedFiles().isEmpty();
}
@NotNull
private List<Wrapper> wrap(@NotNull Collection<? extends Change> changes, @NotNull Collection<? extends VirtualFile> unversioned) {
return concat(map(changes, ChangeWrapper::new),
@@ -21,10 +21,6 @@ internal class FileHistoryDiffPreview(project: Project, private val changeGetter
Disposer.register(disposable, this)
}
override fun hasSelection(): Boolean {
return true
}
override fun getSelectedChanges(): List<Wrapper> = allChanges
override fun getAllChanges(): List<Wrapper> {
@@ -65,11 +65,6 @@ class VcsLogChangeProcessor extends ChangeViewDiffRequestProcessor {
}
}
@Override
protected boolean hasSelection() {
return myBrowser.getViewer().getSelectionModel().getSelectionCount() != 0;
}
private void updatePreviewLater() {
ApplicationManager.getApplication().invokeLater(() -> updatePreview(getComponent().isShowing()));
}