@Override protected ActionGroup createActionGroup() { DefaultActionGroup group = new DefaultActionGroup(); group.add(createAllAction()); group.add(createSelectMultipleValuesAction()); if (!myLogData.getCurrentUser().isEmpty()) { group.add(createPredefinedValueAction(Collections.singleton(VcsLogUserFilterImpl.ME))); } group.addAll(createRecentItemsActionGroup()); return group; }
@NotNull @Override protected List<String> getAllValues() { return ContainerUtil.map( myLogData.getAllUsers(), user -> { String shortPresentation = VcsUserUtil.getShortPresentation(user); Couple<String> firstAndLastName = VcsUserUtil.getFirstAndLastName(shortPresentation); if (firstAndLastName == null) return shortPresentation; return VcsUserUtil.capitalizeName(firstAndLastName.first) + " " + VcsUserUtil.capitalizeName(firstAndLastName.second); }); }
@NotNull @Override protected VcsLogUserFilter createFilter(@NotNull Collection<String> values) { return new VcsLogUserFilterImpl(values, myLogData.getCurrentUser(), myLogData.getAllUsers()); }