use of com.intellij.openapi.vcs.changes.committed.VcsCommittedViewAuxiliary in project intellij-community by JetBrains.
the class HgCachingCommittedChangesProvider method createActions.
public VcsCommittedViewAuxiliary createActions(DecoratorManager decoratorManager, RepositoryLocation repositoryLocation) {
AnAction copyHashAction = new AnAction("Copy &Hash", "Copy hash to clipboard", PlatformIcons.COPY_ICON) {
@Override
public void actionPerformed(AnActionEvent e) {
ChangeList[] changeLists = e.getData(VcsDataKeys.CHANGE_LISTS);
if (changeLists != null && changeLists[0] instanceof HgCommittedChangeList) {
HgRevisionNumber revisionNumber = ((HgCommittedChangeList) changeLists[0]).getRevisionNumber();
CopyPasteManager.getInstance().setContents(new StringSelection(revisionNumber.getChangeset()));
}
}
};
return new VcsCommittedViewAuxiliary(Collections.singletonList(copyHashAction), new Runnable() {
public void run() {
}
}, Collections.singletonList(copyHashAction));
}
use of com.intellij.openapi.vcs.changes.committed.VcsCommittedViewAuxiliary in project intellij-community by JetBrains.
the class SvnCommittedChangesProvider method createActions.
@Override
@NotNull
public VcsCommittedViewAuxiliary createActions(@NotNull DecoratorManager manager, @Nullable RepositoryLocation location) {
RootsAndBranches rootsAndBranches = new RootsAndBranches(myVcs, manager, location);
refreshMergeInfo(rootsAndBranches);
DefaultActionGroup popup = new DefaultActionGroup(myVcs.getDisplayName(), true);
popup.add(rootsAndBranches.getIntegrateAction());
popup.add(rootsAndBranches.getUndoIntegrateAction());
popup.add(new ConfigureBranchesAction());
ShowHideMergePanelAction action = new ShowHideMergePanelAction(manager, rootsAndBranches.getStrategy());
return new VcsCommittedViewAuxiliary(singletonList(popup), () -> {
if (myMergeInfoUpdatesListener != null) {
myMergeInfoUpdatesListener.removePanel(rootsAndBranches);
rootsAndBranches.dispose();
}
}, singletonList(action));
}
Aggregations