Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
256,300 | int (int lineHeight, boolean isMirror) { return getStepSize(lineHeight); // cross divider at a 45' downwards angle, to allow a smaller 'shoulder' } | getStartPhase |
256,301 | int () { return 1; // gap for proper AA rendering } | getAAGap |
256,302 | Color (@Nullable EditorColorsScheme scheme) { if (scheme == null) scheme = EditorColorsManager.getInstance().getGlobalScheme(); Color color = scheme.getColor(FOREGROUND); if (color != null) return color; color = scheme.getColor(BACKGROUND); if (color != null) return color; return Gray._128; } | getWaveColor |
256,303 | Stroke (boolean isHovered) { if (isHovered) { return new BasicStroke(2.0f); } else { return new BasicStroke(1.0f); } } | getStroke |
256,304 | void (JComponent wrapped) { if (getTargetComponent() != this) { getTargetComponent().removeComponentListener(myListener); } super.setContent(wrapped); if (getTargetComponent() != this) { getTargetComponent().addComponentListener(myListener); } syncVisibility(); } | setContent |
256,305 | void () { JComponent target = getTargetComponent(); boolean isVisible = target != this && target.isVisible(); if (isVisible() != isVisible) { setVisible(isVisible); validate(); } } | syncVisibility |
256,306 | void (ComponentEvent e) { syncVisibility(); } | componentShown |
256,307 | void (ComponentEvent e) { syncVisibility(); } | componentHidden |
256,308 | void (Graphics g, int x1, int x2, int y) { Rectangle clip = g.getClipBounds(); x2 = clip.x + clip.width; g.setColor(JBColor.border()); g.drawLine(x1, y, x2, y); } | drawLine |
256,309 | Color () { return getDividerColor(null); } | getDividerColor |
256,310 | Color (@Nullable Editor editor) { EditorGutter gutter = editor != null ? editor.getGutter() : null; if (gutter instanceof EditorGutterComponentEx) { return ((EditorGutterComponentEx)gutter).getBackground(); } return getDividerColorFromScheme(editor != null ? editor.getColorsScheme() : EditorColorsManager.getInstance().... | getDividerColor |
256,311 | Color (@NotNull EditorColorsScheme scheme) { Color gutterBackground = scheme.getColor(EditorColors.GUTTER_BACKGROUND); if (gutterBackground == null) { gutterBackground = EditorColors.GUTTER_BACKGROUND.getDefaultColor(); } return gutterBackground; } | getDividerColorFromScheme |
256,312 | void (@NotNull Graphics2D g, int x1, int x2, int y, @NotNull Color color, boolean doubleLine, boolean dottedLine) { if (dottedLine && doubleLine) { UIUtil.drawBoldDottedLine(g, x1, x2, y - 1, null, color, false); UIUtil.drawBoldDottedLine(g, x1, x2, y, null, color, false); } else if (dottedLine) { UIUtil.drawBoldDotted... | drawChunkBorderLine |
256,313 | void (@NotNull Graphics2D g, int x1, int x2, int start1, int end1, int start2, int end2, @Nullable Color fillColor, @Nullable Color borderColor) { if (fillColor != null) { final int[] xPoints = new int[]{x1, x2, x2, x1}; final int[] yPoints = new int[]{start1, start2, end2 + 1, end1 + 1}; g.setColor(fillColor); g.fillP... | drawTrapezium |
256,314 | void (@NotNull Graphics2D g, int x1, int x2, int start1, int end1, int start2, int end2, @Nullable Color fillColor, @Nullable Color borderColor) { if (fillColor != null) { g.setColor(fillColor); g.fill(makeCurvePath(x1, x2, start1, start2, end1 + 1, end2 + 1)); // 'g.fill' above draws thin line when used with high slop... | drawCurveTrapezium |
256,315 | void (@NotNull Graphics2D g, int x1, int x2, int y1, int y2) { boolean isHighSlope = Math.abs(x2 - x1) < Math.abs(y2 - y1); if (!isHighSlope && isThickSimpleStroke(g)) { g.fill(makeCurvePath(x1, x2, y1, y2, y1 + 1, y2 + 1)); } else { g.draw(makeCurve(x1, x2, y1, y2, true)); } } | drawCurveLine |
256,316 | boolean (@NotNull Graphics2D g) { Stroke stroke = g.getStroke(); if (stroke instanceof BasicStroke) { float strokeWidth = ((BasicStroke)stroke).getLineWidth(); return strokeWidth == 1.0 && PaintUtil.devValue(strokeWidth, g) > 1; } return false; } | isThickSimpleStroke |
256,317 | Path2D (int x1, int x2, int y11, int y12, int y21, int y22) { Path2D path = new Path2D.Double(); path.append(makeCurve(x1, x2, y11, y12, true), true); path.append(makeCurve(x1, x2, y21, y22, false), true); path.closePath(); return path; } | makeCurvePath |
256,318 | Shape (int x1, int x2, int y1, int y2, boolean forward) { int width = x2 - x1; if (forward) { return new CubicCurve2D.Double(x1, y1, x1 + width * CTRL_PROXIMITY_X, y1, x1 + width * (1.0 - CTRL_PROXIMITY_X), y2, x1 + width, y2); } else { return new CubicCurve2D.Double(x1 + width, y2, x1 + width * (1.0 - CTRL_PROXIMITY_X... | makeCurve |
256,319 | int (@NotNull Editor editor, int line) { return lineToY(editor, line, true, false); } | lineToY |
256,320 | int (@NotNull Editor editor, int line, boolean lineStart) { return lineToY(editor, line, lineStart, false); } | lineToY |
256,321 | int (@NotNull Editor editor, int line, boolean lineStart, boolean includeInlays) { if (line < 0) return 0; Document document = editor.getDocument(); if (line >= getLineCount(document)) { int y = editor.logicalPositionToXY(editor.offsetToLogicalPosition(document.getTextLength())).y; int tailLines = line - getLineCount(d... | lineToY |
256,322 | MarkerRange (@NotNull Editor editor, int startLine, int endLine) { int y1; int y2; if (startLine == endLine) { if (startLine == 0) { y1 = lineToY(editor, 0, true, true) + 1; } else { y1 = lineToY(editor, startLine - 1, false, true); } y2 = y1; } else { y1 = lineToY(editor, startLine, true, false); y2 = lineToY(editor, ... | getGutterMarkerPaintRange |
256,323 | TextAttributes (@NotNull final TextDiffType type, @Nullable final Editor editor, @NotNull BackgroundType background) { if (background == BackgroundType.NONE) return null; return new DiffTextAttributes(background, type, editor); } | getTextAttributes |
256,324 | TextAttributes (@NotNull final TextDiffType type, @NotNull final Editor editor) { return new DiffStripeMarkerTextAttributes(type, editor); } | getStripeTextAttributes |
256,325 | void (@NotNull RangeHighlighter highlighter, @NotNull TextDiffType type) { highlighter.setCustomRenderer(new DiffEmptyHighlighterRenderer(type)); } | installEmptyRangeRenderer |
256,326 | List<RangeHighlighter> (@NotNull Editor editor, @NotNull LineRange deleted, @NotNull LineRange inserted, @Nullable List<? extends DiffFragment> innerFragments) { return createUnifiedChunkHighlighters(editor, deleted, inserted, false, false, innerFragments); } | createUnifiedChunkHighlighters |
256,327 | List<RangeHighlighter> (@NotNull Editor editor, @NotNull LineRange deleted, @NotNull LineRange inserted, boolean excluded, boolean skipped, @Nullable List<? extends DiffFragment> innerFragments) { boolean ignored = innerFragments != null; List<RangeHighlighter> list = new ArrayList<>(); if (!inserted.isEmpty() && !dele... | createUnifiedChunkHighlighters |
256,328 | List<RangeHighlighter> (@NotNull Editor editor, int startLine, int endLine, @NotNull TextDiffType type, boolean ignored, boolean excludedInEditor, boolean excludedInGutter) { return new LineHighlighterBuilder(editor, startLine, endLine, type) .withIgnored(ignored) .withExcludedInEditor(excludedInEditor) .withExcludedIn... | createHighlighter |
256,329 | List<RangeHighlighter> (@NotNull Editor editor, int startLine, int endLine, @NotNull TextDiffType type, boolean ignored) { return new LineHighlighterBuilder(editor, startLine, endLine, type).withIgnored(ignored).done(); } | createHighlighter |
256,330 | List<RangeHighlighter> (@NotNull Editor editor, int startLine, int endLine, @NotNull TextDiffType type, boolean ignored, boolean resolved, boolean isExcluded, boolean hideWithoutLineNumbers, boolean hideStripeMarkers) { return new LineHighlighterBuilder(editor, startLine, endLine, type) .withIgnored(ignored) .withResol... | createHighlighter |
256,331 | List<RangeHighlighter> (@NotNull Editor editor, int startLine, int endLine, @NotNull TextDiffType type, @NotNull PaintMode editorMode, @NotNull PaintMode gutterMode) { return new LineHighlighterBuilder(editor, startLine, endLine, type) .withEditorMode(editorMode) .withGutterMode(gutterMode) .done(); } | createHighlighter |
256,332 | List<RangeHighlighter> (@NotNull Editor editor, int start, int end, @NotNull TextDiffType type) { return new InlineHighlighterBuilder(editor, start, end, type).done(); } | createInlineHighlighter |
256,333 | List<RangeHighlighter> (@NotNull final Editor editor, int line, @NotNull final TextDiffType type) { if (line == 0) return Collections.emptyList(); return new LineMarkerBuilder(editor, line, SeparatorPlacement.TOP) .withDefaultRenderer(type, false, false, null) .withDefaultGutterRenderer(type, false, false) .withDefault... | createLineMarker |
256,334 | List<RangeHighlighter> (@NotNull final Editor editor, int line, @NotNull final SeparatorPlacement placement) { return new LineMarkerBuilder(editor, line, placement).withRenderer(BORDER_LINE_RENDERER).done(); } | createBorderLineMarker |
256,335 | List<RangeHighlighter> (@NotNull Editor editor, int offset1, int offset2) { return createLineSeparatorHighlighter(editor, offset1, offset2, () -> true); } | createLineSeparatorHighlighter |
256,336 | List<RangeHighlighter> (@NotNull Editor editor, int offset1, int offset2, @NotNull BooleanSupplier visibilityCondition) { return createLineSeparatorHighlighter(editor, offset1, offset2, new SimpleSeparatorPresentation(visibilityCondition)); } | createLineSeparatorHighlighter |
256,337 | List<RangeHighlighter> (@NotNull Editor editor, int offset1, int offset2, @NotNull SeparatorPresentation presentation) { RangeHighlighter marker = editor.getMarkupModel() .addRangeHighlighter(null, offset1, offset2, LINE_MARKER_LAYER, HighlighterTargetArea.LINES_IN_RANGE); DiffLineSeparatorRenderer renderer = new DiffL... | createLineSeparatorHighlighter |
256,338 | int (int layer, int layerPriority) { return layer + layerPriority * LAYER_PRIORITY_STEP; } | getLayer |
256,339 | void (@NotNull Editor editor, int startLine, int endLine, int layerPriority, @NotNull Disposable disposable) { if (startLine == endLine) return; editor.putUserData(EDITOR_WITH_HIGH_PRIORITY_RENDERER, true); TextAttributes attributes = new TextAttributes(); attributes.setBackgroundColor(editor.getColorsScheme().getDefau... | setupLayeredRendering |
256,340 | LineHighlighterBuilder (boolean ignored) { this.ignored = ignored; return this; } | withIgnored |
256,341 | LineHighlighterBuilder (boolean resolved) { this.resolved = resolved; return this; } | withResolved |
256,342 | LineHighlighterBuilder (boolean excluded) { this.excludedInEditor = excluded; this.excludedInGutter = excluded; return this; } | withExcluded |
256,343 | LineHighlighterBuilder (boolean excluded) { this.excludedInEditor = excluded; return this; } | withExcludedInEditor |
256,344 | LineHighlighterBuilder (boolean excluded) { this.excludedInGutter = excluded; return this; } | withExcludedInGutter |
256,345 | LineHighlighterBuilder (boolean hideWithoutLineNumbers) { this.hideWithoutLineNumbers = hideWithoutLineNumbers; return this; } | withHideWithoutLineNumbers |
256,346 | LineHighlighterBuilder (boolean hideStripeMarkers) { this.hideStripeMarkers = hideStripeMarkers; return this; } | withHideStripeMarkers |
256,347 | LineHighlighterBuilder (boolean hideGutterMarkers) { this.hideGutterMarkers = hideGutterMarkers; return this; } | withHideGutterMarkers |
256,348 | LineHighlighterBuilder (boolean aligned) { this.alignedSides = aligned; return this; } | withAlignedSides |
256,349 | LineHighlighterBuilder (@NotNull PaintMode mode) { this.fixedEditorMode = mode; return this; } | withEditorMode |
256,350 | LineHighlighterBuilder (@NotNull PaintMode mode) { this.fixedGutterMode = mode; return this; } | withGutterMode |
256,351 | LineHighlighterBuilder (int layerPriority) { this.layerPriority = layerPriority; return this; } | withLayerPriority |
256,352 | List<RangeHighlighter> () { List<RangeHighlighter> highlighters = new ArrayList<>(); PaintMode editorMode = PaintMode.DEFAULT; PaintMode gutterMode = PaintMode.DEFAULT; if (ignored) { editorMode = PaintMode.IGNORED; } if (excludedInEditor) { editorMode = PaintMode.EXCLUDED_EDITOR; } if (excludedInGutter) { gutterMode =... | done |
256,353 | InlineHighlighterBuilder (int layerPriority) { this.layerPriority = layerPriority; return this; } | withLayerPriority |
256,354 | List<RangeHighlighter> () { TextAttributes attributes = getTextAttributes(type, editor, BackgroundType.DEFAULT); RangeHighlighter highlighter = editor.getMarkupModel() .addRangeHighlighter(start, end, getLayer(INLINE_LAYER, layerPriority), attributes, HighlighterTargetArea.EXACT_RANGE); if (start == end) installEmptyRa... | done |
256,355 | LineMarkerBuilder (@Nullable LineSeparatorRenderer lineRenderer) { this.lineRenderer = lineRenderer; return this; } | withRenderer |
256,356 | LineMarkerBuilder (@Nullable LineMarkerRenderer gutterRenderer) { this.gutterRenderer = gutterRenderer; return this; } | withGutterRenderer |
256,357 | LineMarkerBuilder (@Nullable TextAttributes stripeAttributes) { this.stripeAttributes = stripeAttributes; return this; } | withStripeAttributes |
256,358 | LineMarkerBuilder (@NotNull TextDiffType type, boolean doubleLine, boolean dottedLine, @Nullable RangeHighlighter parentHighlighter) { RangeHighlighter parent = ObjectUtils.chooseNotNull(parentHighlighter, highlighter); return withRenderer(new DiffDefaultBorderRenderer(parent, editor, placement, type, doubleLine, dotte... | withDefaultRenderer |
256,359 | LineMarkerBuilder (@NotNull TextDiffType type, boolean doubleLine, boolean dottedLine) { return withGutterRenderer(new DiffFoldingGutterLineRenderer(placement, type, doubleLine, dottedLine)); } | withDefaultGutterRenderer |
256,360 | LineMarkerBuilder (@NotNull TextDiffType type) { TextAttributes attributes = getStripeTextAttributes(type, editor); return withStripeAttributes(attributes); } | withDefaultStripeAttributes |
256,361 | List<RangeHighlighter> () { highlighter.setLineSeparatorPlacement(placement); highlighter.setLineSeparatorRenderer(lineRenderer); highlighter.setLineMarkerRenderer(gutterRenderer); if (stripeAttributes == null) return Collections.singletonList(highlighter); RangeHighlighter stripeHighlighter = editor.getMarkupModel() .... | done |
256,362 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PaintMode mode = (PaintMode)o; return background == mode.background && border == mode.border; } | equals |
256,363 | int () { return Objects.hash(background, border); } | hashCode |
256,364 | int () { return y1; } | component1 |
256,365 | int () { return y2; } | component2 |
256,366 | void (@NotNull Editor editor, @NotNull RangeHighlighter highlighter, @NotNull Graphics g) { } | paint |
256,367 | boolean () { return myVisibilityCondition.getAsBoolean(); } | isVisible |
256,368 | boolean () { return false; } | isHovered |
256,369 | void (boolean value) { } | setExpanded |
256,370 | Color () { return myBackground == BackgroundType.IGNORED ? myType.getIgnoredColor(myEditor) : myType.getColor(myEditor); } | getBackgroundColor |
256,371 | TextDiffType () { return myType; } | getType |
256,372 | Color () { return myType.getMarkerColor(myEditor); } | getErrorStripeColor |
256,373 | void (@NotNull Editor editor, @NotNull Graphics g, @NotNull Rectangle r) { EditorGutterComponentEx gutter = ((EditorEx)editor).getGutterComponentEx(); Graphics2D g2 = (Graphics2D)g; int x1 = gutter.getWhitespaceSeparatorOffset(); int x2 = gutter.getWidth(); int y = r.y; if (myPlacement == SeparatorPlacement.BOTTOM) { L... | paint |
256,374 | Position () { return Position.CUSTOM; } | getPosition |
256,375 | void (Graphics g, int x1, int x2, int y) { if (myParentHighlighter != null && FoldingUtil.isHighlighterFolded(myEditor, myParentHighlighter)) return; Rectangle clip = g.getClipBounds(); x2 = clip.x + clip.width; if (myPlacement == SeparatorPlacement.TOP) y++; drawChunkBorderLine((Graphics2D)g, x1, x2, y, myType.getColo... | drawLine |
256,376 | List<TextDiffTypeImpl> () { return Arrays.asList(INSERTED, DELETED, MODIFIED, CONFLICT); } | getAllDiffTypes |
256,377 | String () { return myName; } | getName |
256,378 | TextAttributes (@Nullable Editor editor) { if (editor == null) { return EditorColorsManager.getInstance().getGlobalScheme().getAttributes(myKey); } else { return editor.getColorsScheme().getAttributes(myKey); } } | getAttributes |
256,379 | Color (@Nullable Editor editor) { return ObjectUtils.notNull(getAttributes(editor).getBackgroundColor(), JBColor.DARK_GRAY); } | getColor |
256,380 | Color (@Nullable Editor editor) { Color color = getAttributes(editor).getForegroundColor(); if (color != null) return color; Color fg = getColor(editor); Color bg = editor instanceof EditorEx ? ((EditorEx)editor).getBackgroundColor() : EditorColorsManager.getInstance().getGlobalScheme().getDefaultBackground(); return C... | getIgnoredColor |
256,381 | Color (@Nullable Editor editor) { return getAttributes(editor).getErrorStripeColor(); } | getMarkerColor |
256,382 | TextAttributesKey () { return myKey; } | getKey |
256,383 | String () { return myName; } | toString |
256,384 | Color (@NotNull Color fg, @NotNull Color bg) { return ColorUtil.mix(fg, bg, MIDDLE_COLOR_FACTOR); } | getMiddleColor |
256,385 | Integer (@NotNull Editor editor, int lineNumber) { return convertImpl(lineNumber, true); } | convert |
256,386 | Integer (@NotNull Editor editor) { for (int i = editor.getDocument().getLineCount(); i > 0; i--) { Integer number = convertImpl(i, false); if (number != null) { return number; } } return 0; } | getMaxLineNumber |
256,387 | boolean () { return myLineConverter != null; } | hasCustomLineNumbers |
256,388 | DiffViewer (@NotNull DiffContext context, @NotNull DiffRequest request) { return new MyViewer(context, request); } | createComponent |
256,389 | boolean (@NotNull DiffContext context, @NotNull DiffRequest request) { return true; } | canShow |
256,390 | String () { return DiffBundle.message("error.viewer"); } | getName |
256,391 | JComponent (@NotNull DiffRequest request) { if (request instanceof ErrorDiffRequest) { // TODO: explain some of ErrorDiffRequest exceptions ? String message = ((ErrorDiffRequest)request).getMessage(); return createReloadMessagePanel(myContext, message, DiffBundle.message("button.reload.diff.request"), null); } if (requ... | createComponent |
256,392 | JComponent () { return myPanel; } | getComponent |
256,393 | JComponent () { return null; } | getPreferredFocusedComponent |
256,394 | ToolbarComponents () { if (myRequest instanceof UnknownFileTypeDiffRequest) { String fileName = ((UnknownFileTypeDiffRequest)myRequest).getFileName(); if (fileName != null && FileTypeManager.getInstance().getFileTypeByFileName(fileName) != UnknownFileType.INSTANCE) { // FileType was assigned elsewhere (ex: by other Unk... | init |
256,395 | void () { } | dispose |
256,396 | JComponent (@Nullable DiffContext context, @NotNull @NlsContexts.Label String message, @NotNull @NlsContexts.Label String reloadMessage, @Nullable Runnable beforeReload) { if (context instanceof DiffContextEx) { EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme(); Color linkColor = chooseNot... | createReloadMessagePanel |
256,397 | void (@NotNull T change) { DiffUtil.scrollEditor(getEditor(), getStartLine(change), true); } | scrollToChange |
256,398 | void (@NotNull T change) { EditorEx editor = getEditor(); DocumentEx document = editor.getDocument(); CommandProcessor.getInstance().executeCommand(editor.getProject(), () -> { scrollToChange(change); }, "", DocCommandGroupId.noneGroupId(document), UndoConfirmationPolicy.DEFAULT, document); } | scrollToChangeUnderCommand |
256,399 | boolean () { List<? extends T> changes = getChanges(); if (changes.isEmpty()) return false; EditorEx editor = getEditor(); int line = editor.getCaretModel().getLogicalPosition().line; if (line == DiffUtil.getLineCount(editor.getDocument()) - 1) return false; T lastChange = changes.get(changes.size() - 1); if (getStartL... | canGoNext |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.