Search in sources :

Example 1 with CommittedChangesFilterDialog

use of com.intellij.openapi.vcs.changes.committed.CommittedChangesFilterDialog in project intellij-community by JetBrains.

the class BrowseChangesAction method actionPerformed.

public void actionPerformed(@NotNull AnActionEvent e) {
    Project project = e.getRequiredData(CommonDataKeys.PROJECT);
    VirtualFile file = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE);
    AbstractVcs vcs = notNull(getVcsForFile(file, project));
    CommittedChangesProvider provider = notNull(vcs.getCommittedChangesProvider());
    ChangeBrowserSettings settings = vcs.getConfiguration().CHANGE_BROWSER_SETTINGS.computeIfAbsent(vcs.getName(), key -> provider.createDefaultSettings());
    CommittedChangesFilterDialog dialog = new CommittedChangesFilterDialog(project, provider.createFilterUI(true), settings);
    if (dialog.showAndGet()) {
        showChanges(vcs, file, settings);
    }
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) Project(com.intellij.openapi.project.Project) ChangeBrowserSettings(com.intellij.openapi.vcs.versionBrowser.ChangeBrowserSettings) CommittedChangesFilterDialog(com.intellij.openapi.vcs.changes.committed.CommittedChangesFilterDialog) CommittedChangesProvider(com.intellij.openapi.vcs.CommittedChangesProvider) AbstractVcs(com.intellij.openapi.vcs.AbstractVcs)

Aggregations

Project (com.intellij.openapi.project.Project)1 AbstractVcs (com.intellij.openapi.vcs.AbstractVcs)1 CommittedChangesProvider (com.intellij.openapi.vcs.CommittedChangesProvider)1 CommittedChangesFilterDialog (com.intellij.openapi.vcs.changes.committed.CommittedChangesFilterDialog)1 ChangeBrowserSettings (com.intellij.openapi.vcs.versionBrowser.ChangeBrowserSettings)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1