Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
290,800 | Content (final @NotNull String contentId, final @NotNull ComponentWithActions withActions, final @NotNull String displayName, final @Nullable Icon icon, final @Nullable JComponent toFocus) { final Content content = getContentFactory().createContent(withActions.getComponent(), displayName, false); content.putUserData(CONTENT_TYPE, contentId); content.putUserData(ViewImpl.ID, contentId); content.setIcon(icon); if (toFocus != null) { content.setPreferredFocusableComponent(toFocus); } if (!withActions.isContentBuiltIn()) { content.setSearchComponent(withActions.getSearchComponent()); content.setActions(withActions.getToolbarActions(), withActions.getToolbarPlace(), withActions.getToolbarContextComponent()); } return content; } | createContent |
290,801 | JComponent () { return myViewsContentManager.getComponent(); } | getComponent |
290,802 | ContentFactory () { return ContentFactory.getInstance(); } | getContentFactory |
290,803 | RunnerLayout () { return myLayout; } | getLayout |
290,804 | void () { myContentUI.updateActionsImmediately(); } | updateActionsNow |
290,805 | void () { myContentUI.saveUiState(); } | beforeTreeDispose |
290,806 | void () { } | dispose |
290,807 | ContentManager () { return myViewsContentManager; } | getContentManager |
290,808 | ActionCallback (final @Nullable Content content, boolean requestFocus, final boolean forced) { return selectAndFocus(content, requestFocus, forced, false); } | selectAndFocus |
290,809 | ActionCallback (final @Nullable Content content, boolean requestFocus, final boolean forced, boolean implicit) { if (content == null) return ActionCallback.REJECTED; return getContentManager(content).setSelectedContent(content, requestFocus || shouldRequestFocus(), forced, implicit); } | selectAndFocus |
290,810 | ContentManager (@NotNull Content content) { return myContentUI.getContentManager(content); } | getContentManager |
290,811 | boolean () { final Component focused = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); return focused != null && SwingUtilities.isDescendingFrom(focused, getContentManager().getComponent()); } | shouldRequestFocus |
290,812 | boolean (@Nullable Content content, final boolean dispose) { return content != null && getContentManager().removeContent(content, dispose); } | removeContent |
290,813 | boolean (final @NotNull Content content, final @NotNull String condition) { final String id = content.getUserData(ViewImpl.ID); return getLayout().isToFocus(id, condition); } | isToFocus |
290,814 | LayoutViewOptions (final @Nullable Content content, final @NotNull String condition) { getLayout().setToFocus(content != null ? content.getUserData(ViewImpl.ID) : null, condition); return this; } | setToFocus |
290,815 | void (final @NotNull String condition) { myContentUI.attractByCondition(condition, true); } | attractBy |
290,816 | void (final @NotNull String condition) { myContentUI.clearAttractionByCondition(condition, true); } | clearAttractionBy |
290,817 | void (@NotNull String id, final boolean dispose) { final Content content = findContent(id); if (content != null) { getContentManager().removeContent(content, dispose); } } | removeContent |
290,818 | AnAction () { return myContentUI.getLayoutActions(); } | getLayoutActions |
290,819 | LayoutViewOptions (@NotNull ActionGroup group) { myContentUI.setTabPopupActions(group); return this; } | setTabPopupActions |
290,820 | LayoutViewOptions (final @NotNull ActionGroup leftToolbar, final @NotNull String place) { myContentUI.setLeftToolbar(leftToolbar, place); return this; } | setLeftToolbar |
290,821 | RunnerLayoutUi (final @NotNull ContentManagerListener listener, final @NotNull Disposable parent) { final ContentManager mgr = getContentManager(); mgr.addContentManagerListener(listener); Disposer.register(parent, new Disposable() { @Override public void dispose() { mgr.removeContentManagerListener(listener); } }); return this; } | addListener |
290,822 | void () { mgr.removeContentManagerListener(listener); } | dispose |
290,823 | void (final @NotNull ContentManagerListener listener) { getContentManager().removeContentManagerListener(listener); } | removeListener |
290,824 | void (final @NotNull Content content, final boolean activate) { myContentUI.processBounce(content, activate); } | setBouncing |
290,825 | boolean () { return getContentManager().isDisposed(); } | isDisposed |
290,826 | LayoutViewOptions (final boolean enabled) { myContentUI.setMinimizeActionEnabled(enabled); return this; } | setMinimizeActionEnabled |
290,827 | LayoutViewOptions (boolean toDispose) { myContentUI.setToDisposeRemovedContent(toDispose); return this; } | setToDisposeRemoveContent |
290,828 | LayoutViewOptions (final boolean enabled) { myContentUI.setMovetoGridActionEnabled(enabled); return this; } | setMoveToGridActionEnabled |
290,829 | LayoutViewOptions (final @NotNull String contentId, final LayoutAttractionPolicy policy) { myContentUI.setPolicy(contentId, policy); return this; } | setAttractionPolicy |
290,830 | LayoutViewOptions (final @NotNull String condition, final LayoutAttractionPolicy policy) { myContentUI.setConditionPolicy(condition, policy); return this; } | setConditionAttractionPolicy |
290,831 | LayoutStateDefaults () { return this; } | getDefaults |
290,832 | LayoutViewOptions () { return this; } | getOptions |
290,833 | LayoutViewOptions (final @NotNull ActionGroup group) { myContentUI.setAdditionalFocusActions(group); return this; } | setAdditionalFocusActions |
290,834 | AnAction () { return myContentUI.getSettingsActions(); } | getSettingsActions |
290,835 | void (boolean value) { myContentUI.setLeftToolbarVisible(value); } | setLeftToolbarVisible |
290,836 | void (boolean value) { myContentUI.setContentToolbarBefore(value); } | setContentToolbarBefore |
290,837 | void (boolean value) { myContentUI.setTopLeftActionsVisible(value); } | setTopLeftActionsVisible |
290,838 | List<AnAction> () { return myContentUI.getActions(true); } | getActions |
290,839 | ActionUpdateThread () { return myOrigin.getActionUpdateThread(); } | getActionUpdateThread |
290,840 | boolean () { return myOrigin.isDumbAware(); } | isDumbAware |
290,841 | boolean () { return !(myOrigin instanceof ActionGroup) || ((ActionGroup)myOrigin).isPopup(); } | isPopup |
290,842 | boolean () { return myOrigin instanceof ActionGroup && ((ActionGroup)myOrigin).hideIfNoVisibleChildren(); } | hideIfNoVisibleChildren |
290,843 | boolean () { return myOrigin instanceof ActionGroup && ((ActionGroup)myOrigin).disableIfNoVisibleChildren(); } | disableIfNoVisibleChildren |
290,844 | void (@NotNull AnActionEvent e) { AnActionEvent wrapped = wrapEvent(e); myOrigin.update(wrapped); Icon icon = wrapped.getPresentation().getIcon(); if (icon != null) { e.getPresentation().setIcon(icon); } } | update |
290,845 | AnActionEvent (@NotNull AnActionEvent e) { return e.withDataContext(wrapContext(e.getDataContext())); } | wrapEvent |
290,846 | DataContext (DataContext dataContext) { Pair<PsiElement, MyDataContext> pair = DataManager.getInstance().loadFromDataContext(dataContext, LOCATION_WRAPPER); PsiElement element = myElement.getElement(); if (pair == null || pair.first != element) { pair = Pair.pair(element, new MyDataContext(dataContext)); DataManager.getInstance().saveInDataContext(dataContext, LOCATION_WRAPPER, pair); } return pair.second; } | wrapContext |
290,847 | void (@NotNull AnActionEvent e) { myOrigin.actionPerformed(wrapEvent(e)); } | actionPerformed |
290,848 | Priority () { return Priority.TOP; } | getPriority |
290,849 | AnAction () { return myOrigin; } | getDelegate |
290,850 | void (@NotNull List<? extends PsiElement> elements, @NotNull Collection<? super LineMarkerInfo<?>> result) { for (PsiElement element : elements) { List<RunLineMarkerContributor> contributors = DumbService.getInstance(element.getProject()) .filterByDumbAwareness(RunLineMarkerContributor.EXTENSION.allForLanguageOrAny(element.getLanguage())); Icon icon = null; List<Info> infos = null; for (RunLineMarkerContributor contributor : contributors) { Info info = contributor.getSlowInfo(element); if (info == null) { continue; } if (icon == null) { icon = info.icon; } if (infos == null) { infos = new SmartList<>(); } infos.add(info); } if (icon != null) { result.add(createLineMarker(element, icon, infos)); } } } | collectSlowLineMarkers |
290,851 | LineMarkerInfo<PsiElement> (@NotNull PsiElement element, @NotNull Icon icon, @NotNull List<? extends Info> infos) { if (infos.size() > 1) { infos.sort(COMPARATOR); final Info first = infos.get(0); infos.removeIf(info -> info != first && first.shouldReplace(info)); } final DefaultActionGroup actionGroup = new DefaultActionGroup(); for (Info info : infos) { for (AnAction action : info.actions) { actionGroup.add(action instanceof Separator ? action : new LineMarkerActionWrapper(element, action)); } if (info != infos.get(infos.size() - 1)) { actionGroup.add(new Separator()); } } Function<PsiElement, String> tooltipProvider = new EquatableTooltipProvider(infos); return new RunLineMarkerInfo(element, icon, tooltipProvider, actionGroup); } | createLineMarker |
290,852 | int () { return myInfos.hashCode(); } | hashCode |
290,853 | boolean (Object obj) { return obj instanceof EquatableTooltipProvider other && myInfos.equals(other.myInfos); } | equals |
290,854 | String (PsiElement element1) { StringBuilder tooltip = new StringBuilder(); for (Info info : myInfos) { if (info.tooltipProvider != null) { String string = info.tooltipProvider.apply(element1); if (string == null) continue; if (!tooltip.isEmpty()) { tooltip.append("\n"); } tooltip.append(string); } } return tooltip.isEmpty() ? null : appendShortcut(tooltip.toString()); } | fun |
290,855 | String (String tooltip) { if (ApplicationManager.getApplication().isUnitTestMode()) return tooltip; Executor executor = ExecutorRegistry.getInstance().getExecutorById(DefaultRunExecutor.EXECUTOR_ID); if (executor != null) { String actionId = executor.getContextActionId(); String shortcutText = KeymapUtil.getShortcutText(actionId); @NotNull String shortcutColor = ColorUtil.toHex(JBUI.CurrentTheme.Tooltip.shortcutForeground()); return XmlStringUtil.wrapInHtml(XmlStringUtil.escapeString(tooltip).replaceAll("\n", "<br>") + CommonXmlStrings.NBSP + CommonXmlStrings.NBSP + "<font color='#" + shortcutColor + "'>" + XmlStringUtil.escapeString(shortcutText) + "</font>"); } else { return tooltip; } } | appendShortcut |
290,856 | GutterIconRenderer () { return new LineMarkerGutterIconRenderer<>(this) { @Override public AnAction getClickAction() { return mySingleAction; } @Override public boolean isNavigateAction() { return true; } @Override public ActionGroup getPopupMenuActions() { return myActionGroup; } @Override public boolean isDumbAware() { return myActionGroup.isDumbAware(); } }; } | createGutterRenderer |
290,857 | AnAction () { return mySingleAction; } | getClickAction |
290,858 | boolean () { return true; } | isNavigateAction |
290,859 | ActionGroup () { return myActionGroup; } | getPopupMenuActions |
290,860 | boolean () { return myActionGroup.isDumbAware(); } | isDumbAware |
290,861 | MarkupEditorFilter () { return MarkupEditorFilterFactory.createIsNotDiffFilter(); } | getEditorFilter |
290,862 | boolean (@NotNull MergeableLineMarkerInfo<?> info) { return info instanceof RunLineMarkerInfo && info.getIcon() == getIcon(); } | canMergeWith |
290,863 | Icon (@NotNull List<? extends MergeableLineMarkerInfo<?>> infos) { return getIcon(); } | getCommonIcon |
290,864 | String () { return ExecutionBundle.message("run.line.marker.name"); } | getName |
290,865 | ThreeState (@NotNull VirtualFile file) { Boolean data = file.getUserData(HAS_ANYTHING_RUNNABLE); return data == null ? ThreeState.UNSURE : ThreeState.fromBoolean(data); } | hadAnythingRunnable |
290,866 | void (@NotNull VirtualFile file, boolean isRunnable) { file.putUserData(HAS_ANYTHING_RUNNABLE, isRunnable); } | markRunnable |
290,867 | Info (@NotNull Icon icon) { return new Info(icon, ExecutorAction.getActions(1), RUN_TEST_TOOLTIP_PROVIDER); } | withExecutorActions |
290,868 | boolean (@NotNull Info other) { return false; } | shouldReplace |
290,869 | int () { return Objects.hashCode(icon) + Arrays.hashCode(actions) + Objects.hashCode(tooltipProvider); } | hashCode |
290,870 | boolean (Object obj) { return obj instanceof Info info && Objects.equals(icon, info.icon) && Arrays.equals(actions, info.actions) && Objects.equals(tooltipProvider, info.tooltipProvider); } | equals |
290,871 | Info (@NotNull PsiElement element) { return null; } | getSlowInfo |
290,872 | boolean (@NotNull PsiFile file) { return true; } | producesAllPossibleConfigurations |
290,873 | AnActionEvent (@NotNull PsiElement element) { DataContext dataContext = SimpleDataContext.builder() .add(CommonDataKeys.PROJECT, element.getProject()) .add(CommonDataKeys.PSI_ELEMENT, element) .build(); AnActionEvent event = AnActionEvent.createFromDataContext(ActionPlaces.UNKNOWN, null, dataContext); Utils.initUpdateSession(event); return event; } | createActionEvent |
290,874 | Icon (String url, @NotNull Project project, boolean isClass) { return getTestStateIcon(TestStateStorage.getInstance(project).getState(url), isClass); } | getTestStateIcon |
290,875 | Icon (@Nullable TestStateStorage.Record state, boolean isClass) { if (state != null) { TestStateInfo.Magnitude magnitude = TestIconMapper.getMagnitude(state.magnitude); if (magnitude != null) { switch (magnitude) { case ERROR_INDEX, FAILED_INDEX -> { return AllIcons.RunConfigurations.TestState.Red2; } case PASSED_INDEX, COMPLETE_INDEX -> { return AllIcons.RunConfigurations.TestState.Green2; } default -> { } } } } return isClass ? AllIcons.RunConfigurations.TestState.Run_run : AllIcons.RunConfigurations.TestState.Run; } | getTestStateIcon |
290,876 | boolean (@NotNull PsiElement element) { InjectedLanguageManager injectedLanguageManager = InjectedLanguageManager.getInstance(element.getProject()); if (injectedLanguageManager.isInjectedFragment(element.getContainingFile())) return false; List<RunLineMarkerContributor> contributors = RunLineMarkerContributor.EXTENSION.allForLanguageOrAny(element.getLanguage()); for (RunLineMarkerContributor contributor : contributors) { if (contributor.getInfo(element) != null || contributor.getSlowInfo(element) != null) { return true; } } return false; } | hasAnyLineMarkerInfo |
290,877 | void (ListDataEvent e) { updateText(); } | intervalAdded |
290,878 | void (ListDataEvent e) { updateText(); } | intervalRemoved |
290,879 | void (ListDataEvent e) { } | contentsChanged |
290,880 | void (AnActionButton button) { BeforeRunTaskAndProvider selection = getSelection(); if (selection == null) { return; } BeforeRunTask<?> task = selection.getTask(); if (!clonedTasks.contains(task)) { task = task.clone(); clonedTasks.add(task); myModel.setElementAt(task, selection.getIndex()); } RunConfigurationOptionUsagesCollector.logEditBeforeRunTask( myRunConfiguration.getProject(), myRunConfiguration.getType().getId(), task.getProviderId().getClass()); selection.getProvider().configureTask(button.getDataContext(), myRunConfiguration, task) .onSuccess(changed -> { if (changed) { updateText(); } }); } | run |
290,881 | boolean (@NotNull AnActionEvent e) { BeforeRunTaskAndProvider selection = getSelection(); return selection != null && selection.getProvider().isConfigurable(); } | isEnabled |
290,882 | void (AnActionButton button) { doAddAction(button); } | run |
290,883 | boolean (@NotNull AnActionEvent e) { return checkBeforeRunTasksAbility(true); } | isEnabled |
290,884 | void (AnActionButton button) { BeforeRunTaskAndProvider selection = getSelection(); if (selection != null) { RunConfigurationOptionUsagesCollector.logRemoveBeforeRunTask( myRunConfiguration.getProject(), myRunConfiguration.getType().getId(), selection.getProvider().getClass()); ListUtil.removeSelectedItems(myList); } } | run |
290,885 | void (ActionEvent e) { updateText(); } | actionPerformed |
290,886 | void (boolean aFlag) { super.setVisible(aFlag); updateText(); } | setVisible |
290,887 | void (@NotNull RunnerAndConfigurationSettings settings) { clonedTasks.clear(); myRunConfiguration = settings.getConfiguration(); originalTasks.clear(); originalTasks.addAll(RunManagerImplKt.doGetBeforeRunTasks(myRunConfiguration)); myModel.replaceAll(originalTasks); myShowSettingsBeforeRunCheckBox.setSelected(settings.isEditBeforeRun()); myShowSettingsBeforeRunCheckBox.setEnabled(!isUnknown()); myActivateToolWindowBeforeRunCheckBox.setSelected(settings.isActivateToolWindowBeforeRun()); myActivateToolWindowBeforeRunCheckBox.setEnabled(!isUnknown()); myFocusToolWindowBeforeRunCheckBox.setSelected(settings.isFocusToolWindowBeforeRun()); myFocusToolWindowBeforeRunCheckBox.setEnabled(!isUnknown()); myPanel.setVisible(checkBeforeRunTasksAbility(false)); updateText(); } | doReset |
290,888 | void () { int count = myModel.getSize(); String title = ExecutionBundle.message("before.launch.panel.title"); String suffix = count == 0 || isVisible() ? "" : ExecutionBundle.message("before.launch.panel.title.suffix", count); myListener.titleChanged(title + suffix); } | updateText |
290,889 | boolean () { return myShowSettingsBeforeRunCheckBox.isSelected(); } | needEditBeforeRun |
290,890 | boolean () { return myActivateToolWindowBeforeRunCheckBox.isSelected(); } | needActivateToolWindowBeforeRun |
290,891 | boolean () { return myFocusToolWindowBeforeRunCheckBox.isSelected(); } | needFocusToolWindowBeforeRun |
290,892 | boolean (boolean checkOnlyAddAction) { if (isUnknown()) { return false; } Set<Key<?>> activeProviderKeys = getActiveProviderKeys(); for (BeforeRunTaskProvider<BeforeRunTask<?>> provider : getBeforeRunTaskProviders()) { if (provider.createTask(myRunConfiguration) != null) { if (!checkOnlyAddAction) { return true; } else if (!provider.isSingleton() || !activeProviderKeys.contains(provider.getId())) { return true; } } } return false; } | checkBeforeRunTasksAbility |
290,893 | boolean () { return myRunConfiguration instanceof UnknownRunConfiguration; } | isUnknown |
290,894 | void (@NotNull AnActionButton button) { if (isUnknown()) { return; } Set<Key<?>> activeProviderKeys = getActiveProviderKeys(); DefaultActionGroup actionGroup = new DefaultActionGroup(); for (BeforeRunTaskProvider<BeforeRunTask<?>> provider : getBeforeRunTaskProviders()) { if (provider.createTask(myRunConfiguration) == null || activeProviderKeys.contains(provider.getId()) && provider.isSingleton()) { continue; } actionGroup.add(new AnAction(provider.getName(), null, provider.getIcon()) { @Override public void actionPerformed(@NotNull AnActionEvent e) { BeforeRunTask<?> task = provider.createTask(myRunConfiguration); if (task == null) { return; } provider.configureTask(button.getDataContext(), myRunConfiguration, task) .onSuccess(changed -> { if (!provider.canExecuteTask(myRunConfiguration, task)) { return; } task.setEnabled(true); Set<RunConfiguration> configurationSet = CollectionFactory.createSmallMemoryFootprintSet(); getAllRunBeforeRuns(task, configurationSet); if (configurationSet.contains(myRunConfiguration)) { JOptionPane.showMessageDialog(BeforeRunStepsPanel.this, ExecutionBundle.message("before.launch.panel.cyclic_dependency_warning", myRunConfiguration.getName(), provider.getDescription(task)), ExecutionBundle.message("warning.common.title"), JOptionPane.WARNING_MESSAGE); return; } RunConfigurationOptionUsagesCollector.logAddBeforeRunTask( myRunConfiguration.getProject(), myRunConfiguration.getType().getId(), provider.getClass()); addTask(task); myListener.fireStepsBeforeRunChanged(); }); } }); } DataContext dataContext = SimpleDataContext.builder() .add(CommonDataKeys.PROJECT, myRunConfiguration.getProject()) .add(PlatformCoreDataKeys.CONTEXT_COMPONENT, myPanel) .build(); ListPopup popup = JBPopupFactory.getInstance().createActionGroupPopup(ExecutionBundle.message("add.new.before.run.task.name"), actionGroup, dataContext, false, false, false, null, -1, Conditions.alwaysTrue()); popup.show(Objects.requireNonNull(button.getPreferredPopupPoint())); } | doAddAction |
290,895 | void (@NotNull AnActionEvent e) { BeforeRunTask<?> task = provider.createTask(myRunConfiguration); if (task == null) { return; } provider.configureTask(button.getDataContext(), myRunConfiguration, task) .onSuccess(changed -> { if (!provider.canExecuteTask(myRunConfiguration, task)) { return; } task.setEnabled(true); Set<RunConfiguration> configurationSet = CollectionFactory.createSmallMemoryFootprintSet(); getAllRunBeforeRuns(task, configurationSet); if (configurationSet.contains(myRunConfiguration)) { JOptionPane.showMessageDialog(BeforeRunStepsPanel.this, ExecutionBundle.message("before.launch.panel.cyclic_dependency_warning", myRunConfiguration.getName(), provider.getDescription(task)), ExecutionBundle.message("warning.common.title"), JOptionPane.WARNING_MESSAGE); return; } RunConfigurationOptionUsagesCollector.logAddBeforeRunTask( myRunConfiguration.getProject(), myRunConfiguration.getType().getId(), provider.getClass()); addTask(task); myListener.fireStepsBeforeRunChanged(); }); } | actionPerformed |
290,896 | void (@NotNull BeforeRunTask<?> task) { myModel.add(task); } | addTask |
290,897 | void (@NotNull List<BeforeRunTask<?>> tasks) { myModel.replaceAll(tasks); } | replaceTasks |
290,898 | void (@NotNull BeforeRunTask<?> task, @NotNull Set<? super RunConfiguration> configurationSet) { if (task instanceof RunConfigurableBeforeRunTask) { RunConfiguration configuration = Objects.requireNonNull(((RunConfigurableBeforeRunTask)task).getSettings()).getConfiguration(); for (BeforeRunTask<?> beforeRunTask : RunManagerImplKt.doGetBeforeRunTasks(configuration)) { if (beforeRunTask instanceof RunConfigurableBeforeRunTask) { if (configurationSet.add(Objects.requireNonNull(((RunConfigurableBeforeRunTask)beforeRunTask).getSettings()).getConfiguration())) { getAllRunBeforeRuns(beforeRunTask, configurationSet); } } } } } | getAllRunBeforeRuns |
290,899 | Component (JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (value instanceof BeforeRunTask<?> task) { //noinspection rawtypes BeforeRunTaskProvider provider = getProvider(myRunConfiguration.getProject(), task.getProviderId()); if (provider == null) { provider = new UnknownBeforeRunTaskProvider(task.getProviderId().toString()); } //noinspection unchecked Icon icon = provider.getTaskIcon(task); setIcon(icon != null ? icon : provider.getIcon()); //noinspection unchecked setText(provider.getDescription(task)); } return this; } | getListCellRendererComponent |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.