VcsCommittedViewAuxiliary (@NotNull DecoratorManager manager, @Nullable RepositoryLocation location) { AnAction copyHashAction = new DumbAwareAction( HgBundle.messagePointer("action.DumbAware.HgCommittedChangesProvider.text.copy.hash"), HgBundle.messagePointer("action.DumbAware.HgCommittedChangesProvider.description.copy.hash.to.clipboard"), PlatformIcons.COPY_ICON) { @Override public void actionPerformed(@NotNull 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), () -> { }, Collections.singletonList(copyHashAction)); }