Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
242,200
void () { myAccumulateViewportChanges = false; if (myAccumulatedXOffset >= 0 && myAccumulatedYOffset >= 0) { scroll(myAccumulatedXOffset, myAccumulatedYOffset); myAccumulatedXOffset = myAccumulatedYOffset = -1; cancelAnimatedScrolling(true); } }
flushViewportChanges
242,201
void (ScrollRequestListener scrollRequestListener, Disposable parentDisposable) { myScrollRequestListeners.add(scrollRequestListener); Disposer.register(parentDisposable, () -> myScrollRequestListeners.remove(scrollRequestListener)); }
addScrollRequestListener
242,202
void (boolean scrollToTarget) { finish(scrollToTarget); }
cancel
242,203
void (boolean scrollToTarget) { if (scrollToTarget || !myPostRunnables.isEmpty()) { _scrollHorizontally(myEndHOffset); _scrollVertically(myEndVOffset); executePostRunnables(); } Disposer.dispose(myAnimator); if (myCurrentAnimationRequest == this) { myCurrentAnimationRequest = null; } }
finish
242,204
void () { for (Runnable runnable : myPostRunnables) { runnable.run(); } }
executePostRunnables
242,205
void (ChangeEvent event) { ReadAction.run(() -> { Rectangle viewRect = getVisibleArea(); VisibleAreaEvent visibleAreaEvent = new VisibleAreaEvent(mySupplier.getEditor(), myLastViewRect, viewRect); if (!myViewportPositioned && viewRect.height > 0) { myViewportPositioned = true; if (adjustVerticalOffsetIfNecessary()) { r...
stateChanged
242,206
Point (@NotNull Editor editor, @NotNull VisualPosition pos) { return editor.visualPositionToXY(pos); }
calculateScrollingLocation
242,207
Point (@NotNull Editor editor, @NotNull LogicalPosition pos) { return editor.logicalPositionToXY(pos); }
calculateScrollingLocation
242,208
Editor () { return myEditor; }
getEditor
242,209
JScrollPane () { return myEditor.getScrollPane(); }
getScrollPane
242,210
ScrollingHelper () { return myScrollingHelper; }
getScrollingHelper
242,211
MarkupModelEx () { return myDelegate; }
getDelegate
242,212
boolean (@NotNull RangeHighlighter highlighter) { return highlighter.getEditorFilter().avaliableIn(myEditor) && myEditor.isHighlighterAvailable(highlighter); }
isAvailable
242,213
boolean (@NotNull RangeHighlighter highlighter) { return isAvailable(highlighter) && myDelegate.containsHighlighter(highlighter); }
containsHighlighter
242,214
boolean (int start, int end, @NotNull Processor<? super RangeHighlighterEx> processor) { FilteringProcessor<RangeHighlighterEx> filteringProcessor = new FilteringProcessor<>(IS_AVAILABLE, processor); return myDelegate.processRangeHighlightersOverlappingWith(start, end, filteringProcessor); }
processRangeHighlightersOverlappingWith
242,215
boolean (int start, int end, @NotNull Processor<? super RangeHighlighterEx> processor) { FilteringProcessor<RangeHighlighterEx> filteringProcessor = new FilteringProcessor<>(IS_AVAILABLE, processor); return myDelegate.processRangeHighlightersOutside(start, end, filteringProcessor); }
processRangeHighlightersOutside
242,216
MarkupIterator<RangeHighlighterEx> (int startOffset, int endOffset) { return new FilteringMarkupIterator<>(myDelegate.overlappingIterator(startOffset, endOffset), this::isAvailable); }
overlappingIterator
242,217
void (@NotNull Disposable parentDisposable, @NotNull MarkupModelListener listener) { myDelegate.addMarkupModelListener(parentDisposable, listener); }
addMarkupModelListener
242,218
void () { }
dispose
242,219
Document () { return myDelegate.getDocument(); }
getDocument
242,220
RangeHighlighter (@Nullable TextAttributesKey textAttributesKey, int startOffset, int endOffset, int layer, @NotNull HighlighterTargetArea targetArea) { return myDelegate.addRangeHighlighter(textAttributesKey, startOffset, endOffset, layer, targetArea); }
addRangeHighlighter
242,221
RangeHighlighter (int startOffset, int endOffset, int layer, @Nullable TextAttributes textAttributes, @NotNull HighlighterTargetArea targetArea) { return myDelegate.addRangeHighlighter(startOffset, endOffset, layer, textAttributes, targetArea); }
addRangeHighlighter
242,222
RangeHighlighter (@Nullable TextAttributesKey textAttributesKey, int line, int layer) { return myDelegate.addLineHighlighter(textAttributesKey, line, layer); }
addLineHighlighter
242,223
RangeHighlighter (int line, int layer, @Nullable TextAttributes textAttributes) { return myDelegate.addLineHighlighter(line, layer, textAttributes); }
addLineHighlighter
242,224
RangeHighlighterEx (@Nullable TextAttributesKey textAttributesKey, int startOffset, int endOffset, int layer, @NotNull HighlighterTargetArea targetArea, boolean isPersistent, @Nullable Consumer<? super RangeHighlighterEx> changeAttributesAction) { return myDelegate.addRangeHighlighterAndChangeAttributes(textAttributesK...
addRangeHighlighterAndChangeAttributes
242,225
void (@NotNull RangeHighlighter highlighter, @NotNull TextAttributes textAttributes) { myDelegate.setRangeHighlighterAttributes(highlighter, textAttributes); }
setRangeHighlighterAttributes
242,226
void (@NotNull RangeHighlighterEx highlighter, @NotNull Consumer<? super RangeHighlighterEx> changeAttributesAction) { myDelegate.changeAttributesInBatch(highlighter, changeAttributesAction); }
changeAttributesInBatch
242,227
void (@NotNull RangeHighlighter rangeHighlighter) { myDelegate.removeHighlighter(rangeHighlighter); }
removeHighlighter
242,228
void () { myDelegate.removeAllHighlighters(); }
removeAllHighlighters
242,229
boolean () { return false; }
keepIntervalsOnWeakReferences
242,230
int () { return getLayout().stream().map(GutterArea::width).reduce(0, Integer::sum); }
getWidth
242,231
String () { return id + "=" + width(); }
toString
242,232
List<GutterArea> () { if (myClassicLayout == null) { myClassicLayout = createClassicLayout(); } return myClassicLayout; }
getClassicGutterLayout
242,233
List<GutterArea> () { return List.of( areaGap() .as(EditorMouseEventArea.LINE_NUMBERS_AREA) .showIf(this::isLineNumbersShown), area(LINE_NUMBERS_AREA, () -> myEditorGutter.myLineNumberAreaWidth).showIf(this::isLineNumbersShown), area(ADDITIONAL_LINE_NUMBERS_AREA, () -> myEditorGutter.myAdditionalLineNumberAreaWidth), a...
createClassicLayout
242,234
boolean () { return myEditorGutter.isLineNumbersShown(); }
isLineNumbersShown
242,235
List<GutterArea> () { return List.of( area(ANNOTATIONS_AREA, () -> 4) .as(EditorMouseEventArea.ANNOTATIONS_AREA) .showIf(() -> myEditorGutter.myTextAnnotationGuttersSize == 0 && myEditorGutter.isLineMarkersShown()), areaGap() .as(EditorMouseEventArea.ANNOTATIONS_AREA) .showIf(() -> myEditorGutter.isShowGapAfterAnnotati...
createNewUILayout
242,236
List<GutterArea> () { return List.of( area(ANNOTATIONS_AREA, () -> 4) .as(EditorMouseEventArea.ANNOTATIONS_AREA) .showIf(() -> myEditorGutter.myTextAnnotationGuttersSize == 0 && myEditorGutter.isLineMarkersShown()), areaGap() .as(EditorMouseEventArea.ANNOTATIONS_AREA) .showIf(() -> myEditorGutter.isShowGapAfterAnnotati...
createNewUIDFMLayout
242,237
GutterArea () { return area(GAP_BETWEEN_AREAS, EditorGutterComponentImpl::getGapBetweenAreas); }
areaGap
242,238
GutterArea (int width) { return area(GAP_BETWEEN_AREAS, () -> width); //type something }
areaGap
242,239
List<GutterArea> () { if (myNewUILayout == null) { myNewUILayout = createNewUILayout(); } return myNewUILayout; }
getExperimentalGutterLayout
242,240
List<GutterArea> () { if (myNewUIDFMLayout == null) { myNewUIDFMLayout = createNewUIDFMLayout(); } return myNewUIDFMLayout; }
getNewUIDFMLayout
242,241
GutterArea (String id, Supplier<Integer> areaWidth) { return new GutterArea(id, areaWidth); }
area
242,242
int () { return getOffset(ANNOTATIONS_AREA); }
getAnnotationsAreaOffset
242,243
int (String ID) { int offset = 0; for (GutterArea area : getLayout()) { if (Strings.areSameInstance(area.id, ID)) return offset; offset += area.width(); } return -1; }
getOffset
242,244
int () { return getOffset(LEFT_FREE_PAINTERS_AREA); }
getLeftFreePaintersAreaOffset
242,245
int () {return getOffset(VERTICAL_LINE_AREA);}
getVerticalLineX
242,246
int () { return EditorGutterComponentImpl.START_ICON_AREA_WIDTH.get(); }
getInitialGutterWidth
242,247
void (@NotNull Graphics g) { UISettings.setupAntialiasing(g); super.paint(g); }
paint
242,248
void (@NotNull UISettings uiSettings) { }
uiSettingsChanged
242,249
AccessibleGutterLine (@NotNull EditorGutterComponentImpl gutter) { return new AccessibleGutterLine(gutter); }
createAndActivate
242,250
void (Graphics g) { mySelectedElement.paint(g); }
paint
242,251
void (@NotNull EditorGutterComponentImpl gutter) { if (!actionHandlerInstalled) { // [tav] todo: when the API is stable and open move it to ShowGutterIconTooltipAction actionHandlerInstalled = true; EditorActionManager.getInstance().setActionHandler("EditorShowGutterIconTooltip", new EditorActionHandler() { @Override p...
installListeners
242,252
void (@NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { AccessibleGutterLine line = ((EditorGutterComponentImpl)editor.getGutter()).getCurrentAccessibleLine(); if (line != null) line.showTooltipIfPresent(); }
doExecute
242,253
void (FocusEvent e) { gutter.setCurrentAccessibleLine(createAndActivate(gutter)); }
focusGained
242,254
void (ComponentEvent e) { gutter.escapeCurrentAccessibleLine(); }
componentResized
242,255
void (@NotNull CaretEvent event) { AccessibleGutterLine line = gutter.getCurrentAccessibleLine(); if (line != null) line.maybeLineChanged(); }
caretPositionChanged
242,256
void () { IdeFocusManager.getGlobalInstance().requestFocus(getFocusTraversalPolicy().getComponentAfter(this, mySelectedElement), true); }
moveRight
242,257
AnActionEvent (@NotNull AnActionEvent e, @NotNull Component component) { int x = component.getX() + component.getWidth() / 2; int y = component.getY() + component.getHeight() / 2; return new AnActionEvent(new MouseEvent(component, MouseEvent.MOUSE_CLICKED, 0, 0, x, y, 1, false), e.getDataContext(), e.getPlace(), e.getP...
convertAnActionEventToMouseAnActionEvent
242,258
void (AnActionEvent e) { Component focusOwner = IdeFocusManager.getGlobalInstance().getFocusOwner(); if (focusOwner instanceof AccessibleGutterElement) { ((AccessibleGutterElement)focusOwner).myAccessible.performAction(convertAnActionEventToMouseAnActionEvent(e, focusOwner)); } }
pressEnter
242,259
void () { IdeFocusManager.getGlobalInstance().requestFocus(getFocusTraversalPolicy().getComponentBefore(this, mySelectedElement), true); }
moveLeft
242,260
void () { mySelectedElement.showTooltip(); }
showTooltipIfPresent
242,261
String () { return IdeBundle.message("accessible.name.line", myLogicalLineNum + 1); }
getAccessibleName
242,262
String () { return null; }
getAccessibleTooltipText
242,263
String () { return IdeBundle.message("accessible.name.annotation", buf.toString()); }
getAccessibleName
242,264
String () { return tt; }
getAccessibleTooltipText
242,265
void (@NotNull AnActionEvent e) { myAction.actionPerformed(e); }
performAction
242,266
String () { if (renderer instanceof SimpleAccessible) { return ((SimpleAccessible)renderer).getAccessibleName(); } return IdeBundle.message("accessible.name.icon", renderer.getClass().getSimpleName()); }
getAccessibleName
242,267
String () { return renderer.getTooltipText(); }
getAccessibleTooltipText
242,268
String () { return IdeBundle.message("accessible.name.empty"); }
getAccessibleName
242,269
String () { return null; }
getAccessibleTooltipText
242,270
void (ShortcutSet shortcut, Runnable action) { DumbAwareAction.create(e -> action.run()).registerCustomShortcutSet(shortcut, this); }
installActionHandler
242,271
void (ShortcutSet shortcut, Consumer<? super AnActionEvent> action) { DumbAwareAction.create(e -> action.accept(e)).registerCustomShortcutSet(shortcut, this); }
installActionHandler
242,272
AccessibleGutterElement (@NotNull MySimpleAccessible accessible, int x, int y, int width, int height) { AccessibleGutterElement obj = new AccessibleGutterElement(accessible, new Rectangle(x, y, width, height)); add(obj); return obj; }
addNewElement
242,273
void () { repaint(); super.removeNotify(); }
removeNotify
242,274
void () { if (myLogicalLineNum == myGutter.getEditor().getCaretModel().getPrimaryCaret().getLogicalPosition().line) return; myGutter.remove(this); myGutter.setCurrentAccessibleLine(createAndActivate(myGutter)); }
maybeLineChanged
242,275
void () { if (myGutter == null) return; int y = myGutter.getEditor().visualLineToY(myVisualLineNum); myGutter.repaint(0, y, myGutter.getWhitespaceSeparatorOffset(), y + myGutter.getEditor().getLineHeight()); }
repaint
242,276
boolean () { return this == myGutter.getCurrentAccessibleLine(); }
isActive
242,277
boolean (Object element) { return element instanceof MySimpleAccessible; }
isAccessibleGutterElement
242,278
void (FocusEvent e) { mySelectedElement = AccessibleGutterElement.this; getParent().repaint(); }
focusGained
242,279
void (FocusEvent e) { if (!(e.getOppositeComponent() instanceof AccessibleGutterElement) && isActive()) { escape(false); } }
focusLost
242,280
void (Graphics g) { if (mySelectedElement != this) return; Color oldColor = g.getColor(); try { g.setColor(JBColor.blue); Point parentLoc = getParent().getLocation(); Rectangle bounds = getBounds(); bounds.setLocation(parentLoc.x + bounds.x, parentLoc.y + bounds.y); int y = bounds.y + bounds.height - JBUIScale.scale(1)...
paint
242,281
AccessibleContext () { if (accessibleContext == null) { accessibleContext = new AccessibleJLabel() { @Override public String getAccessibleName() { return getText(); } }; } return accessibleContext; }
getAccessibleContext
242,282
String () { return getText(); }
getAccessibleName
242,283
boolean (@NotNull String fontName, @NotNull String font2DName) { return font2DName.startsWith(Font.DIALOG) && !fontName.startsWith(Font.DIALOG); }
isUnsupportedFont
242,284
boolean () { return !myFamilies.isEmpty(); }
isSupportedImpl
242,285
List<String> () { return myFamilies.isEmpty() ? super.getAvailableFamiliesImpl() : new ArrayList<>(myFamilies.keySet()); }
getAvailableFamiliesImpl
242,286
boolean (@NotNull String family) { FontFamily fontFamily = myFamilies.get(family); return fontFamily == null ? super.isMonospacedImpl(family) : fontFamily.isMonospaced(); }
isMonospacedImpl
242,287
String (@NotNull String family) { FontFamily fontFamily = myFamilies.get(family); return fontFamily == null ? super.getRecommendedSubFamilyImpl(family) : fontFamily.getRecommendedSubFamily(); }
getRecommendedSubFamilyImpl
242,288
String (@NotNull String family, @NotNull String mainSubFamily) { FontFamily fontFamily = myFamilies.get(family); return fontFamily == null ? super.getRecommendedBoldSubFamilyImpl(family, mainSubFamily) : fontFamily.getRecommendedBoldSubFamily(mainSubFamily); }
getRecommendedBoldSubFamilyImpl
242,289
Font (@NotNull String family, @Nullable String regularSubFamily, @Nullable String boldSubFamily, @JdkConstants.FontStyle int style) { FontFamily fontFamily = myFamilies.get(family); return fontFamily == null ? super.getFontImpl(family, regularSubFamily, boldSubFamily, style) : fontFamily.getFont(regularSubFamily, boldS...
getFontImpl
242,290
void (@NotNull String subFamily, @NotNull Font font) { if (VERBOSE_LOGGING) { LOG.info("Adding " + font.getName() + " as " + subFamily + " variant to " + family + " family"); } members.put(subFamily, font); }
addFont
242,291
void (int weight, String subFamily) { int newMetric = Math.abs(desiredWeight - weight); if (newMetric < bestDistance) { bestDistance = newMetric; bestSubFamily = subFamily; } }
updateIfBetterMatch
242,292
boolean (String subFamily) { String name = subFamily.toLowerCase(Locale.ENGLISH); return ContainerUtil.exists(ITALIC_NAMES, name::contains); }
isItalic
242,293
boolean (String mainSubFamily, String italicSubFamily) { String main = mainSubFamily.toLowerCase(Locale.ENGLISH); String candidate = italicSubFamily.toLowerCase(Locale.ENGLISH); // assuming italic variant is named by adding a suffix to the base variant for (String suffix : ITALIC_NAMES) { if (candidate.endsWith(suffix)...
isMatchingItalic
242,294
int (Font font) { assert GET_FONT_2D_METHOD != null; assert GET_WEIGHT_METHOD != null; try { Font2D font2d = (Font2D)GET_FONT_2D_METHOD.invoke(font); return (Integer)GET_WEIGHT_METHOD.invoke(font2d); } catch (Throwable t) { LOG.error(t); } return Font2D.FWEIGHT_NORMAL; }
getWeight
242,295
boolean () { Font font = members.entrySet().iterator().next().getValue(); if (!font.canDisplay(' ') || !font.canDisplay('M')) { return false; } FontMetrics metrics = FontInfo.getFontMetrics(font.deriveFont((float)EditorFontsConstants.getDefaultEditorFontSize()), FontInfo.DEFAULT_CONTEXT); return metrics.charWidth(' ') ...
isMonospaced
242,296
List<String> () { initIfNeeded(); return new ArrayList<>(italics.keySet()); }
getBaseSubFamilies
242,297
String () { initIfNeeded(); return recommendedSubFamily; }
getRecommendedSubFamily
242,298
String (String mainSubFamily) { initIfNeeded(); String result = recommendedBoldSubFamilies.get(mainSubFamily); return result == null ? recommendedBoldSubFamilies.get(recommendedSubFamily) : result; }
getRecommendedBoldSubFamily
242,299
Font (String regularSubFamily, String boldSubFamily, int style) { initIfNeeded(); if (!italics.containsKey(regularSubFamily)) { regularSubFamily = null; } if (!italics.containsKey(boldSubFamily)) { boldSubFamily = null; } if (regularSubFamily == null) { regularSubFamily = boldSubFamily == null ? recommendedSubFamily : ...
getFont