Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
256,900 | void () { if (wasScrolled(getEditors())) myShouldScroll = false; ensureEditorSizeIsUpToDate(getEditors()); if (myShouldScroll) myShouldScroll = !doScrollToChange(); if (myShouldScroll) myShouldScroll = !doScrollToLine(); if (myShouldScroll) myShouldScroll = !doScrollToPosition(); if (myShouldScroll) doScrollToFirstChan... | onRediff |
256,901 | EditorsVisiblePositions (@NotNull List<? extends Editor> editors) { LogicalPosition[] carets = doGetCaretPositions(editors); Point[] points = doGetScrollingPositions(editors); return new EditorsVisiblePositions(carets, points); } | doGetVisiblePositions |
256,902 | void (LogicalPosition @NotNull [] positions, @NotNull List<? extends Editor> editors) { for (int i = 0; i < editors.size(); i++) { Editor editor = editors.get(i); if (editor != null) editor.getCaretModel().moveToLogicalPosition(positions[i]); } } | doMoveCaretsToPositions |
256,903 | void (@NotNull EditorsVisiblePositions visiblePositions, @NotNull List<? extends Editor> editors) { for (int i = 0; i < editors.size(); i++) { Editor editor = editors.get(i); if (editor != null) DiffUtil.scrollToPoint(editor, visiblePositions.myPoints[i], false); } } | doScrollToVisiblePositions |
256,904 | void (@NotNull List<? extends Editor> editors) { for (int i = 0; i < editors.size(); i++) { Editor editor = editors.get(i); if (editor != null) DiffUtil.scrollToCaret(editor, false); } } | doScrollToCaret |
256,905 | boolean (@NotNull List<? extends Editor> editors) { for (Editor editor : editors) { if (editor == null) continue; if (editor.getCaretModel().getOffset() != 0) return true; if (editor.getScrollingModel().getVerticalScrollOffset() != 0) return true; if (editor.getScrollingModel().getHorizontalScrollOffset() != 0) return ... | wasScrolled |
256,906 | void (@NotNull List<? extends Editor> editors) { Set<Window> windows = ContainerUtil.map2SetNotNull(editors, editor -> ComponentUtil.getWindow(editor.getComponent())); for (Window window : windows) { window.validate(); } } | ensureEditorSizeIsUpToDate |
256,907 | boolean (LogicalPosition @Nullable ... caretPosition) { // TODO: allow small fluctuations ? if (caretPosition == null) return true; if (myCaretPosition.length != caretPosition.length) return false; for (int i = 0; i < caretPosition.length; i++) { if (!caretPosition[i].equals(myCaretPosition[i])) return false; } return ... | isSame |
256,908 | String () { return DiffBundle.message(myTextKey); } | getText |
256,909 | Icon () { return myIcon; } | getIcon |
256,910 | boolean () { return ExternalDiffSettings.getInstance().isExternalToolsEnabled(); } | isEnabled |
256,911 | boolean () { return isEnabled() && ExternalDiffSettings.isNotBuiltinDiffTool(); } | isDefault |
256,912 | boolean (@NotNull List<? extends DiffRequestProducer> diffProducers) { if (isDefault()) return true; return JBIterable.from(diffProducers) .map(ExternalDiffTool::getFileType) .unique() .map(fileType -> ExternalDiffSettings.findDiffTool(fileType)) .filter(Conditions.notNull()) .first() != null; } | wantShowExternalToolFor |
256,913 | FileType (@NotNull DiffRequestProducer producer) { FileType contentType = producer.getContentType(); if (contentType != null) return contentType; String filePath = producer.getName(); return FileTypeManager.getInstance().getFileTypeByFileName(filePath); } | getFileType |
256,914 | boolean (@Nullable Project project, @NotNull List<? extends DiffRequestProducer> diffProducers) { if (diffProducers.size() <= Registry.intValue("diff.external.tool.file.limit")) return true; new Notification("Diff Changes Loading Error", DiffBundle.message("can.t.show.diff.in.external.tool.too.many.files", diffProducer... | checkNotTooManyRequests |
256,915 | boolean (@Nullable Project project, @NotNull DiffRequestChain chain, @NotNull DiffDialogHints hints) { if (chain instanceof AsyncDiffRequestChain asyncChain) { return show(project, hints, indicator -> { ListSelection<? extends DiffRequestProducer> listSelection = asyncChain.loadRequestsInBackground(); List<? extends Di... | showIfNeeded |
256,916 | boolean (@Nullable Project project, @NotNull List<? extends DiffRequestProducer> requestProducers, @NotNull DiffDialogHints hints) { return show(project, hints, indicator -> { if (!wantShowExternalToolFor(requestProducers)) return null; if (!checkNotTooManyRequests(project, requestProducers)) return null; return collec... | showIfNeeded |
256,917 | boolean (@Nullable Project project, @NotNull DiffDialogHints hints, @NotNull ThrowableConvertor<? super ProgressIndicator, ? extends List<DiffRequest>, ? extends Exception> requestsProducer) { try { List<DiffRequest> requests = computeWithModalProgress(project, DiffBundle.message("progress.title.loading.requests"), req... | show |
256,918 | List<DiffRequest> (@Nullable Project project, @NotNull List<? extends DiffRequestProducer> producers, @NotNull ProgressIndicator indicator) { List<DiffRequest> requests = new ArrayList<>(); UserDataHolderBase context = new UserDataHolderBase(); List<DiffRequestProducer> errorRequests = new ArrayList<>(); for (DiffReque... | collectRequests |
256,919 | boolean (@NotNull DiffRequest request) { if (!(request instanceof ContentDiffRequest)) return false; List<DiffContent> contents = ((ContentDiffRequest)request).getContents(); if (contents.size() != 2 && contents.size() != 3) return false; for (DiffContent content : contents) { if (!ExternalDiffToolUtil.canCreateFile(co... | canShow |
256,920 | boolean () { return ExternalDiffSettings.getInstance().isExternalToolsEnabled(); } | isEnabled |
256,921 | boolean () { return isEnabled() && ExternalDiffSettings.isNotBuiltinMergeTool(); } | isDefault |
256,922 | void (@Nullable final Project project, @NotNull ExternalDiffSettings.ExternalTool externalTool, @NotNull final MergeRequest request) { try { if (canShow(request)) { ExternalDiffToolUtil.executeMerge(project, externalTool, (ThreesideMergeRequest)request, null); } else { DiffManagerEx.getInstance().showMergeBuiltin(proje... | show |
256,923 | boolean (@NotNull MergeRequest request) { if (request instanceof ThreesideMergeRequest) { DiffContent outputContent = ((ThreesideMergeRequest)request).getOutputContent(); if (!canProcessOutputContent(outputContent)) return false; List<? extends DiffContent> contents = ((ThreesideMergeRequest)request).getContents(); if ... | canShow |
256,924 | boolean (@NotNull DiffContent content) { if (content instanceof DocumentContent) return true; if (content instanceof FileContent && ((FileContent)content).getFile().isInLocalFileSystem()) return true; return false; } | canProcessOutputContent |
256,925 | boolean (@NotNull DiffContent content) { if (content instanceof EmptyContent) return true; if (content instanceof DocumentContent) return true; if (content instanceof FileContent) { VirtualFile file = ((FileContent)content).getFile(); if (DiffUtil.isFileWithoutContent(file)) return false; return true; } if (content ins... | canCreateFile |
256,926 | Charset (@Nullable Project project, @NotNull DocumentContent content) { Charset charset = content.getCharset(); if (charset != null) return charset; EncodingManager e = project != null ? EncodingProjectManager.getInstance(project) : EncodingManager.getInstance(); return e.getDefaultCharset(); } | getContentCharset |
256,927 | void (@Nullable Project project, @NotNull ExternalDiffSettings.ExternalTool externalTool, @NotNull TestOutputConsole outputConsole) { DiffContentFactory factory = DiffContentFactory.getInstance(); List<? extends DiffContent> contents = Arrays.asList(factory.create(DiffBundle.message("settings.external.diff.left.file.co... | testDiffTool2 |
256,928 | void (@Nullable Project project, @NotNull ExternalDiffSettings.ExternalTool externalTool, @NotNull TestOutputConsole outputConsole) { DiffContentFactory factory = DiffContentFactory.getInstance(); List<? extends DiffContent> contents = Arrays.asList(factory.create(DiffBundle.message("settings.external.diff.left.file.co... | testDiffTool3 |
256,929 | void (@Nullable Project project, @NotNull ExternalDiffSettings.ExternalTool externalTool, @NotNull List<? extends DiffContent> contents, @NotNull List<String> titles, @NotNull TestOutputConsole outputConsole) { JComponent parentComponent = outputConsole.getComponent(); try { GeneralCommandLine commandLine = createDiffC... | testDiffTool |
256,930 | void (@Nullable Project project, @NotNull ExternalDiffSettings.ExternalTool externalTool, @NotNull TestOutputConsole outputConsole) { JComponent parentComponent = outputConsole.getComponent(); try { Document document = new DocumentImpl(DiffBundle.message("settings.external.diff.original.output.file.content")); Consumer... | testMergeTool |
256,931 | void (@NotNull TestOutputConsole outputConsole, GeneralCommandLine commandLine, @NotNull ProcessHandler processHandler) { outputConsole.appendOutput(ProcessOutputTypes.SYSTEM, commandLine.getCommandLineString()); processHandler.addProcessListener(new ProcessAdapter() { @Override public void onTextAvailable(@NotNull Pro... | addLoggingListener |
256,932 | void (@NotNull ProcessEvent event, @NotNull Key outputType) { if (outputType == ProcessOutputTypes.STDOUT || outputType == ProcessOutputTypes.STDERR) { outputConsole.appendOutput(outputType, event.getText()); } } | onTextAvailable |
256,933 | void (@NotNull ProcessEvent event) { outputConsole.processTerminated(event.getExitCode()); } | processTerminated |
256,934 | boolean (@Nullable Project project, @NotNull Process process, boolean trustExitCode, @Nullable JComponent parentComponent) { if (trustExitCode) { final Ref<Boolean> resultRef = new Ref<>(); ProgressManager.getInstance().runProcessWithProgressSynchronously(() -> { final Semaphore semaphore = new Semaphore(0); final Thre... | waitMergeProcessWithModal |
256,935 | void () { try { resultRef.set(process.waitFor() == 0); } catch (InterruptedException ignore) { } finally { semaphore.release(); } } | run |
256,936 | GeneralCommandLine (@NotNull ExternalDiffSettings.ExternalTool externalTool, @NotNull OutputFile outputFile, @NotNull List<? extends InputFile> inputFiles) { assert inputFiles.size() == 3; Map<String, String> patterns = new HashMap<>(); patterns.put("%1", inputFiles.get(0).getPath()); patterns.put("%2", inputFiles.get(... | createMergeCommandLine |
256,937 | GeneralCommandLine (@NotNull String exePath, @NotNull String parametersTemplate, @NotNull Map<String, String> patterns) { List<String> parameters = ParametersListUtil.parse(parametersTemplate, true); List<String> from = new ArrayList<>(); List<String> to = new ArrayList<>(); for (Map.Entry<String, String> entry : patte... | createCommandLine |
256,938 | void () { myFile.refresh(false, false); } | apply |
256,939 | String () { return myFile.getPath(); } | getPath |
256,940 | void () { } | cleanup |
256,941 | String () { return myLocalFile.getPath(); } | getPath |
256,942 | void () { FileUtil.delete(myLocalFile); } | cleanup |
256,943 | FileNameInfo (@NotNull List<? extends DiffContent> contents, @NotNull List<String> titles, @Nullable String windowTitle, int index) { if (contents.size() == 2) { Side side = Side.fromIndex(index); DiffContent content = side.select(contents); String title = side.select(titles); String prefix = side.select("before", "aft... | create |
256,944 | FileNameInfo (@NotNull DiffContent content, @Nullable String windowTitle) { String name = getFileName(content, null, windowTitle); return new FileNameInfo("merge_result", name); } | createMergeResult |
256,945 | String (@NotNull DiffContent content, @Nullable String title, @Nullable String windowTitle) { if (content instanceof EmptyContent) { return "no_content.tmp"; } String fileName = content.getUserData(DiffUserDataKeysEx.FILE_NAME); if (fileName == null && content instanceof DocumentContent) { VirtualFile highlightFile = (... | getFileName |
256,946 | boolean () { return false; } | sendIncompleteLines |
256,947 | int () { return myIndex; } | getIndex |
256,948 | int (@NotNull Side side) { return side.getStartLine(myFragment) + side.select(myLineStartShifts); } | getStartLine |
256,949 | int (@NotNull Side side) { return side.getEndLine(myFragment) + side.select(myLineEndShifts); } | getEndLine |
256,950 | TextDiffType () { return DiffUtil.getLineDiffType(myFragment); } | getDiffType |
256,951 | boolean () { return myIsExcluded; } | isExcluded |
256,952 | boolean () { return myIsSkipped; } | isSkipped |
256,953 | boolean () { return myIsValid; } | isValid |
256,954 | boolean () { return myIsDestroyed; } | isDestroyed |
256,955 | LineFragment () { return myFragment; } | getFragment |
256,956 | boolean (int oldLine1, int oldLine2, int shift, @NotNull Side side) { int line1 = getStartLine(side); int line2 = getEndLine(side); int sideIndex = side.getIndex(); DiffUtil.UpdatedLineRange newRange = DiffUtil.updateRangeOnModification(line1, line2, oldLine1, oldLine2, shift); myLineStartShifts[sideIndex] += newRange.... | processDocumentChange |
256,957 | void () { myIsDestroyed = true; } | markDestroyed |
256,958 | void () { destroyHighlighters(); destroyInnerHighlighters(); destroyOperations(); } | destroy |
256,959 | void () { assert myHighlighters.isEmpty(); createHighlighter(ThreeSide.BASE); if (isChange(Side.LEFT)) createHighlighter(ThreeSide.LEFT); if (isChange(Side.RIGHT)) createHighlighter(ThreeSide.RIGHT); } | installHighlighters |
256,960 | void () { assert myInnerHighlighters.isEmpty(); createInnerHighlighter(ThreeSide.BASE); if (isChange(Side.LEFT)) createInnerHighlighter(ThreeSide.LEFT); if (isChange(Side.RIGHT)) createInnerHighlighter(ThreeSide.RIGHT); } | installInnerHighlighters |
256,961 | void () { for (RangeHighlighter highlighter : myHighlighters) { highlighter.dispose(); } myHighlighters.clear(); } | destroyHighlighters |
256,962 | void () { for (RangeHighlighter highlighter : myInnerHighlighters) { highlighter.dispose(); } myInnerHighlighters.clear(); } | destroyInnerHighlighters |
256,963 | void () { } | installOperations |
256,964 | void () { for (DiffGutterOperation operation : myOperations) { operation.dispose(); } myOperations.clear(); } | destroyOperations |
256,965 | void (boolean force) { for (DiffGutterOperation operation : myOperations) { operation.update(force); } } | updateGutterActions |
256,966 | TextDiffType () { return DiffUtil.getDiffType(myType); } | getDiffType |
256,967 | MergeConflictType () { return myType; } | getConflictType |
256,968 | boolean () { return myType.getType() == MergeConflictType.Type.CONFLICT; } | isConflict |
256,969 | boolean (@NotNull Side side) { return myType.isChange(side); } | isChange |
256,970 | boolean (@NotNull ThreeSide side) { return myType.isChange(side); } | isChange |
256,971 | void (@NotNull ThreeSide side) { Editor editor = getEditor(side); TextDiffType type = getDiffType(); int startLine = getStartLine(side); int endLine = getEndLine(side); boolean resolved = isResolved(side); boolean ignored = !resolved && getInnerFragments() != null; boolean shouldHideWithoutLineNumbers = side == ThreeSi... | createHighlighter |
256,972 | void (@NotNull ThreeSide side) { if (isResolved(side)) return; MergeInnerDifferences innerFragments = getInnerFragments(); if (innerFragments == null) return; List<TextRange> ranges = innerFragments.get(side); if (ranges == null) return; Editor editor = getEditor(side); int start = DiffUtil.getLinesRange(editor.getDocu... | createInnerHighlighter |
256,973 | DiffViewer (@NotNull DiffContext context, @NotNull DiffRequest request) { if (SimpleOnesideDiffViewer.canShowRequest(context, request)) return new SimpleOnesideDiffViewer(context, request); if (SimpleDiffViewer.canShowRequest(context, request)) return new SimpleDiffViewer(context, request); if (SimpleThreesideDiffViewe... | createComponent |
256,974 | boolean (@NotNull DiffContext context, @NotNull DiffRequest request) { return SimpleOnesideDiffViewer.canShowRequest(context, request) || SimpleDiffViewer.canShowRequest(context, request) || SimpleThreesideDiffViewer.canShowRequest(context, request); } | canShow |
256,975 | String () { return DiffBundle.message("side.by.side.viewer"); } | getName |
256,976 | List<AnAction> () { List<AnAction> group = new ArrayList<>(); DefaultActionGroup diffGroup = DefaultActionGroup.createPopupGroup(() -> ActionsBundle.message("group.compare.contents.text")); diffGroup.getTemplatePresentation().setIcon(AllIcons.Actions.Diff); diffGroup.add(Separator.create(ActionsBundle.message("group.co... | createToolbarActions |
256,977 | 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 |
256,978 | List<AnAction> () { List<AnAction> group = new ArrayList<>(); group.add(new ReplaceSelectedChangesAction(ThreeSide.LEFT, ThreeSide.BASE)); group.add(new ReplaceSelectedChangesAction(ThreeSide.RIGHT, ThreeSide.BASE)); group.add(new ReplaceSelectedChangesAction(ThreeSide.BASE, ThreeSide.LEFT)); group.add(new ReplaceSelec... | createEditorPopupActions |
256,979 | void () { super.onSlowRediff(); myStatusPanel.setBusy(true); myInitialScrollHelper.onSlowRediff(); } | onSlowRediff |
256,980 | Runnable (@NotNull final ProgressIndicator indicator) { try { indicator.checkCanceled(); List<CharSequence> sequences = ContainerUtil.map(getContents(), content -> content.getDocument().getImmutableCharSequence()); List<FineMergeLineFragment> lineFragments = myTextDiffProvider.compare(sequences.get(0), sequences.get(1)... | performRediff |
256,981 | Runnable (final @NotNull List<? extends FineMergeLineFragment> fragments, @Nullable FoldingModelSupport.Data foldingState) { return () -> { myFoldingModel.updateContext(myRequest, getFoldingModelSettings()); clearDiffPresentation(); resetChangeCounters(); for (FineMergeLineFragment fragment : fragments) { MergeConflict... | apply |
256,982 | void () { super.destroyChangedBlocks(); for (SimpleThreesideDiffChange change : myDiffChanges) { change.destroy(); } myDiffChanges.clear(); for (SimpleThreesideDiffChange change : myInvalidDiffChanges) { change.destroy(); } myInvalidDiffChanges.clear(); } | destroyChangedBlocks |
256,983 | void (@NotNull DocumentEvent e) { super.onBeforeDocumentChange(e); if (myDiffChanges.isEmpty()) return; List<Document> documents = ContainerUtil.map(getEditors(), Editor::getDocument); ThreeSide side = ThreeSide.fromValue(documents, e.getDocument()); if (side == null) { LOG.warn("Unknown document changed"); return; } L... | onBeforeDocumentChange |
256,984 | List<SimpleThreesideDiffChange> () { return Collections.unmodifiableList(myDiffChanges); } | getChanges |
256,985 | boolean (@NotNull DiffContext context, @NotNull DiffRequest request) { return ThreesideTextDiffViewer.canShowRequest(context, request); } | canShowRequest |
256,986 | boolean (@NotNull ThreeSide side) { return DiffUtil.isEditable(getEditor(side)); } | isEditable |
256,987 | void (@NotNull SimpleThreesideDiffChange change, @NotNull ThreeSide sourceSide, @NotNull ThreeSide outputSide) { if (!change.isValid()) return; DiffUtil.applyModification(getEditor(outputSide).getDocument(), change.getStartLine(outputSide), change.getEndLine(outputSide), getEditor(sourceSide).getDocument(), change.getS... | replaceChange |
256,988 | String (@NotNull ThreeSide master, @NotNull ThreeSide modifiedSide) { if (master == ThreeSide.LEFT && modifiedSide == ThreeSide.BASE) return "Diff.ApplyLeftSide"; if (master == ThreeSide.RIGHT && modifiedSide == ThreeSide.BASE) return "Diff.ApplyRightSide"; return null; } | getReplaceActionId |
256,989 | boolean (@NotNull ThreeSide side) { if (side != myModifiedSide && side != mySourceSide) return false; if (!isEditable(myModifiedSide)) return false; return !isBothEditable() || side == mySourceSide; } | isVisible |
256,990 | boolean (@NotNull ThreesideDiffChangeBase change) { Side side1 = myModifiedSide.select(Side.LEFT, null, Side.RIGHT); if (side1 != null && change.isChange(side1)) return true; Side side2 = mySourceSide.select(Side.LEFT, null, Side.RIGHT); if (side2 != null && change.isChange(side2)) return true; return false; } | isEnabled |
256,991 | boolean () { return isEditable(mySourceSide) && isEditable(myModifiedSide); } | isBothEditable |
256,992 | String (@NotNull ThreeSide side) { return SimpleThreesideDiffChange.getApplyActionText(SimpleThreesideDiffViewer.this, mySourceSide, myModifiedSide); } | getText |
256,993 | Icon (@NotNull ThreeSide side) { Side arrowDirection = Side.fromLeft(mySourceSide == ThreeSide.LEFT || myModifiedSide == ThreeSide.RIGHT); return DiffUtil.getArrowIcon(arrowDirection); } | getIcon |
256,994 | void (@NotNull AnActionEvent e, @NotNull ThreeSide side, @NotNull List<? extends SimpleThreesideDiffChange> changes) { if (!isEditable(myModifiedSide)) return; String title = DiffBundle.message("message.use.selected.changes.command", e.getPresentation().getText()); DiffUtil.executeWriteCommand(getEditor(myModifiedSide)... | doPerform |
256,995 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
256,996 | 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); ThreeSide side = ThreeSide.fromValue(getEditors(), editor)... | update |
256,997 | void (@NotNull AnActionEvent e) { Editor editor = e.getData(CommonDataKeys.EDITOR); final ThreeSide side = ThreeSide.fromValue(getEditors(), editor); if (side == null) return; final List<SimpleThreesideDiffChange> selectedChanges = getSelectedChanges(side); if (selectedChanges.isEmpty()) return; doPerform(e, side, Cont... | actionPerformed |
256,998 | boolean (@NotNull ThreeSide side) { if (getChanges().isEmpty()) return false; EditorEx editor = getEditor(side); return DiffUtil.isSomeRangeSelected(editor, lines -> ContainerUtil.exists(getChanges(), change -> isChangeSelected(change, lines, side))); } | isSomeChangeSelected |
256,999 | List<SimpleThreesideDiffChange> (@NotNull ThreeSide side) { EditorEx editor = getEditor(side); BitSet lines = DiffUtil.getSelectedLines(editor); return ContainerUtil.filter(getChanges(), change -> isChangeSelected(change, lines, side)); } | getSelectedChanges |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.