Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
257,300 | RangeMarker (int start, int end) { RangeMarker block = myDocument.createGuardedBlock(start, end); block.setGreedyToLeft(true); block.setGreedyToRight(true); return block; } | createGuardedBlock |
257,301 | int (@NotNull Side side, int line) { LineNumberConvertor convertor = myModel.getLineNumberConvertor(side); return convertor != null ? convertor.convertInv(line) : -1; } | transferLineToOnesideStrict |
257,302 | int (@NotNull Side side, int line) { LineNumberConvertor convertor = myModel.getLineNumberConvertor(side); return convertor != null ? convertor.convert(line) : -1; } | transferLineFromOnesideStrict |
257,303 | int (@NotNull Side side, int line) { LineNumberConvertor convertor = myModel.getLineNumberConvertor(side); return convertor != null ? convertor.convertApproximateInv(line) : line; } | transferLineToOneside |
257,304 | int (@NotNull Side side, int line) { return side.select(transferLineFromOneside(line).first); } | transferLineFromOneside |
257,305 | void () { myModel.clear(); UnifiedEditorRangeHighlighter.erase(myProject, myDocument); myFoldingModel.destroy(); myStatusPanel.update(); } | destroyChangedBlockData |
257,306 | void (@NotNull DocumentEvent e) { if (myDuringOnesideDocumentModification) return; ChangedBlockData blockData = myModel.getData(); if (blockData == null) { LOG.warn("oneside beforeDocumentChange - model is invalid"); return; } // TODO: modify Document guard range logic - we can handle case, when whole read-only block i... | beforeDocumentChange |
257,307 | void (DocumentEvent e, LineCol onesideStartPosition, LineCol onesideEndPosition, int twosideStartLine, int twosideEndLine) { @NonNls StringBuilder info = new StringBuilder(); Document document1 = getDocument(Side.LEFT); Document document2 = getDocument(Side.RIGHT); info.append("==== UnifiedDiffViewer Debug Info ====");... | logDebugInfo |
257,308 | void (@NotNull DocumentEvent e) { if (myDuringTwosideDocumentModification) return; markStateIsOutOfDate(); markSuppressEditorTyping(); scheduleRediff(); } | onDocumentChange |
257,309 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
257,310 | 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); if (editor != getEditor()) { e.getPresentation().setEnable... | update |
257,311 | void (@NotNull final AnActionEvent e) { final List<UnifiedDiffChange> selectedChanges = getSelectedChanges(); if (selectedChanges.isEmpty()) return; if (!isEditable(myModifiedSide, true)) return; if (isStateIsOutOfDate()) return; String title = DiffBundle.message("message.use.selected.changes.command", e.getPresentatio... | actionPerformed |
257,312 | boolean () { List<UnifiedDiffChange> changes = myModel.getDiffChanges(); if (changes == null || changes.isEmpty()) return false; return DiffUtil.isSomeRangeSelected(getEditor(), lines -> ContainerUtil.exists(changes, change -> isChangeSelected(change, lines))); } | isSomeChangeSelected |
257,313 | void (@NotNull List<? extends UnifiedDiffChange> changes) { for (UnifiedDiffChange change : changes) { replaceChange(change, myModifiedSide.other()); } } | apply |
257,314 | void (@NotNull List<? extends UnifiedDiffChange> changes) { for (UnifiedDiffChange change : changes) { appendChange(change, myModifiedSide.other()); } } | apply |
257,315 | void (@NotNull UnifiedDiffChange change, @NotNull Side sourceSide) { Side outputSide = sourceSide.other(); Document document1 = getDocument(Side.LEFT); Document document2 = getDocument(Side.RIGHT); LineFragment lineFragment = change.getLineFragment(); boolean isLastWithLocal = DiffUtil.isUserDataFlagSet(DiffUserDataKey... | replaceChange |
257,316 | void (@NotNull UnifiedDiffChange change, @NotNull final Side sourceSide) { Side outputSide = sourceSide.other(); Document document1 = getDocument(Side.LEFT); Document document2 = getDocument(Side.RIGHT); LineFragment lineFragment = change.getLineFragment(); if (sourceSide.getStartLine(lineFragment) == sourceSide.getEnd... | appendChange |
257,317 | List<UnifiedDiffChange> () { final BitSet lines = DiffUtil.getSelectedLines(myEditor); List<UnifiedDiffChange> changes = ContainerUtil.notNullize(myModel.getDiffChanges()); return ContainerUtil.filter(changes, change -> isChangeSelected(change, lines)); } | getSelectedChanges |
257,318 | boolean (@NotNull UnifiedDiffChange change, @NotNull BitSet lines) { return DiffUtil.isSelectedByLine(lines, change.getLine1(), change.getLine2()); } | isChangeSelected |
257,319 | TextDiffSettings () { return TextDiffViewerUtil.getTextSettings(myContext); } | getTextSettings |
257,320 | FoldingModelSupport () { return myFoldingModel; } | getFoldingModel |
257,321 | Side () { return myMasterSide; } | getMasterSide |
257,322 | EditorEx () { return myEditor; } | getEditor |
257,323 | DocumentContent (@NotNull Side side) { return side.select(getContents()); } | getContent |
257,324 | DocumentContent () { return getContent(Side.LEFT); } | getContent1 |
257,325 | DocumentContent () { return getContent(Side.RIGHT); } | getContent2 |
257,326 | List<UnifiedDiffChange> () { return myModel.getDiffChanges(); } | getDiffChanges |
257,327 | List<UnifiedDiffChange> () { return ContainerUtil.filter(ContainerUtil.notNullize(getDiffChanges()), it -> !it.isSkipped()); } | getNonSkippedDiffChanges |
257,328 | JComponent () { return myPanel; } | getComponent |
257,329 | JComponent () { if (!myPanel.isGoodContent()) return null; return myEditor.getContentComponent(); } | getPreferredFocusedComponent |
257,330 | StatusPanel () { return myStatusPanel; } | getStatusPanel |
257,331 | int () { return getNonSkippedDiffChanges().size(); } | getTotalDifferences |
257,332 | boolean (@NotNull Side side, boolean respectReadOnlyLock) { if (myReadOnlyLockSet && respectReadOnlyLock) return false; if (side.select(myForceReadOnlyFlags)) return false; return DiffUtil.canMakeWritable(getDocument(side)); } | isEditable |
257,333 | Document (@NotNull Side side) { return getContent(side).getDocument(); } | getDocument |
257,334 | boolean () { return myStateIsOutOfDate; } | isStateIsOutOfDate |
257,335 | Navigatable () { return getNavigatable(LineCol.fromCaret(myEditor)); } | getNavigatable |
257,336 | UnifiedDiffChange () { List<UnifiedDiffChange> changes = myModel.getDiffChanges(); if (changes == null) return null; int caretLine = myEditor.getCaretModel().getLogicalPosition().line; for (UnifiedDiffChange change : changes) { if (DiffUtil.isSelectedByLine(caretLine, change.getLine1(), change.getLine2())) return chang... | getCurrentChange |
257,337 | Navigatable (@NotNull LineCol position) { Pair<int[], Side> pair = transferLineFromOneside(position.line); int line1 = pair.first[0]; int line2 = pair.first[1]; Navigatable navigatable1 = getContent1().getNavigatable(new LineCol(line1, position.column)); Navigatable navigatable2 = getContent2().getNavigatable(new LineC... | getNavigatable |
257,338 | boolean () { return myPanel.isGoodContent() && myModel.isValid(); } | isContentGood |
257,339 | boolean (@NotNull DiffContext context, @NotNull DiffRequest request) { return TwosideTextDiffViewer.canShowRequest(context, request); } | canShowRequest |
257,340 | List<UnifiedDiffChange> () { return getNonSkippedDiffChanges(); } | getChanges |
257,341 | EditorEx () { return myEditor; } | getEditor |
257,342 | int (@NotNull UnifiedDiffChange change) { return change.getLine1(); } | getStartLine |
257,343 | int (@NotNull UnifiedDiffChange change) { return change.getLine2(); } | getEndLine |
257,344 | Navigatable (@NotNull Editor editor, int line) { if (editor != myEditor) return null; return UnifiedDiffViewer.this.getNavigatable(new LineCol(line)); } | getNavigatable |
257,345 | void (boolean readOnly) { myReadOnlyLockSet = readOnly; myModel.updateGutterActions(); updateEditorCanBeTyped(); putEditorHint(myEditor, readOnly && isEditable(myMasterSide, false)); } | doApply |
257,346 | boolean () { return !myForceReadOnlyFlags[0] && DiffUtil.canMakeWritable(getContent1().getDocument()) || !myForceReadOnlyFlags[1] && DiffUtil.canMakeWritable(getContent2().getDocument()); } | canEdit |
257,347 | boolean () { return myIndex < myChanges.size(); } | hasNextBlock |
257,348 | void () { LOG.assertTrue(!myStateIsOutOfDate); UnifiedDiffChange change = myChanges.get(myIndex); myIndex++; LineFragment lineFragment = change.getLineFragment(); Document document = getContent2().getDocument(); for (int lineNumber = lineFragment.getStartLine2(); lineNumber < lineFragment.getEndLine2(); lineNumber++) {... | loadNextBlock |
257,349 | Object (@NotNull @NonNls String dataId) { if (DiffDataKeys.PREV_NEXT_DIFFERENCE_ITERABLE.is(dataId)) { return myPrevNextDifferenceIterable; } else if (DiffDataKeys.CURRENT_EDITOR.is(dataId)) { return myEditor; } else if (DiffDataKeys.CURRENT_CHANGE_RANGE.is(dataId)) { UnifiedDiffChange change = getCurrentChange(); if (... | getData |
257,350 | String () { return getStatusTextMessage(); } | getMessage |
257,351 | void (boolean value) { } | disableSyncScroll |
257,352 | void () { // Will not happen for initial rediff } | onSlowRediff |
257,353 | boolean () { if (myCaretPosition == null) return false; LogicalPosition twosidePosition = myMasterSide.selectNotNull(myCaretPosition); int onesideLine = transferLineToOneside(myMasterSide, twosidePosition.line); LogicalPosition position = new LogicalPosition(onesideLine, twosidePosition.column); myEditor.getCaretModel(... | doScrollToPosition |
257,354 | LogicalPosition (int line, int column) { if (line == -1) return new LogicalPosition(0, 0); return new LogicalPosition(line, column); } | getPosition |
257,355 | void (@NotNull Side side, @NotNull LogicalPosition position) { int onesideLine = transferLineToOneside(side, position.line); DiffUtil.scrollEditor(myEditor, onesideLine, position.column, false); } | doScrollToLine |
257,356 | boolean () { if (myScrollToLine == null) return false; doScrollToLine(myScrollToLine.first, new LogicalPosition(myScrollToLine.second, 0)); return true; } | doScrollToLine |
257,357 | boolean (@NotNull ScrollToPolicy scrollToChangePolicy) { List<UnifiedDiffChange> changes = myModel.getDiffChanges(); if (changes == null) return false; UnifiedDiffChange targetChange = scrollToChangePolicy.select(ContainerUtil.filter(changes, it -> !it.isSkipped())); if (targetChange == null) targetChange = scrollToCha... | doScrollToChange |
257,358 | boolean () { if (myScrollToChange == null) return false; return doScrollToChange(myScrollToChange); } | doScrollToChange |
257,359 | boolean () { return doScrollToChange(ScrollToPolicy.FIRST_CHANGE); } | doScrollToFirstChange |
257,360 | boolean () { if (myNavigationContext == null) return false; List<UnifiedDiffChange> changes = myModel.getDiffChanges(); if (changes == null) return false; ChangedLinesIterator changedLinesIterator = new ChangedLinesIterator(changes); int line = myNavigationContext.contextMatchCheck(changedLinesIterator); if (line == -1... | doScrollToContext |
257,361 | Data (@Nullable List<? extends LineRange> changedLines, @NotNull Settings settings, @NotNull Document document, @NotNull LineNumberConvertor lineConvertor, int lineCount) { Iterator<int[]> it = map(changedLines, line -> new int[]{ line.start, line.end }); if (it == null || settings.range == -1) return null; myLineNumbe... | createState |
257,362 | void () { myLineNumberConvertor.dispose(); } | disposeLineConvertor |
257,363 | FoldedRangeDescription (@NotNull Project project, int lineNumber, int index) { int masterLine = myLineConvertor.convert(lineNumber); if (masterLine == -1) return null; return getLineSeparatorDescription(project, myDocument, masterLine); } | getDescription |
257,364 | int (int lineNumber) { LineNumberConvertor convertor = myConvertor; return convertor != null ? convertor.convert(lineNumber) : -1; } | convert |
257,365 | void () { myConvertor = null; } | dispose |
257,366 | void (ReadOnlyFragmentModificationException e) { // do nothing } | handle |
257,367 | void () { myUpdateIndicator.cancel(); } | dispose |
257,368 | void () { myUpdateIndicator.cancel(); myUpdateQueue.cancelAllUpdates(); mySuspended = true; } | suspendUpdate |
257,369 | void () { mySuspended = false; scheduleUpdate(); } | resumeUpdate |
257,370 | void () { // erase old highlighting to make sure text is readable if markup update is slow myEditor.setHighlighter(DiffUtil.createEmptyEditorHighlighter()); UnifiedEditorRangeHighlighter.erase(myProject, myEditor.getDocument()); scheduleUpdate(); // NB: flush request might be overwritten by another 'scheduleUpdate()' /... | resetMarkup |
257,371 | void () { if (!UIUtil.isShowing(getComponent())) return; if (myStateIsOutOfDate || !myModel.isValid()) return; myUpdateIndicator.cancel(); myUpdateIndicator = new EmptyProgressIndicator(); ChangedBlockData blockData = Objects.requireNonNull(myModel.getData()); ReadAction .nonBlocking(() -> updateHighlighters(blockData)... | run |
257,372 | HighlightersData (@NotNull ChangedBlockData blockData) { List<HighlightRange> ranges = blockData.getRanges(); Document document1 = getContent1().getDocument(); Document document2 = getContent2().getDocument(); ProgressManager.checkCanceled(); EditorHighlighter highlighter = buildHighlighter(myProject, myDocument, getCo... | updateHighlighters |
257,373 | void (@NotNull RangeHighlighterEx highlighter) { scheduleUpdate(); } | afterAdded |
257,374 | void (@NotNull RangeHighlighterEx highlighter) { scheduleUpdate(); } | afterRemoved |
257,375 | void (@NotNull RangeHighlighterEx highlighter, boolean renderersChanged, boolean fontStyleOrColorChanged) { scheduleUpdate(); } | attributesChanged |
257,376 | void (@Nullable Project project, @NotNull EditorEx editor, @Nullable HighlightersData highlightersData) { EditorHighlighter highlighter = highlightersData != null ? highlightersData.myHighlighter : null; UnifiedEditorRangeHighlighter rangeHighlighter = highlightersData != null ? highlightersData.myRangeHighlighter : nu... | apply |
257,377 | boolean (boolean enabled) { return enabled && (findCollector(myFile1) != null || findCollector(myFile2) != null); } | updateCollectors |
257,378 | void (Crumb crumb, boolean withSelection) { if (crumb instanceof UnifiedNavigatableCrumb) { super.navigateToCrumb(crumb, withSelection); } } | navigateToCrumb |
257,379 | int (@NotNull Side side, int offset) { LineCol twosidePosition = LineCol.fromOffset(getDocument(side), offset); int onesideLine = transferLineToOneside(side, twosidePosition.line); if (onesideLine == -1) return -1; LineCol onesidePosition = new LineCol(onesideLine, twosidePosition.column); return onesidePosition.toOffs... | transferOffsetFromTwoside |
257,380 | int () { int offset = myDelegate.getAnchorOffset(); return offset != -1 ? transferOffsetFromTwoside(mySide, offset) : -1; } | getAnchorOffset |
257,381 | TextRange () { TextRange range = myDelegate.getHighlightRange(); if (range == null) return null; int start = transferOffsetFromTwoside(mySide, range.getStartOffset()); int end = transferOffsetFromTwoside(mySide, range.getEndOffset()); if (start == -1 || end == -1) return null; return new TextRange(start, end); } | getHighlightRange |
257,382 | void (@NotNull Editor editor, boolean withSelection) { int offset = getAnchorOffset(); if (offset != -1) { editor.getCaretModel().moveToOffset(offset); editor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE); } if (withSelection) { final TextRange range = getHighlightRange(); if (range != null) { editor.getSe... | navigate |
257,383 | Icon () { return myDelegate.getIcon(); } | getIcon |
257,384 | String () { return myDelegate.getText(); } | getText |
257,385 | String () { return myDelegate.getTooltip(); } | getTooltip |
257,386 | int () { return myLine1; } | getLine1 |
257,387 | int () { return myLine2; } | getLine2 |
257,388 | LineFragment () { return myLineFragment; } | getLineFragment |
257,389 | LineRange () { return myDeletedRange; } | getDeletedRange |
257,390 | LineRange () { return myInsertedRange; } | getInsertedRange |
257,391 | boolean () { return myIsExcluded; } | isExcluded |
257,392 | boolean () { return myIsSkipped; } | isSkipped |
257,393 | void (int oldLine1, int oldLine2, int shift) { UpdatedLineRange newRange = DiffUtil.updateRangeOnModification(myLine1, myLine2, oldLine1, oldLine2, shift); myLine1 = newRange.startLine; myLine2 = newRange.endLine; } | processChange |
257,394 | Side () { return mySide; } | getSide |
257,395 | TextRange () { return myBase; } | getBase |
257,396 | TextRange () { return myChanged; } | getChanged |
257,397 | void () { setCurrentCard(LOADING_CONTENT); } | setLoadingContent |
257,398 | void () { setCurrentCard(GOOD_CONTENT); } | setGoodContent |
257,399 | void () { setCurrentCard(TOO_BIG_CONTENT); } | setTooBigContent |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.