Unnamed: 0
int64 0
305k
| body
stringlengths 7
52.9k
| name
stringlengths 1
185
|
|---|---|---|
295,300
|
boolean () { return true; }
|
isValid
|
295,301
|
P () { return myProperties; }
|
getProperties
|
295,302
|
S () { Object propertiesState = myProperties == null ? null : myProperties.getState(); Element element = propertiesState == null ? null : XmlSerializer.serialize(propertiesState); Element propertiesElement = element == null ? null : JDOMUtil.internElement(element); myState.setCondition(BreakpointState.Condition.create(!myConditionEnabled, myCondition)); myState.setLogExpression(BreakpointState.LogExpression.create(!myLogExpressionEnabled, myLogExpression)); myState.setPropertiesElement(propertiesElement); return myState; }
|
getState
|
295,303
|
XBreakpointDependencyState () { return myState.getDependencyState(); }
|
getDependencyState
|
295,304
|
void (XBreakpointDependencyState state) { myState.setDependencyState(state); }
|
setDependencyState
|
295,305
|
String () { return myState.getGroup(); }
|
getGroup
|
295,306
|
void (String group) { myState.setGroup(StringUtil.nullize(group)); }
|
setGroup
|
295,307
|
String () { return myState.getDescription(); }
|
getUserDescription
|
295,308
|
void (String description) { myState.setDescription(StringUtil.nullize(description)); }
|
setUserDescription
|
295,309
|
void () { myDisposed = true; doDispose(); }
|
dispose
|
295,310
|
void () { }
|
doDispose
|
295,311
|
boolean () { return myDisposed; }
|
isDisposed
|
295,312
|
String () { return "XBreakpointBase(type=" + myType + ")"; }
|
toString
|
295,313
|
GutterDraggableObject () { return null; }
|
createBreakpointDraggableObject
|
295,314
|
String () { StringBuilder builder = new StringBuilder(); builder.append(CommonXmlStrings.HTML_START).append(CommonXmlStrings.BODY_START); LineSeparator separator = new LineSeparator(builder); builder.append(StringUtil.escapeXmlEntities(XBreakpointUtil.getDisplayText(this))); String errorMessage = getErrorMessage(); if (!StringUtil.isEmpty(errorMessage)) { builder.append(separator.get()); builder.append("<font color='#").append(ColorUtil.toHex(JBColor.RED)).append("'>"); builder.append(errorMessage); builder.append("</font>"); } if (getSuspendPolicy() == SuspendPolicy.NONE) { builder.append(separator.get()).append(XDebuggerBundle.message("xbreakpoint.tooltip.suspend.policy.none")); } else if (getType().isSuspendThreadSupported()) { builder.append(separator.get()); //noinspection EnumSwitchStatementWhichMissesCases switch (getSuspendPolicy()) { case ALL -> builder.append(XDebuggerBundle.message("xbreakpoint.tooltip.suspend.policy.all")); case THREAD -> builder.append(XDebuggerBundle.message("xbreakpoint.tooltip.suspend.policy.thread")); } } String condition = getCondition(); if (!StringUtil.isEmpty(condition)) { builder.append(separator.get()); builder.append(XDebuggerBundle.message("xbreakpoint.tooltip.condition")); builder.append(CommonXmlStrings.NBSP); builder.append(XmlStringUtil.escapeString(condition)); } if (isLogMessage()) { builder.append(separator.get()).append(XDebuggerBundle.message("xbreakpoint.tooltip.log.message")); } if (isLogStack()) { builder.append(separator.get()).append(XDebuggerBundle.message("xbreakpoint.tooltip.log.stack")); } String logExpression = getLogExpression(); if (!StringUtil.isEmpty(logExpression)) { builder.append(separator.get()); builder.append(XDebuggerBundle.message("xbreakpoint.tooltip.log.expression")); builder.append(CommonXmlStrings.NBSP); builder.append(XmlStringUtil.escapeString(logExpression)); } XBreakpoint<?> masterBreakpoint = getBreakpointManager().getDependentBreakpointManager().getMasterBreakpoint(this); if (masterBreakpoint != null) { builder.append(separator.get()); String str = XDebuggerBundle.message("xbreakpoint.tooltip.depends.on"); builder.append(str); builder.append(CommonXmlStrings.NBSP); builder.append(XBreakpointUtil.getShortText(masterBreakpoint)); } builder.append(CommonXmlStrings.BODY_END).append(CommonXmlStrings.HTML_END); //noinspection HardCodedStringLiteral return builder.toString(); }
|
getDescription
|
295,315
|
void () { final Icon icon = calculateSpecialIcon(); setIcon(icon != null ? icon : getType().getEnabledIcon()); }
|
updateIcon
|
295,316
|
void (Icon icon) { if (!XDebuggerUtilImpl.isEmptyExpression(getConditionExpression())) { LayeredIcon newIcon = new LayeredIcon(2); newIcon.setIcon(icon, 0); int hShift = ExperimentalUI.isNewUI() ? 7 : 10; newIcon.setIcon(AllIcons.Debugger.Question_badge, 1, hShift, 6); myIcon = JBUIScale.scaleIcon(newIcon); } else { myIcon = icon; } }
|
setIcon
|
295,317
|
Icon () { XDebugSessionImpl session = getBreakpointManager().getDebuggerManager().getCurrentSession(); if (!isEnabled()) { // disabled icon takes precedence to other to visually distinguish it and provide feedback then it is enabled/disabled // (e.g. in case of mute-mode we would like to differentiate muted but enabled breakpoints from simply disabled ones) if (session == null || !session.areBreakpointsMuted()) { return getType().getDisabledIcon(); } else { return getType().getMutedDisabledIcon(); } } if (session == null) { if (getBreakpointManager().getDependentBreakpointManager().getMasterBreakpoint(this) != null) { return getType().getInactiveDependentIcon(); } } else { if (session.areBreakpointsMuted()) { return getType().getMutedEnabledIcon(); } if (session.isInactiveSlaveBreakpoint(this)) { return getType().getInactiveDependentIcon(); } CustomizedBreakpointPresentation presentation = session.getBreakpointPresentation(this); if (presentation != null) { Icon icon = presentation.getIcon(); if (icon != null) { return icon; } } } if (getSuspendPolicy() == SuspendPolicy.NONE) { return getType().getSuspendNoneIcon(); } if (myCustomizedPresentation != null) { final Icon icon = myCustomizedPresentation.getIcon(); if (icon != null) { return icon; } } return null; }
|
calculateSpecialIcon
|
295,318
|
Icon () { if (myIcon == null) { updateIcon(); } return myIcon; }
|
getIcon
|
295,319
|
String () { final XDebugSessionImpl currentSession = getBreakpointManager().getDebuggerManager().getCurrentSession(); if (currentSession != null) { CustomizedBreakpointPresentation presentation = currentSession.getBreakpointPresentation(this); if (presentation != null) { final String message = presentation.getErrorMessage(); if (message != null) return message; } } return myCustomizedPresentation != null ? myCustomizedPresentation.getErrorMessage() : null; }
|
getErrorMessage
|
295,320
|
void (CustomizedBreakpointPresentation presentation) { myCustomizedPresentation = presentation; }
|
setCustomizedPresentation
|
295,321
|
GutterIconRenderer () { return new BreakpointGutterIconRenderer(); }
|
createGutterIconRenderer
|
295,322
|
void () { myIcon = null; }
|
clearIcon
|
295,323
|
int (@NotNull Self self) { return myType.getBreakpointComparator().compare((Self)this, self); }
|
compareTo
|
295,324
|
Alignment () { return ExperimentalUI.isNewUI() && EditorUtil.isBreakPointsOnLineNumbers() ? Alignment.LINE_NUMBERS : Alignment.RIGHT; }
|
getAlignment
|
295,325
|
Icon () { return XBreakpointBase.this.getIcon(); }
|
getIcon
|
295,326
|
String () { // [tav] todo: add "hit" state return XDebuggerBundle.message("accessible.name.icon.0.1.2", getType().getTitle(), getCondition() != null ? " " + XDebuggerBundle.message("accessible.name.icon.conditional") : "", !isEnabled() ? " " + XDebuggerBundle.message("accessible.name.icon.disabled") : ""); }
|
getAccessibleName
|
295,327
|
AnAction () { if (Registry.is("debugger.click.disable.breakpoints")) { return new ToggleBreakpointGutterIconAction(XBreakpointBase.this); } else { return new RemoveBreakpointGutterIconAction(XBreakpointBase.this); } }
|
getClickAction
|
295,328
|
AnAction () { if (!Registry.is("debugger.click.disable.breakpoints")) { return new ToggleBreakpointGutterIconAction(XBreakpointBase.this); } else { return new RemoveBreakpointGutterIconAction(XBreakpointBase.this); } }
|
getMiddleButtonClickAction
|
295,329
|
AnAction () { return new EditBreakpointAction.ContextAction(this, XBreakpointBase.this, DebuggerSupport.getDebuggerSupport(XDebuggerSupport.class)); }
|
getRightButtonClickAction
|
295,330
|
ActionGroup () { return new DefaultActionGroup(getAdditionalPopupMenuActions(getBreakpointManager().getDebuggerManager().getCurrentSession())); }
|
getPopupMenuActions
|
295,331
|
String () { return getDescription(); }
|
getTooltipText
|
295,332
|
GutterDraggableObject () { return createBreakpointDraggableObject(); }
|
getDraggableObject
|
295,333
|
boolean (Object obj) { return obj instanceof XLineBreakpointImpl.BreakpointGutterIconRenderer && getBreakpoint() == ((XLineBreakpointImpl.BreakpointGutterIconRenderer)obj).getBreakpoint() && Comparing.equal(getIcon(), ((XLineBreakpointImpl.BreakpointGutterIconRenderer)obj).getIcon()); }
|
equals
|
295,334
|
int () { return getBreakpoint().hashCode(); }
|
hashCode
|
295,335
|
Icon () { // FIXME[inline-bp]: what about muted breakpoints? // FIXME[inline-bp]: what about disabled breakpoints? return AllIcons.Debugger.MultipleBreakpoints; }
|
getIcon
|
295,336
|
String () { // FIXME[inline-bp]: implement me? How to debug it? return super.getAccessibleName(); }
|
getAccessibleName
|
295,337
|
AnAction () { // This gutter's actions are not collected to any menu, so we use SimpleAction. return DumbAwareAction.create(e -> { for (var b : breakpoints) { b.setEnabled(!b.isEnabled()); } }); }
|
createToggleAction
|
295,338
|
AnAction () { // This gutter's actions are not collected to any menu, so we use SimpleAction. return DumbAwareAction.create(e -> { removeBreakpoints(); }); }
|
createRemoveAction
|
295,339
|
void () { for (var b : breakpoints) { // FIXME[inline-bp]: check it. Maybe we should have single confirmation for all breakpoints. // Also it would help to restore them. See XBreakpointManagerImpl.restoreLastRemovedBreakpoint. XDebuggerUtilImpl.removeBreakpointWithConfirmation(b); } }
|
removeBreakpoints
|
295,340
|
AnAction () { if (Registry.is("debugger.click.disable.breakpoints")) { return createToggleAction(); } else { return createRemoveAction(); } }
|
getClickAction
|
295,341
|
AnAction () { if (!Registry.is("debugger.click.disable.breakpoints")) { return createToggleAction(); } else { return createRemoveAction(); } }
|
getMiddleButtonClickAction
|
295,342
|
AnAction () { // This gutter's actions are not collected to any menu, so we use SimpleAction. return DumbAwareAction.create(e -> { var project = e.getProject(); if (project == null) return; // Initially we select the newest breakpoint, it's shown above other breakpoints in the dialog. @SuppressWarnings("OptionalGetWithoutIsPresent") // there are always at least two breakpoints var initialOne = breakpoints.stream().sorted().findFirst().get(); BreakpointsDialogFactory.getInstance(project).showDialog(initialOne); }); }
|
getRightButtonClickAction
|
295,343
|
ActionGroup () { // TODO[inline-bp]: show some menu with the list of all breakpoints with some actions for them (remove, edit, ...) // TODO[inline-bp]: alt+enter actions are completely broken for multiple breakpoints: // all actions are mixed and it's hard to separate them // and it's non trivial to add batch actions "toggle all", "remove all", ... // see GutterIntentionMenuContributor.collectActions. // Moreover it might be a good idea to show breakpoint actions on alt+enter only if cursor is in breakpoint's range return super.getPopupMenuActions(); }
|
getPopupMenuActions
|
295,344
|
String () { // FIXME[inline-bp]: implement me return super.getTooltipText(); }
|
getTooltipText
|
295,345
|
GutterDraggableObject () { return new GutterDraggableObject() { @Override public boolean copy(int line, VirtualFile file, int actionId) { return false; // It's too hard, no copying, please. } @Override public void remove() { removeBreakpoints(); } }; }
|
getDraggableObject
|
295,346
|
boolean (int line, VirtualFile file, int actionId) { return false; // It's too hard, no copying, please. }
|
copy
|
295,347
|
void () { removeBreakpoints(); }
|
remove
|
295,348
|
boolean (Object obj) { return obj instanceof MultipleBreakpointGutterIconRenderer that && this.breakpoints.equals(that.breakpoints); }
|
equals
|
295,349
|
int () { return breakpoints.hashCode(); }
|
hashCode
|
295,350
|
List<GutterMark> (@NotNull List<GutterMark> marks) { // In general, it seems ok to merge breakpoints because they are drawn one over another in the new UI. // But we disable it in the old mode just for ease of regressions debugging. if (!XDebuggerUtil.areInlineBreakpointsEnabled()) return marks; var breakpointCount = ContainerUtil.count(marks, m -> m instanceof CommonBreakpointGutterIconRenderer); if (breakpointCount <= 1) { return marks; } var newMarks = new ArrayList<GutterMark>(marks.size() - breakpointCount + 1); var breakpoints = new ArrayList<XBreakpointBase<?, ?, ?>>(breakpointCount); var breakpointMarkPosition = -1; for (GutterMark mark : marks) { assert !(mark instanceof MultipleBreakpointGutterIconRenderer) : "they are not expected to be created before processing"; if (mark instanceof XBreakpointBase<?,?,?>.BreakpointGutterIconRenderer singleBreakpointMark) { breakpoints.add(singleBreakpointMark.getBreakpoint()); breakpointMarkPosition = newMarks.size(); continue; } newMarks.add(mark); } // FIXME[inline-bp]: do we need to cache this instance? newMarks.add(breakpointMarkPosition, new MultipleBreakpointGutterIconRenderer(breakpoints)); return newMarks; }
|
processMarkers
|
295,351
|
boolean () { return myEnabled; }
|
isEnabled
|
295,352
|
void (final boolean enabled) { myEnabled = enabled; }
|
setEnabled
|
295,353
|
String () { return myTypeId; }
|
getTypeId
|
295,354
|
void (final String typeId) { myTypeId = typeId; }
|
setTypeId
|
295,355
|
Element () { return myPropertiesElement; }
|
getPropertiesElement
|
295,356
|
void (final Element propertiesElement) { myPropertiesElement = propertiesElement; }
|
setPropertiesElement
|
295,357
|
String () { return mySuspendPolicy.name(); }
|
getSuspendPolicyString
|
295,358
|
void (final String suspendPolicy) { mySuspendPolicy = SuspendPolicy.valueOf(suspendPolicy); }
|
setSuspendPolicyString
|
295,359
|
SuspendPolicy () { return mySuspendPolicy; }
|
getSuspendPolicy
|
295,360
|
void (SuspendPolicy suspendPolicy) { mySuspendPolicy = suspendPolicy; }
|
setSuspendPolicy
|
295,361
|
boolean () { return myLogMessage; }
|
isLogMessage
|
295,362
|
void (final boolean logMessage) { myLogMessage = logMessage; }
|
setLogMessage
|
295,363
|
boolean () { return myLogStack; }
|
isLogStack
|
295,364
|
void (final boolean logStack) { myLogStack = logStack; }
|
setLogStack
|
295,365
|
String () { return myGroup; }
|
getGroup
|
295,366
|
void (String group) { myGroup = group; }
|
setGroup
|
295,367
|
String () { return myDescription; }
|
getDescription
|
295,368
|
void (String description) { myDescription = description; }
|
setDescription
|
295,369
|
LogExpression () { return myLogExpression; }
|
getLogExpression
|
295,370
|
void (@Nullable LogExpression logExpression) { if (logExpression != null) { logExpression.checkConverted(); } myLogExpression = logExpression; }
|
setLogExpression
|
295,371
|
Condition () { return myCondition; }
|
getCondition
|
295,372
|
void (@Nullable Condition condition) { if (condition != null) { condition.checkConverted(); } myCondition = condition; }
|
setCondition
|
295,373
|
boolean () { return myLogExpression == null || !myLogExpression.myDisabled; }
|
isLogExpressionEnabled
|
295,374
|
boolean () { return myCondition == null || !myCondition.myDisabled; }
|
isConditionEnabled
|
295,375
|
XBreakpointDependencyState () { return myDependencyState; }
|
getDependencyState
|
295,376
|
void (final XBreakpointDependencyState dependencyState) { myDependencyState = dependencyState; }
|
setDependencyState
|
295,377
|
long () { return myTimeStamp; }
|
getTimeStamp
|
295,378
|
void (long timeStamp) { myTimeStamp = timeStamp; }
|
setTimeStamp
|
295,379
|
Condition (boolean disabled, XExpression expression) { if (XDebuggerUtilImpl.isEmptyExpression(expression)) { return null; } return new Condition(disabled, expression); }
|
create
|
295,380
|
LogExpression (boolean disabled, XExpression expression) { if (XDebuggerUtilImpl.isEmptyExpression(expression)) { return null; } return new LogExpression(disabled, expression); }
|
create
|
295,381
|
void (@NotNull final AnActionEvent e) { myBreakpoint.setEnabled(!myBreakpoint.isEnabled()); }
|
actionPerformed
|
295,382
|
void (@Nullable Icon icon) { myIcon = icon; }
|
setIcon
|
295,383
|
void (@Nullable String errorMessage) { myErrorMessage = errorMessage; }
|
setErrorMessage
|
295,384
|
Icon () { return myIcon; }
|
getIcon
|
295,385
|
String () { return myErrorMessage; }
|
getErrorMessage
|
295,386
|
long () { return myTimestamp; }
|
getTimestamp
|
295,387
|
void (long timestamp) { myTimestamp = timestamp; }
|
setTimestamp
|
295,388
|
void (@NotNull final AnActionEvent e) { InputEvent event = e.getInputEvent(); // for mouse events check that no modifiers applied if (!(event instanceof MouseEvent) || event.getModifiersEx() == 0 || SwingUtilities.isMiddleMouseButton((MouseEvent)event)) { XDebuggerUtilImpl.removeBreakpointWithConfirmation(myBreakpoint); } XDebuggerUtilImpl.reshowInlayRunToCursor(e); }
|
actionPerformed
|
295,389
|
StreamEx<XBreakpointType> () { return StreamEx.of(XBreakpointType.EXTENSION_POINT_NAME.getExtensionList()); }
|
breakpointTypes
|
295,390
|
List<BreakpointPanelProvider> () { List<BreakpointPanelProvider> panelProviders = new ArrayList<>(); for (DebuggerSupport debuggerSupport : DebuggerSupport.getDebuggerSupports()) { panelProviders.add(debuggerSupport.getBreakpointPanelProvider()); } panelProviders.sort((o1, o2) -> o2.getPriority() - o1.getPriority()); return panelProviders; }
|
collectPanelProviders
|
295,391
|
DebuggerSupport (Project project, BreakpointItem breakpointItem) { DebuggerSupport[] debuggerSupports = DebuggerSupport.getDebuggerSupports(); List<BreakpointItem> items = new ArrayList<>(); for (DebuggerSupport support : debuggerSupports) { support.getBreakpointPanelProvider().provideBreakpointItems(project, items); if (items.contains(breakpointItem)) { return support; } items.clear(); } return null; }
|
getDebuggerSupport
|
295,392
|
List<XLineBreakpointType> (@NotNull Project project, @NotNull XSourcePosition position, @Nullable Editor editor) { return getAvailableLineBreakpointInfo(project, position, editor).first; }
|
getAvailableLineBreakpointTypes
|
295,393
|
void (@NotNull XBreakpointType type, @NotNull PluginDescriptor pluginDescriptor) { //the project may be 'temporarily disposed' in tests if this class was created from a light test if (project.isDisposed()) return; var breakpoint = createDefaultBreakpoint(type); if (breakpoint != null) { addBreakpoint(breakpoint, true, false); } }
|
extensionAdded
|
295,394
|
void (@NotNull XBreakpointType type, @NotNull PluginDescriptor pluginDescriptor) { withLockMaybeCancellable(myLock, () -> { //noinspection unchecked for (Object b : getBreakpoints(type)) { XBreakpoint<?> breakpoint = (XBreakpoint<?>)b; doRemoveBreakpointImpl(breakpoint, isDefaultBreakpoint(breakpoint)); } myBreakpointsDefaults.remove(type); myDefaultBreakpoints.remove(type); }); }
|
extensionRemoved
|
295,395
|
void () { Project project = myProject; if (!project.isDefault()) { if (!ApplicationManager.getApplication().isUnitTestMode()) { HttpFileSystem.getInstance().addFileListener(this::updateBreakpointInHttpFile, project); } } }
|
init
|
295,396
|
void (final VirtualFile file) { ReadAction .nonBlocking(() -> changedBreakpoints(file)) .coalesceBy(Pair.create(this, file)) .expireWith(myProject) .finishOnUiThread(ModalityState.defaultModalityState(), this::fireBreakpointsChanged) .submit(myHttpBreakpointUpdater); }
|
updateBreakpointInHttpFile
|
295,397
|
XLineBreakpointManager () { return myLineBreakpointManager; }
|
getLineBreakpointManager
|
295,398
|
XDependentBreakpointManager () { return myDependentBreakpointManager; }
|
getDependentBreakpointManager
|
295,399
|
XDebuggerManagerImpl () { return myDebuggerManager; }
|
getDebuggerManager
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.