Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
275,300 | void (@NotNull AnActionEvent e) { VcsLogUsageTriggerCollector.triggerUsage(e, this); Change[] changes = e.getRequiredData(VcsDataKeys.CHANGES); String commitMessage = e.getData(VcsDataKeys.PRESET_COMMIT_MESSAGE); CreatePatchFromChangesAction.createPatch(e.getProject(), commitMessage, Arrays.asList(changes), mySilentClipboard); } | actionPerformed |
275,301 | void (@NotNull AnActionEvent e) { super.update(e); VcsLogUi ui = e.getData(VcsLogDataKeys.VCS_LOG_UI); if (ui != null && ui.getDataPack().isEmpty()) e.getPresentation().setEnabled(false); } | update |
275,302 | void () { if (myFuture == null) { String refText = StringUtil.trim(getText(), CharFilter.NOT_WHITESPACE_FILTER); final Future<?> future = ((mySelectedRef == null || (!mySelectedRef.getName().equals(refText))) ? myOnSelectedHash.fun(refText) : myOnSelectedRef.fun(mySelectedRef)); myFuture = future; showProgress(); ApplicationManager.getApplication().executeOnPooledThread(() -> { try { future.get(); okPopup(); } catch (CancellationException | InterruptedException ex) { cancelPopup(); } catch (ExecutionException ex) { LOG.error(ex); cancelPopup(); } }); } } | onOk |
275,303 | void (@NotNull LightweightWindowEvent event) { if (!event.isOk()) { if (myFuture != null) { myFuture.cancel(true); } } myFuture = null; myTextField.hideProgress(); } | onClosed |
275,304 | void () { ApplicationManager.getApplication().invokeLater(() -> myPopup.cancel()); } | cancelPopup |
275,305 | void () { ApplicationManager.getApplication().invokeLater(() -> myPopup.closeOk(null)); } | okPopup |
275,306 | void (@NotNull JComponent anchor) { myPopup.showInCenterOf(anchor); } | show |
275,307 | LookupElementBuilder (@NotNull VcsRef item) { LookupElementBuilder lookupBuilder = super.createLookupBuilder(item); if (myColorManager.hasMultiplePaths()) { ColorIcon icon = RootIcon.createAndScale(myColorManager.getRootColor(item.getRoot())); lookupBuilder = lookupBuilder.withTypeText(getTypeText(item), icon, true).withTypeIconRightAligned(true); } return lookupBuilder; } | createLookupBuilder |
275,308 | String (@NotNull VcsRef item) { return item.getName(); } | getLookupString |
275,309 | int (VcsRef item1, VcsRef item2) { return myReferenceComparator.compare(item1, item2); } | compare |
275,310 | InsertHandler<LookupElement> (@NotNull VcsRef item) { return (context, item1) -> { mySelectedRef = (VcsRef)item1.getObject(); ApplicationManager.getApplication().invokeLater(() -> { // handleInsert is called in the middle of some other code that works with editor // (see CodeCompletionHandlerBase.insertItem) // for example, scrolls editor // problem is that in onOk we make text field not editable // by some reason this is done by disposing its editor and creating a new one // so editor gets disposed here and CodeCompletionHandlerBase can not finish doing whatever it is doing with it // I counter this by invoking onOk in invokeLater myTextField.onOk(); }); }; } | createInsertHandler |
275,311 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) { e.getPresentation().setEnabledAndVisible(false); return; } VcsProjectLog projectLog = VcsProjectLog.getInstance(project); VcsLogManager logManager = ObjectUtils.chooseNotNull(e.getData(VcsLogInternalDataKeys.LOG_MANAGER), projectLog.getLogManager()); if (logManager == null) { e.getPresentation().setEnabledAndVisible(false); return; } // only for main log (it is a question, how and where we want to open tabs for external logs) e.getPresentation().setEnabledAndVisible(projectLog.getLogManager() == logManager); String vcsName = VcsLogUtil.getVcsDisplayName(project, logManager); e.getPresentation().setText(getText(vcsName)); e.getPresentation().setDescription(getDescription(vcsName)); } | update |
275,312 | void (@NotNull AnActionEvent e) { VcsLogUsageTriggerCollector.triggerUsage(e, this); Project project = e.getRequiredData(CommonDataKeys.PROJECT); VcsLogUi logUi = e.getData(VcsLogDataKeys.VCS_LOG_UI); VcsLogFilterCollection filters; if (Registry.is("vcs.log.copy.filters.to.new.tab") && logUi != null) { filters = logUi.getFilterUi().getFilters(); } else { filters = VcsLogFilterObject.collection(); } VcsProjectLog.getInstance(project).openLogTab(filters, myLocation); } | actionPerformed |
275,313 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
275,314 | void (@NotNull AnActionEvent e) { super.update(e); if (!Registry.is("vcs.log.open.editor.tab")) { e.getPresentation().setEnabledAndVisible(false); } } | update |
275,315 | void (@NotNull AnActionEvent e) { super.update(e); VcsLogUiEx ui = e.getData(VcsLogInternalDataKeys.LOG_UI_EX); if (ui == null || !ui.getColorManager().hasMultiplePaths()) e.getPresentation().setEnabledAndVisible(false); } | update |
275,316 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); VcsLogUiEx ui = e.getData(VcsLogInternalDataKeys.LOG_UI_EX); if (project == null || ui == null) { e.getPresentation().setEnabledAndVisible(false); } else { e.getPresentation().setEnabledAndVisible(ui.getTable().getSelectedRowCount() == 1); } } | update |
275,317 | void (@NotNull AnActionEvent e) { VcsLogUsageTriggerCollector.triggerUsage(e, this); VcsLogGraphTable table = e.getRequiredData(VcsLogInternalDataKeys.LOG_UI_EX).getTable(); int row = table.getSelectedRow(); if (ScrollingUtil.isVisible(table, row)) { table.showTooltip(row, Commit.INSTANCE); } } | actionPerformed |
275,318 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
275,319 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
275,320 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
275,321 | void (@NotNull AnActionEvent e) { ListPopup popup = JBPopupFactory.getInstance().createActionGroupPopup(null, this, e.getDataContext(), JBPopupFactory.ActionSelectionAid.MNEMONICS, true, ActionPlaces.VCS_LOG_TOOLBAR_POPUP_PLACE); popup.setShowSubmenuOnHover(true); PopupUtil.showForActionButtonEvent(popup, e); } | actionPerformed |
275,322 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); VcsLogUi logUi = e.getData(VcsLogDataKeys.VCS_LOG_UI); e.getPresentation().setEnabledAndVisible(project != null && logUi != null); e.getPresentation().setPerformGroup(true); } | update |
275,323 | void (@NotNull AnActionEvent e) { Boolean hasAffectedFiles = e.getData(VcsLogChangesBrowser.HAS_AFFECTED_FILES); if (hasAffectedFiles == null || !hasAffectedFiles) { e.getPresentation().setEnabledAndVisible(false); return; } super.update(e); } | update |
275,324 | Stream<VcsRef> (@NotNull CompletionResultSet result, @NotNull Stream<VcsRef> stream) { Stream<VcsRef> matched = stream.filter(ref -> myRoots.contains(ref.getRoot()) && result.getPrefixMatcher().prefixMatches(ref.getName())); return filterRefs(matched); } | filterAndSort |
275,325 | Stream<VcsRef> (@NotNull Stream<VcsRef> vcsRefs) { return vcsRefs; } | filterRefs |
275,326 | GraphAction () { return ourGraphAction; } | getGraphAction |
275,327 | void (@NotNull MainVcsLogUi vcsLogUi) { String title = vcsLogUi.getProperties().get(MainVcsLogUiProperties.BEK_SORT_TYPE) == PermanentGraph.SortType.LinearBek ? VcsLogBundle.message("action.process.expanding.merges") : VcsLogBundle.message("action.process.expanding.linear.branches"); performLongAction(vcsLogUi, getGraphAction(), title); } | executeAction |
275,328 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
275,329 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); FileHistoryUi ui = e.getData(VcsLogInternalDataKeys.FILE_HISTORY_UI); if (project == null || ui == null) { e.getPresentation().setEnabledAndVisible(false); return; } e.getPresentation().setVisible(true); List<T> details = getSelection(ui); if (details.isEmpty()) { e.getPresentation().setEnabled(false); return; } T detail = getFirstItem(details); if (detail instanceof LoadingDetails) detail = null; e.getPresentation().setEnabled(details.size() == 1 && isEnabled(ui, detail, e)); } | update |
275,330 | boolean (@NotNull FileHistoryUi ui, @Nullable T detail, @NotNull AnActionEvent e) { return true; } | isEnabled |
275,331 | void (@NotNull AnActionEvent e) { VcsLogUsageTriggerCollector.triggerUsage(e, this); Project project = e.getRequiredData(CommonDataKeys.PROJECT); FileHistoryUi ui = e.getRequiredData(VcsLogInternalDataKeys.FILE_HISTORY_UI); List<CommitId> commits = ui.getTable().getSelection().getCommits(); if (commits.size() != 1) return; CommitId commit = Objects.requireNonNull(getFirstItem(commits)); List<Integer> commitIndex = Ints.asList(ui.getLogData().getCommitIndex(commit.getHash(), commit.getRoot())); getDetailsGetter(ui).loadCommitsData(commitIndex, details -> { if (!details.isEmpty()) { performAction(project, ui, Objects.requireNonNull(getFirstItem(details)), e); } }, t -> FileHistoryOneCommitActionKt.showError(project, t), null); } | actionPerformed |
275,332 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
275,333 | boolean (@NotNull AnActionEvent e) { FilePath filePath = e.getData(VcsDataKeys.FILE_PATH); return e.getData(VcsLogInternalDataKeys.FILE_HISTORY_UI) != null && filePath != null && !filePath.isDirectory(); } | isActive |
275,334 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); FilePath filePath = e.getData(VcsDataKeys.FILE_PATH); VcsLogCommitSelection selection = e.getData(VcsLogDataKeys.VCS_LOG_COMMIT_SELECTION); if (project == null || filePath == null || filePath.isDirectory() || selection == null) { e.getPresentation().setEnabledAndVisible(false); return; } updateActionText(e, selection); e.getPresentation().setVisible(true); if (e.getInputEvent() instanceof KeyEvent) { e.getPresentation().setEnabled(true); } else { Change[] changes = e.getData(VcsDataKeys.SELECTED_CHANGES); e.getPresentation().setEnabled(changes != null && changes.length == 1 && changes[0] != null); } } | update |
275,335 | void (@NotNull AnActionEvent e, @NotNull VcsLogCommitSelection selection) { } | updateActionText |
275,336 | void (@NotNull AnActionEvent e) { VcsLogUsageTriggerCollector.triggerUsage(e, this); Project project = e.getRequiredData(CommonDataKeys.PROJECT); Change[] changes = e.getData(VcsDataKeys.SELECTED_CHANGES); if (changes == null || changes.length != 1 || changes[0] == null) return; ListSelection<Change> selection = ListSelection.createAt(Arrays.asList(changes), 0) .asExplicitSelection(); ShowDiffAction.showDiffForChange(project, selection); } | actionPerformed |
275,337 | void (@NotNull AnActionEvent e, @NotNull VcsLogCommitSelection selection) { if (selection.getSize() >= 2) { e.getPresentation().setText(VcsLogBundle.messagePointer("action.presentation.CompareRevisionsFromFileHistoryActionProvider.text.compare")); e.getPresentation().setDescription(VcsLogBundle.messagePointer("action.presentation.CompareRevisionsFromFileHistoryActionProvider.description.compare")); } else { e.getPresentation().setText(VcsLogBundle.messagePointer("action.presentation.CompareRevisionsFromFileHistoryActionProvider.text.show.diff")); e.getPresentation().setDescription(VcsLogBundle.messagePointer("action.presentation.CompareRevisionsFromFileHistoryActionProvider.description.show.diff")); } } | setTextAndDescription |
275,338 | void (@NotNull AnActionEvent e, @NotNull VcsLogCommitSelection selection) { setTextAndDescription(e, selection); } | updateActionText |
275,339 | boolean (@NotNull AnActionEvent e) { return e.getData(VcsLogInternalDataKeys.FILE_HISTORY_UI) != null; } | isActive |
275,340 | ActionUpdateThread () { return myDelegate.getActionUpdateThread(); } | getActionUpdateThread |
275,341 | void (@NotNull AnActionEvent e) { myDelegate.update(e); } | update |
275,342 | void (@NotNull AnActionEvent e) { myDelegate.actionPerformed(e); } | actionPerformed |
275,343 | boolean (@NotNull FileHistoryModel model, @Nullable VcsCommitMetadata detail, @NotNull AnActionEvent e) { FilePath filePath = e.getData(VcsDataKeys.FILE_PATH); if (filePath == null || filePath.isDirectory()) return false; if (detail != null) { VcsFileRevision fileRevision = model.createRevision(detail); if (VcsHistoryUtil.isEmpty(fileRevision)) return false; } return true; } | isEnabled |
275,344 | void (@NotNull Project project, @NotNull FileHistoryModel model, @NotNull VcsCommitMetadata detail, @NotNull AnActionEvent e) { if (ChangeListManager.getInstance(project).isFreezedWithNotification(null)) return; VcsFileRevision revision = model.createRevision(detail); if (!VcsHistoryUtil.isEmpty(revision)) { GetVersionAction.doGet(project, revision, e.getRequiredData(VcsDataKeys.FILE_PATH)); } } | performAction |
275,345 | DataGetter<VcsFullCommitDetails> (@NotNull VcsLogData logData) { return logData.getCommitDetailsGetter(); } | getDetailsGetter |
275,346 | void (@NotNull Project project, @NotNull FileHistoryModel model, @NotNull VcsFullCommitDetails detail, @NotNull AnActionEvent e) { FilePath file = model.getPathInCommit(detail.getId()); String title = VcsLogBundle.message("dialog.title.paths.affected.by.commit", detail.getId().toShortString()); LoadingCommittedChangeListPanel panel = new LoadingCommittedChangeListPanel(project); panel.loadChangesInBackground(() -> { CommittedChangeListForRevision committedChangeList = createCommittedChangeList(detail); return new LoadingCommittedChangeListPanel.ChangelistData(committedChangeList, file); }); ChangeListViewerDialog.show(project, title, panel); } | performAction |
275,347 | boolean (@NotNull FileHistoryModel model, @Nullable VcsCommitMetadata detail, @NotNull AnActionEvent e) { if (detail != null) { VirtualFile file = FileHistoryUtil.createVcsVirtualFile(model.createRevision(detail)); if (file == null) return false; } return true; } | isEnabled |
275,348 | void (@NotNull Project project, @NotNull FileHistoryModel model, @NotNull VcsCommitMetadata detail, @NotNull AnActionEvent e) { VirtualFile file = FileHistoryUtil.createVcsVirtualFile(model.createRevision(detail)); if (file != null) { OpenSourceUtil.navigate(true, new OpenFileDescriptor(project, file)); } } | performAction |
275,349 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
275,350 | boolean (@NotNull AnActionEvent e) { return e.getData(VcsLogInternalDataKeys.FILE_HISTORY_UI) != null && e.getData(ChangesBrowserBase.DATA_KEY) == null; } | isActive |
275,351 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); VcsLogCommitSelection selection = e.getData(VcsLogDataKeys.VCS_LOG_COMMIT_SELECTION); FileHistoryModel model = e.getData(VcsLogInternalDataKeys.FILE_HISTORY_MODEL); if (project == null || selection == null || model == null) { e.getPresentation().setEnabledAndVisible(false); return; } e.getPresentation().setVisible(true); if (selection.getSize() != 1) { e.getPresentation().setEnabled(false); return; } FilePath filePath = e.getData(VcsDataKeys.FILE_PATH); VcsLogDiffHandler handler = e.getData(VcsLogInternalDataKeys.LOG_DIFF_HANDLER); e.getPresentation().setEnabled(filePath != null && filePath.getVirtualFile() != null && handler != null); } | update |
275,352 | void (@NotNull AnActionEvent e) { VcsLogUsageTriggerCollector.triggerUsage(e, this); Project project = e.getRequiredData(CommonDataKeys.PROJECT); VcsLogCommitSelection selection = e.getRequiredData(VcsLogDataKeys.VCS_LOG_COMMIT_SELECTION); FileHistoryModel model = e.getRequiredData(VcsLogInternalDataKeys.FILE_HISTORY_MODEL); List<CommitId> commits = selection.getCommits(); if (commits.size() != 1) return; CommitId commit = Objects.requireNonNull(getFirstItem(commits)); if (ChangeListManager.getInstance(project).isFreezedWithNotification(null)) return; FilePath localPath = e.getRequiredData(VcsDataKeys.FILE_PATH); FilePath pathInCommit = model.getPathInCommit(commit.getHash()); VcsLogDiffHandler handler = e.getRequiredData(VcsLogInternalDataKeys.LOG_DIFF_HANDLER); handler.showDiffWithLocal(commit.getRoot(), pathInCommit, commit.getHash(), localPath); } | actionPerformed |
275,353 | DataGetter<VcsCommitMetadata> (@NotNull VcsLogData logData) { return logData.getMiniDetailsGetter(); } | getDetailsGetter |
275,354 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
275,355 | boolean (@NotNull AnActionEvent e) { return e.getData(VcsLogInternalDataKeys.FILE_HISTORY_UI) != null; } | isActive |
275,356 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); FileHistoryUi ui = e.getData(VcsLogInternalDataKeys.FILE_HISTORY_UI); VcsLogCommitSelection selection = e.getData(VcsLogDataKeys.VCS_LOG_COMMIT_SELECTION); if (project == null || ui == null || selection == null) { e.getPresentation().setEnabledAndVisible(false); return; } e.getPresentation().setVisible(true); String commitMessage = e.getData(VcsDataKeys.PRESET_COMMIT_MESSAGE); e.getPresentation().setEnabled(VcsLogCommitSelection.isNotEmpty(selection) && commitMessage != null); } | update |
275,357 | void (@NotNull AnActionEvent e) { VcsLogUsageTriggerCollector.triggerUsage(e, this); Project project = e.getRequiredData(CommonDataKeys.PROJECT); VcsLogCommitSelection selection = e.getRequiredData(VcsLogDataKeys.VCS_LOG_COMMIT_SELECTION); String commitMessage = e.getRequiredData(VcsDataKeys.PRESET_COMMIT_MESSAGE); selection.requestFullDetails(detailsList -> { List<Change> changes = VcsLogUtil.collectChanges(detailsList); CreatePatchFromChangesAction.createPatch(project, commitMessage, changes, mySilentClipboard); }); } | actionPerformed |
275,358 | boolean (@NotNull FileHistoryModel model, @Nullable VcsCommitMetadata detail, @NotNull AnActionEvent e) { VcsKey key = e.getData(VcsDataKeys.VCS); if (key == null) return false; AbstractVcs vcs = VcsUtil.findVcsByKey(Objects.requireNonNull(e.getProject()), key); if (vcs == null) return false; AnnotationProvider provider = vcs.getAnnotationProvider(); if (provider == null) return false; if (detail != null) { VcsFileRevision fileRevision = model.createRevision(detail); return AnnotateRevisionActionBase.isEnabled(vcs, FileHistoryUtil.createVcsVirtualFile(fileRevision), fileRevision); } return true; } | isEnabled |
275,359 | void (@NotNull Project project, @NotNull FileHistoryModel model, @NotNull VcsCommitMetadata detail, @NotNull AnActionEvent e) { VcsKey vcsKey = e.getRequiredData(VcsDataKeys.VCS); VcsFileRevision revision = model.createRevision(detail); VirtualFile vcsVirtualFile = FileHistoryUtil.createVcsVirtualFile(revision); if (!VcsHistoryUtil.isEmpty(revision) && vcsVirtualFile != null) { AnnotateRevisionActionBase.annotate(vcsVirtualFile, revision, Objects.requireNonNull(VcsUtil.findVcsByKey(project, vcsKey)), null, 0); } } | performAction |
275,360 | List<List<String>> () { return myUiProperties.getRecentlyFilteredGroups(myName); } | getRecentValuesFromSettings |
275,361 | void (@NotNull Collection<String> values) { myUiProperties.addRecentlyFilteredGroup(myName, parseLocalizedValues(values)); } | rememberValuesInSettings |
275,362 | List<AnAction> () { List<AnAction> group = new ArrayList<>(); List<List<String>> recentlyFiltered = getRecentValuesFromSettings(); if (!recentlyFiltered.isEmpty()) { group.add(Separator.create(VcsLogBundle.message("vcs.log.filter.recent"))); for (List<String> recentGroup : recentlyFiltered) { if (!recentGroup.isEmpty()) { group.add(new PredefinedValueAction(recentGroup)); } } group.add(Separator.getInstance()); } return group; } | createRecentItemsActionGroup |
275,363 | String (@NotNull Filter filter) { return displayableText(getLocalizedValues(getFilterValues(filter)), MAX_FILTER_VALUE_LENGTH); } | getText |
275,364 | AnAction () { return new SelectMultipleValuesAction(); } | createSelectMultipleValuesAction |
275,365 | String (@NotNull List<String> values) { List<String> localizedValues = getLocalizedValues(values); if (localizedValues.size() == 1) return Objects.requireNonNull(ContainerUtil.getFirstItem(localizedValues)); return displayableText(localizedValues, 2 * MAX_FILTER_VALUE_LENGTH); } | getActionName |
275,366 | void (@NotNull AnActionEvent e) { myFilterModel.setFilter(createFilter(myValues)); if (myAddToRecent) rememberValuesInSettings(myValues); } | actionPerformed |
275,367 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) { return; } Filter filter = myFilterModel.getFilter(); List<String> values = filter == null ? Collections.emptyList() : getLocalizedValues(MultipleValueFilterPopupComponent.this.getFilterValues(filter)); MultilinePopupBuilder popupBuilder = new MultilinePopupBuilder(project, myVariants, getPopupText(values), getCompletionPrefixProvider()); JBPopup popup = popupBuilder.createPopup(); popup.addListener(new JBPopupListener() { @Override public void onClosed(@NotNull LightweightWindowEvent event) { if (event.isOk()) { List<String> selectedValues = parseLocalizedValues(popupBuilder.getSelectedValues()); if (selectedValues.isEmpty()) { myFilterModel.setFilter(null); } else { myFilterModel.setFilter(createFilter(selectedValues)); rememberValuesInSettings(selectedValues); } } } }); popup.showUnderneathOf(MultipleValueFilterPopupComponent.this); } | actionPerformed |
275,368 | void (@NotNull LightweightWindowEvent event) { if (event.isOk()) { List<String> selectedValues = parseLocalizedValues(popupBuilder.getSelectedValues()); if (selectedValues.isEmpty()) { myFilterModel.setFilter(null); } else { myFilterModel.setFilter(createFilter(selectedValues)); rememberValuesInSettings(selectedValues); } } } | onClosed |
275,369 | String (@Nullable Collection<String> selectedValues) { return selectedValues == null || selectedValues.isEmpty() ? "" : StringUtil.join(selectedValues, "\n"); } | getPopupText |
275,370 | boolean (@NotNull AnAction action) { if (!super.shouldBeShowing(action)) return false; return !getSpeedSearch().isHoldingFilter() || !(action instanceof ActionGroup); } | shouldBeShowing |
275,371 | ActionGroup (@NotNull ActionGroup actionGroup) { List<AnAction> speedSearchActions = new ArrayList<>(); createSpeedSearchActions(actionGroup, speedSearchActions, true); return new DefaultActionGroup(speedSearchActions); } | createSpeedSearchActionGroup |
275,372 | void (@NotNull ActionGroup actionGroup, @NotNull List<? super AnAction> speedSearchActions, boolean isFirstLevel) { if (!isFirstLevel) speedSearchActions.add(Separator.create(actionGroup.getTemplatePresentation().getText())); for (AnAction child : actionGroup.getChildren(null)) { if (!isFirstLevel && !(child instanceof ActionGroup || child instanceof Separator || child instanceof SpeedsearchAction)) { speedSearchActions.add(createSpeedSearchWrapper(child)); } else if (child instanceof ActionGroup) { createSpeedSearchActions((ActionGroup)child, speedSearchActions, isFirstLevel && !((ActionGroup)child).isPopup()); } } } | createSpeedSearchActions |
275,373 | void (@NotNull List<AnAction> actionGroup, @NotNull List<String> recentItem) { assert myRecentItems == null; } | createRecentAction |
275,374 | void (@NotNull List<AnAction> actionGroup, @NotNull List<String> favorites) { } | createFavoritesAction |
275,375 | AnAction (@NotNull @NlsActions.ActionText String actionName, @NotNull Collection<? extends VcsRef> refs) { return createAction(actionName, refs); } | createCollapsedAction |
275,376 | ActionGroup () { return createActions(prepareGroups(myDataPack, myVisibleRoots, myRecentItems)); } | build |
275,377 | Groups (@NotNull VcsLogDataPack dataPack, @Nullable Collection<? extends VirtualFile> visibleRoots, @Nullable List<? extends List<String>> recentItems) { Groups filteredGroups = new Groups(); Collection<VcsRef> allRefs = dataPack.getRefs().getBranches(); for (Map.Entry<VirtualFile, Set<VcsRef>> entry : VcsLogUtil.groupRefsByRoot(allRefs).entrySet()) { VirtualFile root = entry.getKey(); if (visibleRoots != null && !visibleRoots.contains(root)) continue; List<RefGroup> refGroups = dataPack.getLogProviders().get(root).getReferenceManager().groupForBranchFilter(entry.getValue()); putActionsForReferences(dataPack, refGroups, filteredGroups); } if (recentItems != null) { filteredGroups.recentGroups.addAll(recentItems); } return filteredGroups; } | prepareGroups |
275,378 | DefaultActionGroup (@NotNull Groups groups) { List<AnAction> actionGroup = new ArrayList<>(); for (Map.Entry<@NlsActions.ActionText String, Collection<VcsRef>> entry : groups.singletonGroups.entrySet()) { actionGroup.add(createAction(entry.getKey(), entry.getValue())); } if (!groups.recentGroups.isEmpty()) { List<AnAction> recents = new ArrayList<>(); for (List<String> recentItem : groups.recentGroups) { createRecentAction(recents, recentItem); } DefaultActionGroup recentGroup = new DefaultActionGroup(VcsLogBundle.message("vcs.log.filter.recent"), recents); recentGroup.setPopup(true); actionGroup.add(recentGroup); } if (groups.favoriteGroups.size() > 1) { createFavoritesAction(actionGroup, new ArrayList<>(ContainerUtil.map2LinkedSet(ContainerUtil.flatten(groups.favoriteGroups.values()), ref -> ref.getName()))); } for (Map.Entry<@NlsActions.ActionText String, Collection<VcsRef>> entry : groups.favoriteGroups.entrySet()) { actionGroup.add(createAction(entry.getKey(), entry.getValue())); } for (Map.Entry<@NlsContexts.Separator String, TreeMap<@NlsActions.ActionText String, Collection<VcsRef>>> group : groups.expandedGroups.entrySet()) { actionGroup.add(Separator.create(group.getKey())); for (Map.Entry<@NlsActions.ActionText String, Collection<VcsRef>> entry : group.getValue().entrySet()) { actionGroup.add(createAction(entry.getKey(), entry.getValue())); } } actionGroup.add(Separator.getInstance()); for (Map.Entry<@NlsActions.ActionText String, TreeMap<@NlsActions.ActionText String, Collection<VcsRef>>> group : groups.collapsedGroups.entrySet()) { List<AnAction> collapsed = new ArrayList<>(); for (Map.Entry<@NlsActions.ActionText String, Collection<VcsRef>> entry : group.getValue().entrySet()) { collapsed.add(createCollapsedAction(entry.getKey(), entry.getValue())); } DefaultActionGroup popupGroup = new DefaultActionGroup(group.getKey(), collapsed); popupGroup.setPopup(true); actionGroup.add(popupGroup); } return new DefaultActionGroup(actionGroup); } | createActions |
275,379 | void (@NotNull VcsLogDataPack pack, @NotNull List<? extends RefGroup> references, @NotNull Groups actions) { for (RefGroup refGroup : references) { if (refGroup instanceof SingletonRefGroup) { VcsRef ref = ((SingletonRefGroup)refGroup).getRef(); if (isFavorite(pack, ref)) { append(actions.favoriteGroups, refGroup.getName(), ref); } else { append(actions.singletonGroups, refGroup.getName(), ref); } } else { TreeMap<String, TreeMap<String, Collection<VcsRef>>> groups = refGroup.isExpanded() ? actions.expandedGroups : actions.collapsedGroups; TreeMap<String, Collection<VcsRef>> groupActions = groups.computeIfAbsent(refGroup.getName(), key -> new TreeMap<>()); for (VcsRef ref : refGroup.getRefs()) { if (isFavorite(pack, ref)) { append(actions.favoriteGroups, ref.getName(), ref); } append(groupActions, ref.getName(), ref); } } } } | putActionsForReferences |
275,380 | boolean (@NotNull VcsLogDataPack pack, @NotNull VcsRef ref) { return pack.getLogProviders().get(ref.getRoot()).getReferenceManager().isFavorite(ref); } | isFavorite |
275,381 | List<String> (@NotNull BranchFilters filters) { return VcsLogClassicFilterUi.BranchFilterModel.getFilterPresentation(filters); } | getFilterValues |
275,382 | List<String> (@NotNull Collection<String> values) { return new ArrayList<>(values); } | parseLocalizedValues |
275,383 | List<String> (@NotNull Collection<String> values) { return new ArrayList<>(values); } | getLocalizedValues |
275,384 | List<String> () { List<String> separators = new ArrayList<>(); for (char c : MultilinePopupBuilder.SEPARATORS) { separators.add(String.valueOf(c)); } separators.add(".."); return separators; } | getCompletionSeparators |
275,385 | ListPopup () { return new MyBranchLogSpeedSearchPopup(); } | createPopupMenu |
275,386 | ActionGroup () { DefaultActionGroup actionGroup = new DefaultActionGroup(); actionGroup.add(createSelectMultipleValuesAction()); VcsLogDataPack logData = myFilterModel.getDataPack(); List<List<String>> branchFilters = processRecentBranchFilters( ContainerUtil.map2Set(logData.getRefs().getBranches(), VcsRef::getName), getRecentValuesFromSettings()); actionGroup.add(new MyBranchPopupBuilder(logData, myBranchFilterModel.getVisibleRoots(), branchFilters).build()); return actionGroup; } | createActionGroup |
275,387 | List<String> () { Collection<VcsRef> branches = myFilterModel.getDataPack().getRefs().getBranches(); if (myBranchFilterModel.getVisibleRoots() != null) { branches = ContainerUtil.filter(branches, branch -> myBranchFilterModel.getVisibleRoots().contains(branch.getRoot())); } return ContainerUtil.map(branches, VcsRef::getName); } | getAllValues |
275,388 | List<List<String>> (@NotNull Set<String> availableBranches, @NotNull List<List<String>> recentBranchFilters) { if (availableBranches.isEmpty()) { return recentBranchFilters; } return ContainerUtil.filter(recentBranchFilters, recentFilter -> !fromBranchPatterns(recentFilter, availableBranches, true).isEmpty()); } | processRecentBranchFilters |
275,389 | AnAction (@NotNull String name, @NotNull Collection<? extends VcsRef> refs) { return new BranchFilterAction(() -> name, refs); } | createAction |
275,390 | void (@NotNull List<AnAction> actionGroup, @NotNull List<String> recentItems) { actionGroup.add(new PredefinedValueAction(recentItems)); } | createRecentAction |
275,391 | AnAction (@NotNull String actionName, @NotNull Collection<? extends VcsRef> refs) { return new BranchFilterAction(() -> actionName, refs); } | createCollapsedAction |
275,392 | void (@NotNull List<AnAction> actionGroup, @NotNull List<String> favorites) { actionGroup.add(new PredefinedValueAction(favorites, VcsLogBundle.messagePointer("vcs.log.branch.filter.favorites"), false)); } | createFavoritesAction |
275,393 | boolean () { for (VcsRef ref : myReferences) { if (myDataPack.getLogProviders().get(ref.getRoot()).getReferenceManager().isFavorite(ref)) { return true; } } return false; } | isFavorite |
275,394 | void () { myIcon.setLayerEnabled(0, myIsFavorite); myHoveredIcon.setLayerEnabled(0, myIsFavorite); myIcon.setLayerEnabled(1, !myIsFavorite); myHoveredIcon.setLayerEnabled(1, !myIsFavorite); } | updateIcons |
275,395 | void (boolean favorite) { for (VcsRef ref : myReferences) { myDataPack.getLogProviders().get(ref.getRoot()).getReferenceManager().setFavorite(ref, favorite); } myIsFavorite = isFavorite(); updateIcons(); } | setFavorite |
275,396 | void () { setFavorite(!myIsFavorite); } | toggle |
275,397 | void (boolean handleFinalChoices, InputEvent e) { MyBranchPopupBuilder.BranchFilterAction branchAction = getSpecificAction(getList().getSelectedValue(), MyBranchPopupBuilder.BranchFilterAction.class); if (branchAction != null && e instanceof MouseEvent && myListElementRenderer.isIconAt(((MouseEvent)e).getPoint())) { branchAction.toggle(); getList().repaint(); } else { super.handleSelect(handleFinalChoices, e); } } | handleSelect |
275,398 | PopupListElementRendererWithIcon () { if (myListElementRenderer == null) { myListElementRenderer = new PopupListElementRendererWithIcon(this); } return myListElementRenderer; } | getListElementRenderer |
275,399 | WizardPopup (WizardPopup parent, PopupStep step, Object parentValue) { if (step instanceof ListPopupStep) { return new MyBranchLogSpeedSearchPopup(parent, (ListPopupStep)step, parentValue); } return super.createPopup(parent, step, parentValue); } | createPopup |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.