Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
257,000 | boolean (@NotNull ThreesideDiffChangeBase change, @NotNull BitSet lines, @NotNull ThreeSide side) { if (!isEnabled(change)) return false; int line1 = change.getStartLine(side); int line2 = change.getEndLine(side); return DiffUtil.isSelectedByLine(lines, line1, line2); } | isChangeSelected |
257,001 | void (@NotNull Handler handler) { ThreeSide left = mySide.select(ThreeSide.LEFT, ThreeSide.BASE); ThreeSide right = mySide.select(ThreeSide.BASE, ThreeSide.RIGHT); for (SimpleThreesideDiffChange diffChange : myDiffChanges) { if (!diffChange.isChange(mySide)) continue; if (!handler.process(diffChange.getStartLine(left),... | process |
257,002 | void (@Nullable SimpleDiffChange previousChange) { assert myHighlighters.isEmpty() && myOperations.isEmpty(); createHighlighter(Side.LEFT); createHighlighter(Side.RIGHT); List<DiffFragment> innerFragments = myChange.getFragment().getInnerFragments(); for (DiffFragment fragment : ContainerUtil.notNullize(innerFragments)... | installHighlighter |
257,003 | void () { for (RangeHighlighter highlighter : myHighlighters) { highlighter.dispose(); } myHighlighters.clear(); for (DiffGutterOperation operation : myOperations) { operation.dispose(); } myOperations.clear(); } | destroyHighlighter |
257,004 | void () { if (myChange.isSkipped()) return; myOperations.add(createAcceptOperation(Side.LEFT)); myOperations.add(createAcceptOperation(Side.RIGHT)); } | doInstallActionHighlighters |
257,005 | void (@NotNull Side side) { Editor editor = myViewer.getEditor(side); TextDiffType type = myChange.getDiffType(); int startLine = myChange.getStartLine(side); int endLine = myChange.getEndLine(side); boolean ignored = myChange.getFragment().getInnerFragments() != null; boolean alignedSides = myViewer.needAlignChanges()... | createHighlighter |
257,006 | void (@NotNull DiffFragment innerFragment, @NotNull Side side) { if (myChange.isSkipped()) return; int start = side.getStartOffset(innerFragment); int end = side.getEndOffset(innerFragment); TextDiffType type = DiffUtil.getDiffType(innerFragment); int startOffset = side.getStartOffset(myChange.getFragment()); start += ... | createInlineHighlighter |
257,007 | void (@Nullable SimpleDiffChange previousChange, @NotNull Side side) { if (previousChange == null) return; int startLine = myChange.getStartLine(side); int endLine = myChange.getEndLine(side); int prevStartLine = previousChange.getStartLine(side); int prevEndLine = previousChange.getEndLine(side); if (startLine == endL... | createNonSquashedChangesSeparator |
257,008 | void (boolean force) { for (DiffGutterOperation operation : myOperations) { operation.update(force); } } | updateGutterActions |
257,009 | void () { for (DiffGutterOperation operation : myOperations) { operation.dispose(); } myOperations.clear(); } | invalidate |
257,010 | boolean (@NotNull DiffDividerDrawUtil.DividerPaintable.Handler handler) { int startLine1 = myChange.getStartLine(Side.LEFT); int endLine1 = myChange.getEndLine(Side.LEFT); int startLine2 = myChange.getStartLine(Side.RIGHT); int endLine2 = myChange.getEndLine(Side.RIGHT); TextDiffType type = myChange.getDiffType(); if (... | drawDivider |
257,011 | DiffGutterOperation (@NotNull Side side, @NotNull DiffGutterOperation.ModifiersRendererBuilder builder) { int offset = side.getStartOffset(myChange.getFragment()); EditorEx editor = myViewer.getEditor(side); return new DiffGutterOperation.WithModifiers(editor, offset, myViewer.getModifierProvider(), builder); } | createOperation |
257,012 | DiffGutterOperation (@NotNull Side side) { return createOperation(side, (ctrlPressed, shiftPressed, altPressed) -> { boolean isOtherEditable = myViewer.isEditable(side.other()); boolean isAppendable = myChange.getDiffType() == TextDiffType.MODIFIED; if (isOtherEditable) { if (ctrlPressed && isAppendable) { return creat... | createAcceptOperation |
257,013 | GutterIconRenderer (@NotNull final Side side) { String text = getApplyActionText(myViewer, side); Icon icon = DiffUtil.getArrowIcon(side); String actionId = side.select("Diff.ApplyLeftSide", "Diff.ApplyRightSide"); Shortcut[] shortcuts = KeymapManager.getInstance().getActiveKeymap().getShortcuts(actionId); String short... | createApplyRenderer |
257,014 | GutterIconRenderer (@NotNull final Side side) { return createIconRenderer(side, DiffBundle.message("action.presentation.diff.append.text"), DiffUtil.getArrowDownIcon(side), () -> myViewer.appendChange(myChange, side)); } | createAppendRenderer |
257,015 | GutterIconRenderer (@NotNull final Side sourceSide, @NotNull @Nls final String tooltipText, @NotNull final Icon icon, @NotNull final Runnable perform) { return new DiffGutterRenderer(icon, tooltipText) { @Override protected void handleMouseClick() { if (!myChange.isValid()) return; final Project project = myViewer.getP... | createIconRenderer |
257,016 | void () { if (!myChange.isValid()) return; final Project project = myViewer.getProject(); final Document document = myViewer.getEditor(sourceSide.other()).getDocument(); DiffUtil.executeWriteCommand(document, project, DiffBundle.message("message.replace.change.command"), perform); } | handleMouseClick |
257,017 | List<AnAction> () { List<AnAction> group = new ArrayList<>(myTextDiffProvider.getToolbarActions()); group.add(new MyToggleExpandByDefaultAction()); group.add(new MyReadOnlyLockAction()); group.add(myEditorSettingsAction); group.add(Separator.getInstance()); group.addAll(super.createToolbarActions()); return group; } | createToolbarActions |
257,018 | List<AnAction> () { List<AnAction> group = new ArrayList<>(myTextDiffProvider.getPopupActions()); group.add(Separator.getInstance()); group.addAll(super.createPopupActions()); return group; } | createPopupActions |
257,019 | void () { super.processContextHints(); myInitialScrollHelper.processContext(myRequest); } | processContextHints |
257,020 | void () { super.updateContextHints(); myInitialScrollHelper.updateContext(myRequest); } | updateContextHints |
257,021 | Runnable (@NotNull final ProgressIndicator indicator) { return () -> { clearDiffPresentation(); boolean shouldHighlight = getTextSettings().getHighlightPolicy() != HighlightPolicy.DO_NOT_HIGHLIGHT; if (shouldHighlight) { final DocumentContent content = getContent(); final Document document = content.getDocument(); Text... | performRediff |
257,022 | void () { myPanel.resetNotifications(); for (RangeHighlighter highlighter : myHighlighters) { highlighter.dispose(); } myHighlighters.clear(); } | clearDiffPresentation |
257,023 | void (final boolean animated) { DiffUtil.moveCaret(getEditor(), 0); DiffUtil.scrollEditor(getEditor(), 0, animated); } | doScrollToChange |
257,024 | boolean (@NotNull DiffNavigationContext context) { if (getSide().isLeft()) return false; AllLinesIterator allLinesIterator = new AllLinesIterator(getEditor().getDocument()); int line = context.contextMatchCheck(allLinesIterator); if (line == -1) return false; scrollToLine(line); return true; } | doScrollToContext |
257,025 | boolean (@NotNull DiffContext context, @NotNull DiffRequest request) { return OnesideTextDiffViewer.canShowRequest(context, request); } | canShowRequest |
257,026 | Object (@NotNull @NonNls String dataId) { if (DiffDataKeys.CURRENT_CHANGE_RANGE.is(dataId)) { int lineCount = getLineCount(getEditor().getDocument()); return new LineRange(0, lineCount); } return super.getData(dataId); } | getData |
257,027 | boolean () { if (myScrollToChange == null) return false; SimpleOnesideDiffViewer.this.doScrollToChange(false); return true; } | doScrollToChange |
257,028 | boolean () { SimpleOnesideDiffViewer.this.doScrollToChange(false); return true; } | doScrollToFirstChange |
257,029 | boolean () { if (myNavigationContext == null) return false; return SimpleOnesideDiffViewer.this.doScrollToContext(myNavigationContext); } | doScrollToContext |
257,030 | boolean () { if (myCaretPosition == null) return false; LogicalPosition position = getSide().select(myCaretPosition); getEditor().getCaretModel().moveToLogicalPosition(position); if (myEditorsPosition != null && myEditorsPosition.isSame(position)) { DiffUtil.scrollToPoint(getEditor(), myEditorsPosition.myPoints[0], fal... | doScrollToPosition |
257,031 | ThreeState () { return myIsContentsEqual; } | isContentsEqual |
257,032 | List<SimpleDiffChange> () { return Collections.unmodifiableList(myValidChanges); } | getChanges |
257,033 | List<SimpleDiffChange> () { return ContainerUtil.filter(myAllChanges, it -> !it.isDestroyed()); } | getAllChanges |
257,034 | void (@NotNull List<? extends SimpleDiffChange> changes, boolean isContentsEqual) { clear(); for (int i = 0; i < changes.size(); i++) { SimpleDiffChange change = changes.get(i); SimpleDiffChange previousChange = i != 0 ? changes.get(i - 1) : null; SimpleDiffChangeUi changeUi = myViewer.createUi(change); changeUi.instal... | setChanges |
257,035 | void () { for (SimpleDiffChangeUi changeUi : myPresentations) { if (changeUi != null) changeUi.destroyHighlighter(); } myValidChanges.clear(); myAllChanges.clear(); myPresentations.clear(); myIsContentsEqual = ThreeState.UNSURE; } | clear |
257,036 | void (@NotNull SimpleDiffChange change) { SimpleDiffChangeUi changeUi = myPresentations.set(change.getIndex(), null); if (changeUi != null) changeUi.destroyHighlighter(); myValidChanges.remove(change); change.markDestroyed(); } | destroyChange |
257,037 | void (boolean force) { for (SimpleDiffChangeUi changeUi : myPresentations) { if (changeUi != null) changeUi.updateGutterActions(force); } } | updateGutterActions |
257,038 | void (@NotNull Side side, @NotNull DocumentEvent e) { if (myValidChanges.isEmpty()) return; LineRange lineRange = DiffUtil.getAffectedLineRange(e); int shift = DiffUtil.countLinesShift(e); Set<SimpleDiffChange> invalidated = new HashSet<>(); for (SimpleDiffChange change : myValidChanges) { if (change.processDocumentCha... | handleBeforeDocumentChange |
257,039 | void (@NotNull Graphics2D g, @NotNull JComponent divider) { MyPaintable paintable = new MyPaintable(myPresentations); DiffDividerDrawUtil.paintPolygons(g, divider.getWidth(), myViewer.getEditor1(), myViewer.getEditor2(), paintable); } | paintPolygons |
257,040 | void (@NotNull DiffDividerDrawUtil.DividerPaintable.Handler handler) { for (SimpleDiffChangeUi diffChange : myPresentations) { if (diffChange == null) continue; boolean keepWalk = diffChange.drawDivider(handler); if (!keepWalk) return; } } | process |
257,041 | void () { super.onInit(); myContentPanel.setPainter(new MyDividerPainter()); myModifierProvider.init(); } | onInit |
257,042 | void () { Disposer.dispose(myAlignedDiffModel); super.onDispose(); } | onDispose |
257,043 | List<AnAction> () { List<AnAction> group = new ArrayList<>(myTextDiffProvider.getToolbarActions()); group.add(new MyToggleExpandByDefaultAction()); group.add(new MyToggleAutoScrollAction()); group.add(new MyReadOnlyLockAction()); group.add(myEditorSettingsAction); group.add(Separator.getInstance()); group.addAll(super.... | createToolbarActions |
257,044 | List<AnAction> () { List<AnAction> group = new ArrayList<>(myTextDiffProvider.getPopupActions()); group.add(new MyToggleAutoScrollAction()); group.add(new MyToggleExpandByDefaultAction()); group.add(Separator.getInstance()); group.addAll(super.createPopupActions()); return group; } | createPopupActions |
257,045 | List<AnAction> () { List<AnAction> group = new ArrayList<>(); group.add(new ReplaceSelectedChangesAction(Side.LEFT)); group.add(new AppendSelectedChangesAction(Side.LEFT)); group.add(new ReplaceSelectedChangesAction(Side.RIGHT)); group.add(new AppendSelectedChangesAction(Side.RIGHT)); group.add(Separator.getInstance())... | createEditorPopupActions |
257,046 | void () { super.processContextHints(); myInitialScrollHelper.processContext(myRequest); } | processContextHints |
257,047 | void () { super.updateContextHints(); myFoldingModel.updateContext(myRequest, getFoldingModelSettings()); myInitialScrollHelper.updateContext(myRequest); } | updateContextHints |
257,048 | SimpleDiffChangeUi (@NotNull SimpleDiffChange change) { return new SimpleDiffChangeUi(this, change); } | createUi |
257,049 | FoldingModelSupport () { return myFoldingModel; } | getFoldingModel |
257,050 | boolean () { return myAlignedDiffModel.needAlignChanges(); } | needAlignChanges |
257,051 | TwosideTextDiffProvider () { return myTextDiffProvider; } | getTextDiffProvider |
257,052 | void () { super.onSlowRediff(); myStatusPanel.setBusy(true); myInitialScrollHelper.onSlowRediff(); } | onSlowRediff |
257,053 | Runnable (@NotNull final ProgressIndicator indicator) { try { return computeDifferences(indicator); } catch (DiffTooBigException e) { return applyNotification(DiffNotifications.createDiffTooBig()); } catch (ProcessCanceledException e) { throw e; } catch (Throwable e) { LOG.error(e); return applyNotification(DiffNotific... | performRediff |
257,054 | Runnable (@NotNull ProgressIndicator indicator) { indicator.checkCanceled(); final Document document1 = getContent1().getDocument(); final Document document2 = getContent2().getDocument(); CharSequence[] texts = ReadAction.compute(() -> new CharSequence[]{document1.getImmutableCharSequence(), document2.getImmutableChar... | computeDifferences |
257,055 | Runnable (@Nullable List<? extends SimpleDiffChange> changes, boolean isContentsEqual) { List<SimpleDiffChange> nonSkipped = changes != null ? ContainerUtil.filter(changes, it -> !it.isSkipped()) : null; FoldingModelSupport.Data foldingState = myFoldingModel.createState(nonSkipped, getFoldingModelSettings()); return ()... | apply |
257,056 | Runnable (@Nullable final JComponent notification) { return () -> { clearDiffPresentation(); myFoldingModel.destroy(); if (notification != null) myPanel.addNotification(notification); }; } | applyNotification |
257,057 | void () { myModel.clear(); myAlignedDiffModel.clear(); myPanel.resetNotifications(); myStatusPanel.setBusy(false); myContentPanel.repaintDivider(); myStatusPanel.update(); } | clearDiffPresentation |
257,058 | void (@NotNull DocumentEvent e) { super.onBeforeDocumentChange(e); List<Document> documents = ContainerUtil.map(getEditors(), Editor::getDocument); Side side = Side.fromValue(documents, e.getDocument()); if (side == null) { LOG.warn("Unknown document changed"); return; } myModel.handleBeforeDocumentChange(side, e); } | onBeforeDocumentChange |
257,059 | boolean (@NotNull ScrollToPolicy scrollToPolicy) { SimpleDiffChange targetChange = scrollToPolicy.select(getNonSkippedDiffChanges()); if (targetChange == null) targetChange = scrollToPolicy.select(getDiffChanges()); if (targetChange == null) return false; doScrollToChange(targetChange, false); return true; } | doScrollToChange |
257,060 | void (@NotNull SimpleDiffChange change, final boolean animated) { final int line1 = change.getStartLine(Side.LEFT); final int line2 = change.getStartLine(Side.RIGHT); final int endLine1 = change.getEndLine(Side.LEFT); final int endLine2 = change.getEndLine(Side.RIGHT); DiffUtil.moveCaret(getEditor1(), line1); DiffUtil.... | doScrollToChange |
257,061 | boolean (@NotNull DiffNavigationContext context) { ChangedLinesIterator changedLinesIterator = new ChangedLinesIterator(); int line = context.contextMatchCheck(changedLinesIterator); if (line == -1) { // this will work for the case, when spaces changes are ignored, and corresponding fragments are not reported as change... | doScrollToContext |
257,062 | List<SimpleDiffChange> () { return myModel.getChanges(); } | getDiffChanges |
257,063 | List<SimpleDiffChange> () { return ContainerUtil.filter(myModel.getChanges(), it -> !it.isSkipped()); } | getNonSkippedDiffChanges |
257,064 | StatusPanel () { return myStatusPanel; } | getStatusPanel |
257,065 | int () { return getNonSkippedDiffChanges().size(); } | getTotalDifferences |
257,066 | KeyboardModifierListener () { return myModifierProvider; } | getModifierProvider |
257,067 | boolean (@NotNull Side side) { return DiffUtil.isEditable(getEditor(side)); } | isEditable |
257,068 | boolean (@NotNull DiffContext context, @NotNull DiffRequest request) { return TwosideTextDiffViewer.canShowRequest(context, request); } | canShowRequest |
257,069 | boolean (@NotNull Side side) { if (getDiffChanges().isEmpty()) return false; EditorEx editor = getEditor(side); return DiffUtil.isSomeRangeSelected(editor, lines -> ContainerUtil.exists(getDiffChanges(), change -> isChangeSelected(change, lines, side))); } | isSomeChangeSelected |
257,070 | List<SimpleDiffChange> (@NotNull Side side) { EditorEx editor = getEditor(side); BitSet lines = DiffUtil.getSelectedLines(editor); return ContainerUtil.filter(getDiffChanges(), change -> isChangeSelected(change, lines, side)); } | getSelectedChanges |
257,071 | boolean (SimpleDiffChange change, @NotNull BitSet lines, @NotNull Side side) { int line1 = change.getStartLine(side); int line2 = change.getEndLine(side); return DiffUtil.isSelectedByLine(lines, line1, line2); } | isChangeSelected |
257,072 | SimpleDiffChange (@NotNull Side side) { int caretLine = getEditor(side).getCaretModel().getLogicalPosition().line; for (SimpleDiffChange change : getDiffChanges()) { int line1 = change.getStartLine(side); int line2 = change.getEndLine(side); if (DiffUtil.isSelectedByLine(caretLine, line1, line2)) return change; } retur... | getSelectedChange |
257,073 | List<SimpleDiffChange> () { return getNonSkippedDiffChanges(); } | getChanges |
257,074 | EditorEx () { return getCurrentEditor(); } | getEditor |
257,075 | int (@NotNull SimpleDiffChange change) { return change.getStartLine(getCurrentSide()); } | getStartLine |
257,076 | int (@NotNull SimpleDiffChange change) { return change.getEndLine(getCurrentSide()); } | getEndLine |
257,077 | void (@NotNull SimpleDiffChange change) { doScrollToChange(change, true); } | scrollToChange |
257,078 | void (boolean readOnly) { super.doApply(readOnly); myModel.updateGutterActions(true); } | doApply |
257,079 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
257,080 | void (@NotNull AnActionEvent e) { if (DiffUtil.isFromShortcut(e)) { // consume shortcut even if there are nothing to do - avoid calling some other action e.getPresentation().setEnabledAndVisible(true); return; } Editor editor = e.getData(CommonDataKeys.EDITOR); Side side = Side.fromValue(getEditors(), editor); if (side... | update |
257,081 | void (@NotNull AnActionEvent e) { Editor editor = e.getData(CommonDataKeys.EDITOR); final Side side = Side.fromValue(getEditors(), editor); if (side == null) return; final List<SimpleDiffChange> selectedChanges = getSelectedChanges(side); if (selectedChanges.isEmpty()) return; doPerform(e, side, ContainerUtil.reverse(s... | actionPerformed |
257,082 | boolean (@NotNull Side side) { if (!isEditable(myModifiedSide)) return false; return !isBothEditable() || side == myModifiedSide.other(); } | isVisible |
257,083 | void (@NotNull AnActionEvent e, @NotNull Side side, @NotNull List<? extends SimpleDiffChange> changes) { if (!isEditable(myModifiedSide)) return; String title = DiffBundle.message("message.use.selected.changes.command", e.getPresentation().getText()); DiffUtil.executeWriteCommand(getEditor(myModifiedSide).getDocument()... | doPerform |
257,084 | boolean () { return isEditable(Side.LEFT) && isEditable(Side.RIGHT); } | isBothEditable |
257,085 | String (@NotNull Side side) { return SimpleDiffChangeUi.getApplyActionText(SimpleDiffViewer.this, myModifiedSide.other()); } | getText |
257,086 | Icon (@NotNull Side side) { return DiffUtil.getArrowIcon(myModifiedSide.other()); } | getIcon |
257,087 | void (@NotNull List<? extends SimpleDiffChange> changes) { for (SimpleDiffChange change : changes) { replaceChange(change, myModifiedSide.other()); } } | apply |
257,088 | String (@NotNull Side side) { return isBothEditable() ? DiffBundle.message("action.presentation.diff.append.to.the.side.text", myModifiedSide.getIndex()) : DiffBundle.message("action.presentation.diff.append.text"); } | getText |
257,089 | Icon (@NotNull Side side) { return DiffUtil.getArrowDownIcon(myModifiedSide.other()); } | getIcon |
257,090 | void (@NotNull List<? extends SimpleDiffChange> changes) { for (SimpleDiffChange change : changes) { appendChange(change, myModifiedSide.other()); } } | apply |
257,091 | void (@NotNull SimpleDiffChange change, @NotNull final Side sourceSide) { if (!change.isValid()) return; Side outputSide = sourceSide.other(); boolean isLocalChangeRevert = sourceSide == Side.LEFT && isDiffForLocalChanges(); TextDiffViewerUtil.applyModification(getEditor(outputSide).getDocument(), change.getStartLine(o... | replaceChange |
257,092 | void (@NotNull SimpleDiffChange change, @NotNull final Side sourceSide) { if (!change.isValid()) return; if (change.getStartLine(sourceSide) == change.getEndLine(sourceSide)) return; Side outputSide = sourceSide.other(); DiffUtil.applyModification(getEditor(outputSide).getDocument(), change.getEndLine(outputSide), chan... | appendChange |
257,093 | boolean () { return myIndex < getDiffChanges().size(); } | hasNextBlock |
257,094 | void () { SimpleDiffChange change = getDiffChanges().get(myIndex); myIndex++; int line1 = change.getStartLine(Side.RIGHT); int line2 = change.getEndLine(Side.RIGHT); Document document = getEditor(Side.RIGHT).getDocument(); for (int i = line1; i < line2; i++) { int offset1 = document.getLineStartOffset(i); int offset2 =... | loadNextBlock |
257,095 | Object (@NotNull @NonNls String dataId) { if (DiffDataKeys.PREV_NEXT_DIFFERENCE_ITERABLE.is(dataId)) { return myPrevNextDifferenceIterable; } else if (DiffDataKeys.CURRENT_CHANGE_RANGE.is(dataId)) { SimpleDiffChange change = getSelectedChange(getCurrentSide()); if (change != null) { return new LineRange(change.getStart... | getData |
257,096 | boolean () { return getTextSettings().isEnableSyncScroll() || getTextSettings().isEnableAligningChangesMode(); } | isSyncScrollEnabled |
257,097 | boolean () { return needAlignChanges(); } | forceSyncVerticalScroll |
257,098 | Range (@NotNull Side baseSide, int line) { if (getDiffChanges().isEmpty()) return idRange(line); return super.getRange(baseSide, line); } | getRange |
257,099 | void (@NotNull ScrollHelper helper) { if (!helper.process(0, 0)) return; for (SimpleDiffChange diffChange : getDiffChanges()) { if (!helper.process(diffChange.getStartLine(Side.LEFT), diffChange.getStartLine(Side.RIGHT))) return; if (!helper.process(diffChange.getEndLine(Side.LEFT), diffChange.getEndLine(Side.RIGHT))) ... | processHelper |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.