Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
256,200
void (@NotNull DefaultActionGroup group, @Nullable List<? extends AnAction> actions) { addActionBlock(group, actions, true); }
addActionBlock
256,201
void (@NotNull DefaultActionGroup group, @Nullable List<? extends AnAction> actions, boolean prependSeparator) { if (actions == null || actions.isEmpty()) return; if (prependSeparator) { group.addSeparator(); } AnAction[] children = group.getChildren(null); for (AnAction action : actions) { if (action instanceof Separa...
addActionBlock
256,202
String () { return SystemInfo.isMac ? DiffBundle.message("label.diff.settings.path.macos") : DiffBundle.message("label.diff.settings.path"); }
getSettingsConfigurablePath
256,203
String (@NotNull @NlsContexts.Tooltip String text, @Nullable @Nls String appendix) { HtmlBuilder result = new HtmlBuilder(); result.append(text); if (appendix != null) { result.br(); result.append(HtmlChunk.div("margin-top:5px; font-size:small").addText(appendix)); } return result.wrapWithHtmlBody().toString(); }
createTooltipText
256,204
String (@NotNull @Nls String text, @Nullable @Nls String appendix) { HtmlBuilder result = new HtmlBuilder(); result.append(text); if (appendix != null) { result.br(); result.append(HtmlChunk.span("color:#" + ColorUtil.toHex(JBColor.gray) + "; font-size:small").addText(appendix)); } return result.wrapWithHtmlBody().toSt...
createNotificationText
256,205
void (@NotNull @NlsContexts.PopupContent String message, @NotNull RelativePoint point, @NotNull Disposable disposable, @Nullable Runnable hyperlinkHandler) { HyperlinkListener listener = null; if (hyperlinkHandler != null) { listener = new HyperlinkAdapter() { @Override protected void hyperlinkActivated(@NotNull Hyperl...
showSuccessPopup
256,206
void (@NotNull HyperlinkEvent e) { hyperlinkHandler.run(); }
hyperlinkActivated
256,207
List<JComponent> (@Nullable DiffViewer viewer, @NotNull ContentDiffRequest request) { List<DiffContent> contents = request.getContents(); List<@Nls String> titles = request.getContentTitles(); List<JComponent> components = new ArrayList<>(titles.size()); List<DiffEditorTitleCustomizer> diffTitleCustomizers = request.ge...
createSimpleTitles
256,208
List<JComponent> (@Nullable DiffViewer viewer, @NotNull ContentDiffRequest request, @NotNull List<? extends Editor> editors) { List<DiffContent> contents = request.getContents(); List<@Nls String> titles = request.getContentTitles(); boolean equalCharsets = TextDiffViewerUtil.areEqualCharsets(contents); boolean equalSe...
createTextTitles
256,209
List<JComponent> (@Nullable DiffViewer viewer, @NotNull DiffRequest request, @NotNull List<@Nls @Nullable String> titles) { List<JComponent> result = new ArrayList<>(titles.size()); List<DiffEditorTitleCustomizer> diffTitleCustomizers = request.getUserData(DiffUserDataKeysEx.EDITORS_TITLE_CUSTOMIZER); boolean needCreat...
createPatchTextTitles
256,210
JComponent (@Nullable DiffViewer viewer, @Nullable JComponent title, @Nullable DiffContent content) { List<JComponent> components = new ArrayList<>(); if (title != null) components.add(title); if (content != null) { components.addAll(createCustomNotifications(viewer, content)); } if (content instanceof DocumentContent)...
createTitleWithNotifications
256,211
JComponent (@Nullable @NlsContexts.Label String title, @NotNull DiffContent content, boolean equalCharsets, boolean equalSeparators, @Nullable Editor editor, @Nullable DiffEditorTitleCustomizer titleCustomizer) { if (content instanceof EmptyContent) return null; DocumentContent documentContent = (DocumentContent)conten...
createTitle
256,212
JComponent (@Nullable @NlsContexts.Label String title) { return createTitle(title, null, null, null, false, null); }
createTitle
256,213
JComponent (@Nullable @NlsContexts.Label String title, @Nullable DiffEditorTitleCustomizer titleCustomizer) { return createTitle(title, null, null, null, false, titleCustomizer); }
createTitle
256,214
JComponent (@Nullable @NlsContexts.Label String title, @Nullable LineSeparator separator, @Nullable Charset charset, @Nullable Boolean bom, boolean readOnly, @Nullable DiffEditorTitleCustomizer titleCustomizer) { JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(JBUI.Borders.empty(0, 4)); BorderLayoutPanel...
createTitle
256,215
JComponent (@NotNull Charset charset, @Nullable Boolean bom) { String text = charset.displayName(); if (bom != null && bom) { text = DiffBundle.message("diff.utf.charset.name.bom.suffix", text); } JLabel label = new JLabel(text); // TODO: specific colors for other charsets if (charset.equals(StandardCharsets.UTF_8)) { ...
createCharsetPanel
256,216
JComponent (@NotNull LineSeparator separator) { JLabel label = new JLabel(separator.toString()); Color color; if (separator == LineSeparator.CRLF) { color = JBColor.RED; } else if (separator == LineSeparator.LF) { color = JBColor.BLUE; } else if (separator == LineSeparator.CR) { color = JBColor.MAGENTA; } else { color ...
createSeparatorPanel
256,217
List<JComponent> (@NotNull final List<JComponent> components) { return SyncHeightComponent.createSyncHeightComponents(components); }
createSyncHeightComponents
256,218
JComponent (@NotNull List<? extends JComponent> components, @NotNull JBValue vGap) { JPanel panel = new JPanel(new VerticalLayout(vGap, VerticalLayout.FILL)); for (JComponent component : components) { panel.add(component); } return panel; }
createStackedComponents
256,219
String (int totalCount, int excludedCount, @NotNull ThreeState isContentsEqual) { if (totalCount == 0 && isContentsEqual == ThreeState.NO) { return DiffBundle.message("diff.all.differences.ignored.text"); } String message = DiffBundle.message("diff.count.differences.status.text", totalCount - excludedCount); if (exclud...
getStatusText
256,220
boolean (@Nullable Component component) { return isFocusedComponent(null, component); }
isFocusedComponent
256,221
boolean (@Nullable Project project, @Nullable Component component) { if (component == null) return false; Component ideFocusOwner = IdeFocusManager.getInstance(project).getFocusOwner(); if (ideFocusOwner != null && SwingUtilities.isDescendingFrom(ideFocusOwner, component)) return true; Component jdkFocusOwner = Keyboar...
isFocusedComponent
256,222
void (@Nullable Project project, @Nullable Component component) { if (component == null) return; IdeFocusManager.getInstance(project).requestFocus(component, true); }
requestFocus
256,223
boolean (@Nullable Component component) { if (component == null) return false; Window window = ComponentUtil.getWindow(component); if (window == null) return false; Component windowFocusOwner = window.getMostRecentFocusOwner(); return windowFocusOwner != null && SwingUtilities.isDescendingFrom(windowFocusOwner, compone...
isFocusedComponentInWindow
256,224
void (@Nullable Component component) { if (component != null) component.requestFocusInWindow(); }
requestFocusInWindow
256,225
void (@NotNull FocusableContext context, @NotNull Runnable task) { boolean hadFocus = context.isFocusedInWindow(); // if (hadFocus) KeyboardFocusManager.getCurrentKeyboardFocusManager().clearFocusOwner(); task.run(); if (hadFocus) context.requestFocusInWindow(); }
runPreservingFocus
256,226
TwosideTextDiffProvider (@Nullable Project project, @NotNull ContentDiffRequest request, @NotNull TextDiffSettings settings, @NotNull Runnable rediff, @NotNull Disposable disposable) { DiffUserDataKeysEx.DiffComputer diffComputer = request.getUserData(DiffUserDataKeysEx.CUSTOM_DIFF_COMPUTER); if (diffComputer != null) ...
createTextDiffProvider
256,227
MergeInnerDifferences (@NotNull List<? extends CharSequence> chunks, @NotNull ComparisonPolicy comparisonPolicy, @NotNull ProgressIndicator indicator) { if (chunks.get(0) == null && chunks.get(1) == null && chunks.get(2) == null) return null; // --- if (comparisonPolicy == ComparisonPolicy.IGNORE_WHITESPACES) { if (isC...
compareThreesideInner
256,228
boolean (@Nullable CharSequence chunk1, @Nullable CharSequence chunk2, @NotNull ComparisonPolicy comparisonPolicy) { if (chunk1 == null) chunk1 = ""; if (chunk2 == null) chunk2 = ""; return ComparisonUtil.isEqualTexts(chunk1, chunk2, comparisonPolicy); }
isChunksEquals
256,229
boolean (@NotNull Editor editor, @NotNull Condition<? super BitSet> condition) { List<Caret> carets = editor.getCaretModel().getAllCarets(); if (carets.size() != 1) return true; Caret caret = carets.get(0); if (caret.hasSelection()) return true; return condition.value(getSelectedLines(editor)); }
isSomeRangeSelected
256,230
BitSet (@NotNull Editor editor) { Document document = editor.getDocument(); int totalLines = getLineCount(document); BitSet lines = new BitSet(totalLines + 1); for (Caret caret : editor.getCaretModel().getAllCarets()) { appendSelectedLines(editor, lines, caret); } return lines; }
getSelectedLines
256,231
void (@NotNull Editor editor, @NotNull BitSet lines, @NotNull Caret caret) { Document document = editor.getDocument(); int totalLines = getLineCount(document); if (caret.hasSelection()) { int line1 = editor.offsetToLogicalPosition(caret.getSelectionStart()).line; int line2 = editor.offsetToLogicalPosition(caret.getSele...
appendSelectedLines
256,232
boolean (int line, int line1, int line2) { if (line1 == line2 && line == line1) { return true; } if (line >= line1 && line < line2) { return true; } return false; }
isSelectedByLine
256,233
boolean (@NotNull BitSet selected, int line1, int line2) { if (line1 == line2) { return selected.get(line1); } else { int next = selected.nextSetBit(line1); return next != -1 && next < line2; } }
isSelectedByLine
256,234
void (@NotNull Document document, int line1, int line2) { TextRange range = getLinesRange(document, line1, line2); int offset1 = range.getStartOffset(); int offset2 = range.getEndOffset(); if (offset1 > 0) { offset1--; } else if (offset2 < document.getTextLength()) { offset2++; } document.deleteString(offset1, offset2)...
deleteLines
256,235
void (@NotNull Document document, int line, @NotNull CharSequence text) { if (line == getLineCount(document)) { document.insertString(document.getTextLength(), "\n" + text); } else { document.insertString(document.getLineStartOffset(line), text + "\n"); } }
insertLines
256,236
void (@NotNull Document document, int line1, int line2, @NotNull CharSequence text) { TextRange currentTextRange = getLinesRange(document, line1, line2); int offset1 = currentTextRange.getStartOffset(); int offset2 = currentTextRange.getEndOffset(); document.replaceString(offset1, offset2, text); }
replaceLines
256,237
void (@NotNull Document document, int line1, int line2, @NotNull List<? extends CharSequence> newLines) { if (line1 == line2 && newLines.isEmpty()) return; if (line1 == line2) { insertLines(document, line1, StringUtil.join(newLines, "\n")); } else if (newLines.isEmpty()) { deleteLines(document, line1, line2); } else { ...
applyModification
256,238
void (@NotNull Document document1, int line1, int line2, @NotNull Document document2, int oLine1, int oLine2) { if (line1 == line2 && oLine1 == oLine2) return; if (line1 == line2) { insertLines(document1, line1, getLinesContent(document2, oLine1, oLine2)); } else if (oLine1 == oLine2) { deleteLines(document1, line1, li...
applyModification
256,239
String (@NotNull CharSequence text, @NotNull LineOffsets lineOffsets, @NotNull CharSequence otherText, @NotNull LineOffsets otherLineOffsets, @NotNull List<? extends Range> ranges) { return new Object() { private final StringBuilder stringBuilder = new StringBuilder(); private boolean isEmpty = true; @NotNull public St...
applyModification
256,240
String () { int lastLine = 0; for (Range range : ranges) { CharSequence newChunkContent = DiffRangeUtil.getLinesContent(otherText, otherLineOffsets, range.start2, range.end2); appendOriginal(lastLine, range.start1); append(newChunkContent, range.end2 - range.start2); lastLine = range.end1; } appendOriginal(lastLine, li...
execute
256,241
void (int start, int end) { append(DiffRangeUtil.getLinesContent(text, lineOffsets, start, end), end - start); }
appendOriginal
256,242
void (CharSequence content, int lineCount) { if (lineCount > 0 && !isEmpty) { stringBuilder.append('\n'); } stringBuilder.append(content); isEmpty &= lineCount == 0; }
append
256,243
void (@NotNull Document document, int startLine, int endLine) { if (document.getTextLength() == 0) return; // empty document has no lines if (startLine == endLine) return; ((DocumentImpl)document).clearLineModificationFlags(startLine, endLine); }
clearLineModificationFlags
256,244
CharSequence (@NotNull Document document, int line1, int line2) { return getLinesRange(document, line1, line2).subSequence(document.getImmutableCharSequence()); }
getLinesContent
256,245
CharSequence (@NotNull Document document, int line1, int line2, boolean includeNewLine) { return getLinesRange(document, line1, line2, includeNewLine).subSequence(document.getImmutableCharSequence()); }
getLinesContent
256,246
TextRange (@NotNull Document document, int line1, int line2) { return getLinesRange(document, line1, line2, false); }
getLinesRange
256,247
TextRange (@NotNull Document document, int line1, int line2, boolean includeNewline) { return DiffRangeUtil.getLinesRange(LineOffsetsUtil.create(document), line1, line2, includeNewline); }
getLinesRange
256,248
int (@NotNull Document document, int line, int column) { if (line < 0) return 0; if (line >= getLineCount(document)) return document.getTextLength(); int start = document.getLineStartOffset(line); int end = document.getLineEndOffset(line); return Math.min(start + column, end); }
getOffset
256,249
int (@NotNull Document document) { return Math.max(document.getLineCount(), 1); }
getLineCount
256,250
List<String> (@NotNull Document document) { return getLines(document, 0, getLineCount(document)); }
getLines
256,251
List<String> (@NotNull Document document, int startLine, int endLine) { return DiffRangeUtil.getLines(document.getCharsSequence(), LineOffsetsUtil.create(document), startLine, endLine); }
getLines
256,252
int (int value, int lowerBound, int upperBound) { assert lowerBound <= upperBound : String.format("%s - [%s, %s]", value, lowerBound, upperBound); return MathUtil.clamp(value, lowerBound, upperBound); }
bound
256,253
LineRange (@NotNull DocumentEvent e) { int line1 = e.getDocument().getLineNumber(e.getOffset()); int line2 = e.getDocument().getLineNumber(e.getOffset() + e.getOldLength()) + 1; return new LineRange(line1, line2); }
getAffectedLineRange
256,254
int (@NotNull DocumentEvent e) { return StringUtil.countNewLines(e.getNewFragment()) - StringUtil.countNewLines(e.getOldFragment()); }
countLinesShift
256,255
UpdatedLineRange (int start, int end, int changeStart, int changeEnd, int shift) { return updateRangeOnModification(start, end, changeStart, changeEnd, shift, false); }
updateRangeOnModification
256,256
UpdatedLineRange (int start, int end, int changeStart, int changeEnd, int shift, boolean greedy) { if (end <= changeStart) { // change before return new UpdatedLineRange(start, end, false); } if (start >= changeEnd) { // change after return new UpdatedLineRange(start + shift, end + shift, false); } if (start <= changeS...
updateRangeOnModification
256,257
TextDiffType (@NotNull LineFragment fragment) { boolean left = fragment.getStartLine1() != fragment.getEndLine1(); boolean right = fragment.getStartLine2() != fragment.getEndLine2(); return getDiffType(left, right); }
getLineDiffType
256,258
TextDiffType (@NotNull DiffFragment fragment) { boolean left = fragment.getEndOffset1() != fragment.getStartOffset1(); boolean right = fragment.getEndOffset2() != fragment.getStartOffset2(); return getDiffType(left, right); }
getDiffType
256,259
TextDiffType (@NotNull Range range) { boolean left = range.start1 != range.end1; boolean right = range.start2 != range.end2; return getDiffType(left, right); }
getDiffType
256,260
TextDiffType (boolean hasDeleted, boolean hasInserted) { if (hasDeleted && hasInserted) { return TextDiffType.MODIFIED; } else if (hasDeleted) { return TextDiffType.DELETED; } else if (hasInserted) { return TextDiffType.INSERTED; } else { LOG.error("Diff fragment should not be empty"); return TextDiffType.MODIFIED; } }
getDiffType
256,261
TextDiffType (@NotNull MergeConflictType conflictType) { return switch (conflictType.getType()) { case INSERTED -> TextDiffType.INSERTED; case DELETED -> TextDiffType.DELETED; case MODIFIED -> TextDiffType.MODIFIED; case CONFLICT -> TextDiffType.CONFLICT; }; }
getDiffType
256,262
boolean (@Nullable Project project, @NotNull Document document, @Nullable @NlsContexts.Command String commandName, @Nullable String commandGroupId, @NotNull UndoConfirmationPolicy confirmationPolicy, boolean underBulkUpdate, @NotNull Runnable task) { return executeWriteCommand(project, document, commandName, commandGro...
executeWriteCommand
256,263
boolean (@Nullable Project project, @NotNull Document document, @Nullable @NlsContexts.Command String commandName, @Nullable String commandGroupId, @NotNull UndoConfirmationPolicy confirmationPolicy, boolean underBulkUpdate, boolean shouldRecordCommandForActiveDocument, @NotNull Runnable task) { if (!makeWritable(proje...
executeWriteCommand
256,264
boolean (@NotNull final Document document, @Nullable final Project project, @Nullable @Nls final String commandName, @NotNull final Runnable task) { return executeWriteCommand(project, document, commandName, null, UndoConfirmationPolicy.DEFAULT, false, task); }
executeWriteCommand
256,265
boolean (@NotNull Editor editor) { return !editor.isViewer() && canMakeWritable(editor.getDocument()); }
isEditable
256,266
boolean (@NotNull Document document) { if (document.isWritable()) { return true; } VirtualFile file = FileDocumentManager.getInstance().getFile(document); if (file != null && file.isValid() && file.isInLocalFileSystem()) { if (file.getUserData(TEMP_FILE_KEY) == Boolean.TRUE) return false; // decompiled file can be writ...
canMakeWritable
256,267
boolean (@Nullable Project project, @NotNull Document document) { VirtualFile file = FileDocumentManager.getInstance().getFile(document); if (file == null) return document.isWritable(); if (!file.isValid()) return false; return makeWritable(project, file) && document.isWritable(); }
makeWritable
256,268
boolean (@Nullable Project project, @NotNull VirtualFile file) { if (project == null) project = ProjectManager.getInstance().getDefaultProject(); return !ReadonlyStatusHandler.getInstance(project).ensureFilesWritable(Collections.singletonList(file)).hasReadonlyFiles(); }
makeWritable
256,269
void (@Nullable Project project, @NotNull Document document) { UndoManager undoManager = project != null ? UndoManager.getInstance(project) : UndoManager.getGlobalInstance(); if (undoManager != null) { DocumentReference ref = DocumentReferenceManager.getInstance().create(document); undoManager.nonundoableActionPerforme...
putNonundoableOperation
256,270
void (VirtualFile @NotNull ... files) { if (GeneralSettings.getInstance().isSyncOnFrameActivation()) { markDirtyAndRefresh(true, false, false, files); } }
refreshOnFrameActivation
256,271
void (boolean async, boolean recursive, boolean reloadChildren, VirtualFile @NotNull ... files) { if (files.length == 0) return; ModalityState modalityState = ApplicationManager.getApplication().getDefaultModalityState(); VfsUtil.markDirty(recursive, reloadChildren, files); RefreshQueue.getInstance().refresh(async, rec...
markDirtyAndRefresh
256,272
Dimension () { return new Dimension(400, 200); }
getDefaultDiffPanelSize
256,273
Dimension () { Rectangle screenBounds = ScreenUtil.getMainScreenBounds(); int width = (int)(screenBounds.width * 0.8); int height = (int)(screenBounds.height * 0.8); return new Dimension(width, height); }
getDefaultDiffWindowSize
256,274
void (@Nullable Window window, boolean modalOnly, boolean recursive) { if (window == null) return; Component component = window; while (component != null) { if (component instanceof Window) { boolean isClosed = closeWindow((Window)component, modalOnly); if (!isClosed) break; } component = recursive ? component.getParen...
closeWindow
256,275
boolean (@NotNull Window window, boolean modalOnly) { if (window instanceof IdeFrameImpl || (modalOnly && canBeHiddenBehind(window))) { return false; } if (window instanceof DialogWrapperDialog) { ((DialogWrapperDialog)window).getDialogWrapper().doCancelAction(); return !window.isVisible(); } window.setVisible(false); ...
closeWindow
256,276
boolean (@NotNull Window window) { if (!(window instanceof Frame)) return false; if (SystemInfo.isMac) { if (window instanceof IdeFrame) { // we can't move focus to full-screen main frame, as it will be hidden behind other frame windows Project project = ((IdeFrame)window).getProject(); IdeFrame projectFrame = WindowMa...
canBeHiddenBehind
256,277
boolean (@NotNull Key<Boolean> key, UserDataHolder... holders) { for (UserDataHolder holder : holders) { if (holder == null) continue; Boolean data = holder.getUserData(key); if (data != null) return data; } return false; }
isUserDataFlagSet
256,278
void (@Nullable DiffNotificationProvider provider, @NotNull UserDataHolder holder) { if (provider == null) return; List<DiffNotificationProvider> newProviders = new ArrayList<>(getNotificationProviders(holder)); newProviders.add(provider); holder.putUserData(DiffUserDataKeys.NOTIFICATION_PROVIDERS, newProviders); }
addNotification
256,279
List<JComponent> (@Nullable DiffViewer viewer, @NotNull UserDataHolder context, @NotNull UserDataHolder request) { List<DiffNotificationProvider> contextProviders = getNotificationProviders(context); List<DiffNotificationProvider> requestProviders = getNotificationProviders(request); return createNotifications(viewer, ...
createCustomNotifications
256,280
List<JComponent> (@Nullable DiffViewer viewer, @NotNull DiffContent content) { List<DiffNotificationProvider> providers = getNotificationProviders(content); return createNotifications(viewer, providers); }
createCustomNotifications
256,281
List<DiffNotificationProvider> (@NotNull UserDataHolder holder) { return ContainerUtil.notNullize(holder.getUserData(DiffUserDataKeys.NOTIFICATION_PROVIDERS)); }
getNotificationProviders
256,282
List<JComponent> (@Nullable DiffViewer viewer, @NotNull List<? extends DiffNotificationProvider> providers) { List<JComponent> notifications = ContainerUtil.mapNotNull(providers, it -> it.createNotification(viewer)); return wrapEditorNotificationBorders(notifications); }
createNotifications
256,283
List<JComponent> (@NotNull List<? extends JComponent> notifications) { return ContainerUtil.map(notifications, component -> wrapEditorNotificationComponent(component)); }
wrapEditorNotificationBorders
256,284
JComponent (JComponent component) { Border border = ClientProperty.get(component, FileEditorManager.SEPARATOR_BORDER); if (border == null) return component; Wrapper wrapper = new InvisibleWrapper(); wrapper.setContent(component); wrapper.setBorder(border); return wrapper; }
wrapEditorNotificationComponent
256,285
Object (@Nullable DataProvider provider, @Nullable DataProvider fallbackProvider, @NotNull @NonNls String dataId) { if (provider != null) { Object data = provider.getData(dataId); if (data != null) return data; } if (fallbackProvider != null) { Object data = fallbackProvider.getData(dataId); if (data != null) return da...
getData
256,286
DiffSettings (@NotNull DiffContext context) { DiffSettings settings = context.getUserData(DiffSettings.KEY); if (settings == null) { settings = DiffSettings.getSettings(context.getUserData(DiffUserDataKeys.PLACE)); context.putUserData(DiffSettings.KEY, settings); } return settings; }
getDiffSettings
256,287
DiffTool (@NotNull DiffTool tool, @NotNull DiffContext context, @NotNull DiffRequest request) { for (DiffToolSubstitutor substitutor : DiffToolSubstitutor.EP_NAME.getExtensions()) { DiffTool replacement = substitutor.getReplacement(tool, context, request); if (replacement == null) continue; boolean canShow = replacemen...
findToolSubstitutor
256,288
void (@NotNull Graphics2D g, int x1, int x2, int y1, int y2, int lineHeight, boolean isHovered, @Nullable EditorColorsScheme scheme) { if (x1 == x2) return; int step = getStepSize(lineHeight); int height = getHeight(lineHeight); int extraGap = getAAGap(); int verticalOffset = getVerticalOffset(lineHeight); int vertical...
drawConnectorLine
256,289
void (@NotNull Editor editor, @NotNull Graphics g, @NotNull Rectangle r) { if (!myPresentation.isVisible()) return; boolean isHovered = myPresentation.isHovered(); int y = r.y; int lineHeight = myEditor.getLineHeight(); EditorGutterComponentEx gutter = ((EditorEx)editor).getGutterComponentEx(); int annotationsOffset = ...
paint
256,290
boolean (@NotNull Editor editor, @NotNull MouseEvent e) { return myPresentation.isVisible() && myPresentation.isHovered(); }
canDoAction
256,291
void (@NotNull Editor editor, @NotNull MouseEvent e) { myPresentation.setExpanded(true); }
doAction
256,292
String () { return DiffBundle.message("diff.unchanged.lines.folding.marker.renderer"); }
getAccessibleName
256,293
void (Graphics g, int x1, int x2, int y) { if (!myPresentation.isVisible()) return; boolean isHovered = myPresentation.isHovered(); y++; // we want y to be line's top position final int gutterWidth = ((EditorEx)myEditor).getGutterComponentEx().getWidth(); int lineHeight = myEditor.getLineHeight(); int interval = getSte...
drawLine
256,294
void (Graphics2D g, int x, int y, int shiftX, int lineHeight, boolean isHovered, @NotNull EditorImpl editor, @NotNull String description) { EditorColorsScheme scheme = editor.getColorsScheme(); int rectX = x + JBUIScale.scale(5); int rectWidth = HintRenderer.calcWidthInPixels(editor, description, null); Shape oldClip =...
drawWithDescription
256,295
void (@NotNull Graphics g, int shiftX, int shiftY, int lineHeight, boolean isHovered, @NotNull EditorColorsScheme scheme) { int step = getStepSize(lineHeight); int height = getHeight(lineHeight); Color color = getWaveColor(scheme); Rectangle clip = g.getClipBounds(); if (clip.width <= 0) return; int startX = clip.x - s...
draw
256,296
BufferedImage (@NotNull Graphics2D g, @NotNull Color color, boolean isHovered, int step, int height) { Object[] key = new Object[]{color.getRGB(), JBUIScale.sysScale(g), isHovered, step, height}; if (Arrays.equals(ourCachedImageKey, key) && outCachedImage != null) return outCachedImage; int extraGap = getAAGap(); int i...
createImage
256,297
int (int lineHeight) { // the divider needs ~3 half-periods (6 steps) to be drawn nicely return Math.max(JBUIScale.scale(Registry.intValue("diff.divider.width")) / 6, 2); }
getStepSize
256,298
int (int lineHeight) { return JBUI.scale(3); }
getHeight
256,299
int (int lineHeight) { int height = getHeight(lineHeight); return (lineHeight - 2 * height - 2 * getAAGap()) / 2; }
getVerticalOffset