Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
295,100 | void (@NotNull List<? extends AttachItem> items) { if (items.isEmpty()) { return; } items.get(0).makeFirstInGroup(); for (int i = 1; i < items.size(); i++) { if (items.get(i).getGroup() != items.get(i - 1).getGroup()) { items.get(i).makeFirstInGroup(); } } } | doUpdateFirstInGroup |
295,101 | List<AttachItem> (@NotNull final Project project, @NotNull ProgressIndicator indicator) { List<AttachItem> currentItems = new ArrayList<>(); UserDataHolderBase dataHolder = new UserDataHolderBase(); for (XAttachHostProvider hostProvider : getAvailableHosts()) { indicator.checkCanceled(); //noinspection unchecked Set<XAttachHost> hosts = new HashSet<>(hostProvider.getAvailableHosts(project)); for (XAttachHost host : hosts) { //noinspection unchecked currentItems.add(new AttachHostItem(hostProvider.getPresentationGroup(), false, host, project, dataHolder)); } } //noinspection unchecked Collections.sort(currentItems); doUpdateFirstInGroup(currentItems); return currentItems; } | collectAttachHostsItems |
295,102 | List<AttachToProcessItem> (@NotNull List<? extends AttachToProcessItem> currentItems, @NotNull XAttachHost host, @NotNull Project project, @NotNull UserDataHolder dataHolder) { final List<AttachToProcessItem> result = new ArrayList<>(); final List<RecentItem> recentItems = getRecentItems(host, project); for (int i = recentItems.size() - 1; i >= 0; i--) { RecentItem recentItem = recentItems.get(i); result.addAll(ApplicationManager.getApplication().getService(XAttachRecentItemsMatcher.class) .getMatchingAttachItems(recentItem, currentItems, result.isEmpty(), project, dataHolder)); } return result; } | getRecentItems |
295,103 | List<ProcessInfo> (@NotNull XAttachHost host) { try { return host.getProcessList(); } catch (ExecutionException e) { Notifications.Bus.notify(new Notification( "Attach to Process action", XDebuggerBundle.message("xdebugger.attach.action.items.error.title"), XDebuggerBundle.message("xdebugger.attach.action.items.error.message"), NotificationType.WARNING)); LOG.warn("Error getting process list from the host " + host + ": " + e.getMessage()); return Collections.emptyList(); } } | getProcessInfos |
295,104 | List<XAttachDebuggerProvider> (@NotNull XAttachHost host) { return ContainerUtil.filter(myAttachProvidersSupplier.get(), provider -> provider.isAttachHostApplicable(host)); } | getProvidersApplicableForHost |
295,105 | List<AttachToProcessItem> (@NotNull final Project project, @NotNull XAttachHost host, @NotNull ProgressIndicator indicator) { return doCollectAttachProcessItems(project, host, getProcessInfos(host), indicator, getProvidersApplicableForHost(host)); } | collectAttachProcessItems |
295,106 | List<AttachToProcessItem> (@NotNull final Project project, @NotNull XAttachHost host, @NotNull List<? extends ProcessInfo> processInfos, @NotNull ProgressIndicator indicator, @NotNull List<? extends XAttachDebuggerProvider> providers) { UserDataHolderBase dataHolder = new UserDataHolderBase(); List<AttachToProcessItem> currentItems = new ArrayList<>(); for (ProcessInfo process : processInfos) { MultiMap<XAttachPresentationGroup<ProcessInfo>, XAttachDebugger> groupsWithDebuggers = new MultiMap<>(); for (XAttachDebuggerProvider provider : providers) { indicator.checkCanceled(); groupsWithDebuggers.putValues(provider.getPresentationGroup(), provider.getAvailableDebuggers(project, host, process, dataHolder)); } for (XAttachPresentationGroup<ProcessInfo> group : groupsWithDebuggers.keySet()) { Collection<XAttachDebugger> debuggers = groupsWithDebuggers.get(group); if (!debuggers.isEmpty()) { currentItems.add(new AttachToProcessItem(group, false, host, process, new ArrayList<>(debuggers), project, dataHolder)); } } } Collections.sort(currentItems); doUpdateFirstInGroup(currentItems); List<AttachToProcessItem> result = getRecentItems(currentItems, host, project, dataHolder); result.addAll(currentItems); return result; } | doCollectAttachProcessItems |
295,107 | void (@NotNull Project project, @NotNull AttachToProcessItem item) { Map<XAttachHost, LinkedHashSet<RecentItem>> recentItems = project.getUserData(RECENT_ITEMS_KEY); if (recentItems == null) { project.putUserData(RECENT_ITEMS_KEY, recentItems = new HashMap<>()); } XAttachHost host = item.getHost(); LinkedHashSet<RecentItem> hostRecentItems = recentItems.get(host); if (hostRecentItems == null) { recentItems.put(host, new LinkedHashSet<>()); hostRecentItems = recentItems.get(host); } final RecentItem newRecentItem = new RecentItem(host, item); hostRecentItems.remove(newRecentItem); hostRecentItems.add(newRecentItem); while (hostRecentItems.size() > 4) { hostRecentItems.remove(hostRecentItems.iterator().next()); } } | addToRecent |
295,108 | List<RecentItem> (@NotNull XAttachHost host, @NotNull Project project) { Map<XAttachHost, LinkedHashSet<RecentItem>> recentItems = project.getUserData(RECENT_ITEMS_KEY); return recentItems == null || !recentItems.containsKey(host) ? Collections.emptyList() : List.copyOf(recentItems.get(host)); } | getRecentItems |
295,109 | RecentItem (@NotNull XAttachHost host, @NotNull ProcessInfo info, @NotNull XAttachPresentationGroup group, @NotNull String debuggerName) { return new RecentItem(host, info, group, debuggerName); } | createRecentItem |
295,110 | XAttachHost () { return myHost; } | getHost |
295,111 | ProcessInfo () { return myProcessInfo; } | getProcessInfo |
295,112 | XAttachPresentationGroup () { return myGroup; } | getGroup |
295,113 | String () { return myDebuggerName; } | getDebuggerName |
295,114 | Instant () { return myRecentItemCreationTime; } | getRecentItemCreationTime |
295,115 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RecentItem item = (RecentItem)o; return Objects.equals(myProcessInfo.getCommandLine(), item.myProcessInfo.getCommandLine()); } | equals |
295,116 | int () { return Objects.hash(myProcessInfo.getCommandLine()); } | hashCode |
295,117 | XAttachPresentationGroup<T> () { return myGroup; } | getGroup |
295,118 | UserDataHolder () { return myDataHolder; } | getDataHolder |
295,119 | Icon (@NotNull Project project) { return myGroup.getItemIcon(project, myInfo, myDataHolder); } | getIcon |
295,120 | int (AttachItem<T> compareItem) { int groupDifference = myGroup.getOrder() - compareItem.getGroup().getOrder(); if (groupDifference != 0) { return groupDifference; } return myGroup.compare(myInfo, compareItem.myInfo); } | compareTo |
295,121 | boolean () { return true; } | hasSubStep |
295,122 | String (@NotNull Project project) { return myGroup.getItemDisplayText(project, myInfo, myDataHolder); } | getText |
295,123 | String (@NotNull Project project) { return myGroup.getItemDescription(project, myInfo, myDataHolder); } | getTooltipText |
295,124 | List<AttachToProcessItem> () { return collectAttachProcessItems(myProject, myInfo, new EmptyProgressIndicator()); } | getSubItems |
295,125 | AttachToProcessItem (AttachToProcessItem item, boolean isFirstInGroup, List<XAttachDebugger> debuggers, int selectedDebugger, Project project, UserDataHolder dataHolder) { return new AttachToProcessItem(item.getGroup(), isFirstInGroup, XDebuggerBundle.message("xdebugger.attach.toLocal.popup.recent"), item.getHost(), item.getProcessInfo(), debuggers, selectedDebugger, project, dataHolder); } | createRecentAttachItem |
295,126 | ProcessInfo () { return myInfo; } | getProcessInfo |
295,127 | XAttachHost () { return myHost; } | getHost |
295,128 | boolean () { return !mySubItems.isEmpty(); } | hasSubStep |
295,129 | String (@NotNull Project project) { return myGroup.getItemDescription(project, myInfo, myDataHolder); } | getTooltipText |
295,130 | String (@NotNull Project project) { String shortenedText = StringUtil.shortenTextWithEllipsis(myGroup.getItemDisplayText(project, myInfo, myDataHolder), 200, 0); int pid = myInfo.getPid(); return (pid == -1 ? "" : pid + " ") + shortenedText; } | getText |
295,131 | List<XAttachDebugger> () { return myDebuggers; } | getDebuggers |
295,132 | List<AttachToProcessItem> () { return mySubItems; } | getSubItems |
295,133 | XAttachDebugger () { return myDebuggers.get(mySelectedDebugger); } | getSelectedDebugger |
295,134 | void (@NotNull Project project) { XAttachDebugger debugger = getSelectedDebugger(); try { debugger.attachDebugSession(project, myHost, myInfo); } catch (ExecutionException e) { final String message = XDebuggerBundle.message("xdebugger.attach.pid", myInfo.getPid()); ExecutionUtil.handleExecutionError(project, ToolWindowId.DEBUG, message, e); } } | startDebugSession |
295,135 | boolean () { return true; } | isSpeedSearchEnabled |
295,136 | boolean () { return false; } | isAutoSelectionEnabled |
295,137 | boolean (AttachItem selectedValue) { return !selectedValue.getSubItems().isEmpty(); } | hasSubstep |
295,138 | PopupStep (T selectedValue, boolean finalChoice) { return null; } | onChosen |
295,139 | ListSeparator (AttachItem value) { String separatorTitle = value.getSeparatorTitle(); return separatorTitle == null ? null : new ListSeparator(separatorTitle); } | getSeparatorAbove |
295,140 | Icon (AttachItem value) { return value.getIcon(myProject); } | getIconFor |
295,141 | String (AttachItem value) { return value.getText(myProject); } | getTextFor |
295,142 | boolean (AttachItem selectedValue) { return selectedValue.hasSubStep(); } | hasSubstep |
295,143 | String (AttachItem value) { return value.getTooltipText(myProject); } | getTooltipTextFor |
295,144 | void (@NotNull StatusText emptyText) { emptyText.setText(XDebuggerBundle.message("xdebugger.attach.popup.emptyText")); } | setEmptyText |
295,145 | PopupStep (AttachItem selectedValue, boolean finalChoice) { if (selectedValue instanceof AttachToProcessItem attachToProcessItem) { if (finalChoice) { addToRecent(myProject, attachToProcessItem); return doFinalStep(() -> attachToProcessItem.startDebugSession(myProject)); } else { return new ActionListStep(attachToProcessItem.getSubItems(), attachToProcessItem.mySelectedDebugger); } } if (selectedValue instanceof AttachHostItem attachHostItem) { AsyncPromise<PopupStep> promise = new AsyncPromise<>(); ApplicationManager.getApplication().executeOnPooledThread(() -> { List<AttachItem> attachItems = new ArrayList<>(attachHostItem.getSubItems()); ApplicationManager.getApplication().invokeLater(() -> promise.setResult(new AttachListStep(attachItems, null, myProject))); }); return new AsyncPopupStep(promise); } return null; } | onChosen |
295,146 | boolean (AttachItem value) { return value instanceof AttachToProcessItem; } | isFinal |
295,147 | String (AttachToProcessItem value) { return value.getSelectedDebugger().getDebuggerDisplayName(); } | getTextFor |
295,148 | PopupStep (AttachToProcessItem selectedValue, boolean finalChoice) { addToRecent(myProject, selectedValue); return doFinalStep(() -> selectedValue.startDebugSession(myProject)); } | onChosen |
295,149 | DebuggerActionHandler (@NotNull final DebuggerSupport debuggerSupport) { return debuggerSupport.getPauseHandler(); } | getHandler |
295,150 | boolean (AnActionEvent event) { if (!isPauseResumeMerged()) { return super.isHidden(event); } Project project = event.getProject(); if (project == null) { return false; } XDebugSession session = DebuggerUIUtil.getSession(event); if (session == null || session.isStopped()) { return false; } return super.isHidden(event) || session.isPaused(); } | isHidden |
295,151 | boolean () { return Registry.is("debugger.merge.pause.and.resume"); } | isPauseResumeMerged |
295,152 | void (@NotNull AnActionEvent e) { final Editor editor = e.getData(CommonDataKeys.EDITOR); Project project = getEventProject(e); if (editor == null || project == null) return; myDebuggerSupport.getEditBreakpointAction().editBreakpoint(project, editor, myBreakpoint, myRenderer); } | actionPerformed |
295,153 | DebuggerActionHandler (@NotNull DebuggerSupport debuggerSupport) { return debuggerSupport.getEditBreakpointAction(); } | getHandler |
295,154 | DebuggerActionHandler (@NotNull final DebuggerSupport debuggerSupport) { return debuggerSupport.getSmartStepIntoHandler(); } | getHandler |
295,155 | DebuggerActionHandler (@NotNull final DebuggerSupport debuggerSupport) { return debuggerSupport.getToggleLineBreakpointHandler(); } | getHandler |
295,156 | void (@NotNull AnActionEvent event) { super.update(event); if (ActionPlaces.TOUCHBAR_GENERAL.equals(event.getPlace())) event.getPresentation().setIcon(AllIcons.Debugger.Db_set_breakpoint); final boolean selected = hasLineBreakpoint(event); Toggleable.setSelected(event.getPresentation(), selected); } | update |
295,157 | ActionUpdateThread () { return super.getActionUpdateThread(); } | getActionUpdateThread |
295,158 | boolean (@NotNull AnActionEvent e) { final Project proj = e.getProject(); if (proj == null) return false; final XLineBreakpointType<?>[] breakpointTypes = XDebuggerUtil.getInstance().getLineBreakpointTypes(); final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(proj).getBreakpointManager(); for (XSourcePosition position : getAllPositionsForBreakpoints(proj, e.getDataContext())) { for (XLineBreakpointType<?> breakpointType : breakpointTypes) { final VirtualFile file = position.getFile(); final int line = position.getLine(); if (breakpointManager.findBreakpointAtLine(breakpointType, file, line) != null) { return true; } } } return false; } | hasLineBreakpoint |
295,159 | Collection<XSourcePosition> (@NotNull Project project, DataContext context) { Editor editor = XDebuggerUtilImpl.getEditor(project, context); if (editor == null) { return Collections.emptyList(); } VirtualFile file = FileDocumentManager.getInstance().getFile(editor.getDocument()); List<XSourcePosition> res = new SmartList<>(); Integer line = XLineBreakpointManager.BREAKPOINT_LINE_KEY.getData(context); if (line != null) { XSourcePositionImpl position = XSourcePositionImpl.create(file, line); res.add(position); return res; } for (Caret caret : editor.getCaretModel().getAllCarets()) { XSourcePositionImpl position = XSourcePositionImpl.createByOffset(file, caret.getOffset()); if (position != null) { res.add(position); } } return res; } | getAllPositionsForBreakpoints |
295,160 | DebuggerActionHandler (@NotNull DebuggerSupport debuggerSupport) { return debuggerSupport.getEvaluateInConsoleActionHandler(); } | getHandler |
295,161 | DebuggerActionHandler (@NotNull final DebuggerSupport debuggerSupport) { return debuggerSupport.getRunToCursorHandler(); } | getHandler |
295,162 | boolean (@NotNull AnActionEvent e) { return XDebuggerSettingManagerImpl.getInstanceImpl().getDataViewSettings().isShowValuesInline(); } | isSelected |
295,163 | void (@NotNull AnActionEvent e, boolean state) { XDebuggerSettingManagerImpl.getInstanceImpl().getDataViewSettings().setShowValuesInline(state); XDebuggerUtilImpl.rebuildAllSessionsViews(e.getProject()); } | setSelected |
295,164 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
295,165 | boolean (@NotNull Project project, AnActionEvent event) { return false; } | isHidden |
295,166 | void (@NotNull AnActionEvent e) { DataContext dataContext = e.getDataContext(); Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project == null) return; if (myInitialBreakpoint == null) { Editor editor = CommonDataKeys.EDITOR.getData(dataContext); if (editor != null) { myInitialBreakpoint = XBreakpointUtil.findSelectedBreakpoint(project, editor).second; } } BreakpointsDialogFactory.getInstance(project).showDialog(myInitialBreakpoint); myInitialBreakpoint = null; } | actionPerformed |
295,167 | void (@NotNull AnActionEvent event) { event.getPresentation().setEnabled(event.getProject() != null); } | update |
295,168 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
295,169 | void (@NotNull final AnActionEvent e) { super.update(e); Presentation presentation = e.getPresentation(); Object isSupported = presentation.getClientProperty(IS_LIBRARY_FRAME_FILTER_SUPPORTED); XDebugSession session = e.getData(XDebugSession.DATA_KEY); if (isSupported == null) { if (session == null) { // if session is null and isSupported is null - just return, it means that action created initially not in the xdebugger tab presentation.setVisible(false); return; } isSupported = session.getDebugProcess().isLibraryFrameFilterSupported(); presentation.putClientProperty(IS_LIBRARY_FRAME_FILTER_SUPPORTED, isSupported); } if (Boolean.TRUE.equals(isSupported)) { presentation.setVisible(true); final boolean shouldShow = !Toggleable.isSelected(presentation); presentation.setText(XDebuggerBundle.message(shouldShow ? "hide.library.frames.tooltip" : "show.all.frames.tooltip")); } else { presentation.setVisible(false); } } | update |
295,170 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
295,171 | boolean (@NotNull AnActionEvent e) { return !myShouldShow; } | isSelected |
295,172 | void (@NotNull AnActionEvent e, boolean enabled) { myShouldShow = !enabled; XDebuggerSettingManagerImpl.getInstanceImpl().getDataViewSettings().setShowLibraryStackFrames(myShouldShow); XDebuggerUtilImpl.rebuildAllSessionsViews(e.getProject()); } | setSelected |
295,173 | DebuggerActionHandler (@NotNull final DebuggerSupport debuggerSupport) { return new QuickEvaluateHandlerWrapper(debuggerSupport.getQuickEvaluateHandler()); } | getHandler |
295,174 | void (@NotNull final Project project, final AnActionEvent event) { Editor editor = event.getData(CommonDataKeys.EDITOR); if (editor != null) { LogicalPosition logicalPosition = editor.getCaretModel().getLogicalPosition(); ValueLookupManager.getInstance(project). showHint(myHandler, editor, editor.logicalPositionToXY(logicalPosition), null, ValueHintType.MOUSE_CLICK_HINT); } } | perform |
295,175 | boolean (@NotNull final Project project, final AnActionEvent event) { if (!myHandler.isEnabled(project, event)) { return false; } Editor editor = event.getData(CommonDataKeys.EDITOR); if (editor == null) { return false; } if (event.getData(EditorGutter.KEY) != null) { return false; } return true; } | isEnabled |
295,176 | DebuggerActionHandler (@NotNull final DebuggerSupport debuggerSupport) { return debuggerSupport.getForceRunToCursorHandler(); } | getHandler |
295,177 | boolean (@Nullable final XDebugSession session, final AnActionEvent event) { if (session instanceof XDebugSessionImpl) { return !((XDebugSessionImpl)session).isReadOnly(); } return true; } | isEnabled |
295,178 | boolean (@Nullable final XDebugSession session, final AnActionEvent event) { if (session != null) { return session.areBreakpointsMuted(); } else { XDebugSessionData data = event.getData(XDebugSessionData.DATA_KEY); if (data != null) { return data.isBreakpointsMuted(); } } return false; } | isSelected |
295,179 | void (@Nullable final XDebugSession session, final AnActionEvent event, final boolean state) { if (session != null) { session.setBreakpointMuted(state); } else { XDebugSessionData data = event.getData(XDebugSessionData.DATA_KEY); if (data != null) { data.setBreakpointsMuted(state); } } } | setSelected |
295,180 | boolean (final @NotNull XDebugSession session, final DataContext dataContext) { return super.isEnabled(session, dataContext) && XDebuggerUtilImpl.getCaretPosition(session.getProject(), dataContext) != null; } | isEnabled |
295,181 | void (@NotNull final XDebugSession session, final DataContext dataContext) { XSourcePosition position = XDebuggerUtilImpl.getCaretPosition(session.getProject(), dataContext); if (position != null) { session.runToPosition(position, myIgnoreBreakpoints); } } | perform |
295,182 | boolean (@NotNull final Project project, final AnActionEvent event) { XDebugSession session = DebuggerUIUtil.getSession(event); return isEnabled(session, event); } | isEnabled |
295,183 | boolean (@NotNull final Project project, final AnActionEvent event) { XDebugSession session = DebuggerUIUtil.getSession(event); return isSelected(session, event); } | isSelected |
295,184 | void (@NotNull final Project project, final AnActionEvent event, final boolean state) { XDebugSession session = DebuggerUIUtil.getSession(event); setSelected(session, event, state); } | setSelected |
295,185 | void (@NotNull AnActionEvent e) { Project project = e.getRequiredData(CommonDataKeys.PROJECT); Editor editor = e.getRequiredData(CommonDataKeys.EDITOR); XSourcePosition position = getLineBreakpointPosition(e); assert position != null; XBreakpointUtil.toggleLineBreakpoint(project, position, editor, false, true, true) .onSuccess(bp -> { if (bp != null && isConditional()) { EditorGutterComponentEx gutter = (EditorGutterComponentEx)editor.getGutter(); int x = -gutter.getWidth() + gutter.getLineNumberAreaOffset() + gutter.getLineNumberAreaWidth() / 2; int y = editor.offsetToXY(position.getOffset()).y + editor.getLineHeight() / 2; DebuggerUIUtil.showXBreakpointEditorBalloon(project, new Point(x, y), editor.getContentComponent(), false, bp); } }); } | actionPerformed |
295,186 | void (@NotNull AnActionEvent e) { e.getPresentation().setEnabledAndVisible(ExperimentalUI.isNewUI() && getLineBreakpointPosition(e) != null); } | update |
295,187 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
295,188 | boolean () { return false; } | isConditional |
295,189 | boolean () { return true; } | isConditional |
295,190 | boolean (@NotNull XDebugSession session, DataContext dataContext) { return super.isEnabled(session, dataContext) && session.getDebugProcess().getSmartStepIntoHandler() != null; } | isEnabled |
295,191 | void (@NotNull XDebugSession session, DataContext dataContext) { XSmartStepIntoHandler<?> handler = session.getDebugProcess().getSmartStepIntoHandler(); XSourcePosition position = session.getTopFramePosition(); if (position != null && handler != null) { FileEditor editor = FileEditorManager.getInstance(session.getProject()).getSelectedEditor(position.getFile()); if (editor instanceof TextEditor) { doSmartStepInto(handler, position, session, ((TextEditor)editor).getEditor()); return; } } session.stepInto(); } | perform |
295,192 | Icon (V aValue) { return aValue.getIcon(); } | getIconFor |
295,193 | String (V value) { return value.getText(); } | getTextFor |
295,194 | PopupStep (V selectedValue, boolean finalChoice) { session.smartStepInto(handler, selectedValue); highlighter.dropHighlight(); return FINAL_CHOICE; } | onChosen |
295,195 | void () { highlighter.dropHighlight(); super.canceled(); } | canceled |
295,196 | void (ListSelectionEvent e) { if (!e.getValueIsAdjusting()) { Object selectedValue = ObjectUtils.doIfCast(e.getSource(), JBList.class, it -> it.getSelectedValue()); highlightVariant(ObjectUtils.tryCast(selectedValue, XSmartStepIntoVariant.class), highlighter); } } | valueChanged |
295,197 | void (@Nullable XSmartStepIntoVariant variant, @NotNull ScopeHighlighter highlighter) { TextRange range = variant != null ? variant.getHighlightRange() : null; if (range != null) { highlighter.highlight(Pair.create(range, Collections.singletonList(range))); } } | highlightVariant |
295,198 | void () { onAnyEvent(); } | sessionPaused |
295,199 | void () { onAnyEvent(); } | sessionResumed |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.