Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
256,700 | Dimension (Container parent) { int totalWidth = 0; int totalHeight = 0; for (JComponent component : Arrays.asList(myTitle, myTopBreadcrumbs, myContent, myBottomBreadcrumbs)) { Dimension size = getPreferredSize(component); totalWidth = Math.max(size.width, totalWidth); totalHeight += size.height; if (component == myTitl... | preferredLayoutSize |
256,701 | void (@NotNull Container parent) { int y = 0; int width = parent.getWidth(); int totalHeight = parent.getHeight(); Dimension titleSize = getPreferredSize(myTitle); Dimension topSize = getPreferredSize(myTopBreadcrumbs); Dimension bottomSize = getPreferredSize(myBottomBreadcrumbs); int bottomY = totalHeight - bottomSize... | layoutContainer |
256,702 | Dimension (@NotNull JComponent component) { return component.isVisible() ? component.getPreferredSize() : new Dimension(); } | getPreferredSize |
256,703 | void () { super.onInit(); myPanel.setPersistentNotifications(DiffUtil.createCustomNotifications(this, myContext, myRequest)); myContentPanel.setTitles(createTitles()); } | onInit |
256,704 | void () { destroyEditorHolders(); super.onDispose(); } | onDispose |
256,705 | void () { super.processContextHints(); myFocusTrackerSupport.processContextHints(myRequest, myContext); Float proportion = myContext.getUserData(DiffUserDataKeysEx.TWO_SIDE_SPLITTER_PROPORTION); if (proportion != null && proportion >= 0.05 && proportion <= 0.95) myContentPanel.getSplitter().setProportion(proportion); } | processContextHints |
256,706 | void () { super.updateContextHints(); myFocusTrackerSupport.updateContextHints(myRequest, myContext); float proportion = myContentPanel.getSplitter().getProportion(); myContext.putUserData(DiffUserDataKeysEx.TWO_SIDE_SPLITTER_PROPORTION, proportion); } | updateContextHints |
256,707 | List<T> (@NotNull EditorHolderFactory<T> factory) { List<DiffContent> contents = myRequest.getContents(); List<T> holders = new ArrayList<>(2); for (int i = 0; i < 2; i++) { DiffContent content = contents.get(i); holders.add(factory.create(content, myContext)); } return holders; } | createEditorHolders |
256,708 | void () { for (T holder : myHolders) { Disposer.dispose(holder); } } | destroyEditorHolders |
256,709 | List<JComponent> () { return DiffUtil.createSimpleTitles(this, myRequest); } | createTitles |
256,710 | JComponent () { return myPanel; } | getComponent |
256,711 | JComponent () { if (!myPanel.isGoodContent()) return null; return getCurrentEditorHolder().getPreferredFocusedComponent(); } | getPreferredFocusedComponent |
256,712 | Side () { return myFocusTrackerSupport.getCurrentSide(); } | getCurrentSide |
256,713 | void (@NotNull Side side) { myFocusTrackerSupport.setCurrentSide(side); } | setCurrentSide |
256,714 | List<T> () { return myHolders; } | getEditorHolders |
256,715 | T () { return getCurrentSide().select(getEditorHolders()); } | getCurrentEditorHolder |
256,716 | Object (@NotNull @NonNls String dataId) { if (DiffDataKeys.CURRENT_CONTENT.is(dataId)) { return getCurrentSide().select(myRequest.getContents()); } return super.getData(dataId); } | getData |
256,717 | Navigatable () { Navigatable navigatable1 = getCurrentSide().select(getRequest().getContents()).getNavigatable(); if (navigatable1 != null) return navigatable1; return getCurrentSide().other().select(getRequest().getContents()).getNavigatable(); } | getNavigatable |
256,718 | void () { super.onInit(); installEditorListeners(); } | onInit |
256,719 | void () { destroyEditorListeners(); super.onDispose(); } | onDispose |
256,720 | List<TextEditorHolder> (@NotNull EditorHolderFactory<TextEditorHolder> factory) { List<TextEditorHolder> holders = super.createEditorHolders(factory); boolean[] forceReadOnly = TextDiffViewerUtil.checkForceReadOnly(myContext, myRequest); for (int i = 0; i < 3; i++) { if (forceReadOnly[i]) holders.get(i).getEditor().set... | createEditorHolders |
256,721 | List<JComponent> () { return DiffUtil.createTextTitles(this, myRequest, getEditors()); } | createTitles |
256,722 | void () { new TextDiffViewerUtil.EditorActionsPopup(createEditorPopupActions()).install(getEditors(), myPanel); new TextDiffViewerUtil.EditorFontSizeSynchronizer(getEditors()).install(this); getEditor(ThreeSide.LEFT).getScrollingModel().addVisibleAreaListener(myVisibleAreaListener); getEditor(ThreeSide.BASE).getScrolli... | installEditorListeners |
256,723 | void () { getEditor(ThreeSide.LEFT).getScrollingModel().removeVisibleAreaListener(myVisibleAreaListener); getEditor(ThreeSide.BASE).getScrollingModel().removeVisibleAreaListener(myVisibleAreaListener); getEditor(ThreeSide.RIGHT).getScrollingModel().removeVisibleAreaListener(myVisibleAreaListener); mySyncScrollSupport =... | destroyEditorListeners |
256,724 | void (boolean disable) { if (mySyncScrollSupport != null) { if (disable) { mySyncScrollSupport.enterDisableScrollSection(); } else { mySyncScrollSupport.exitDisableScrollSection(); } } } | disableSyncScrollSupport |
256,725 | TextDiffSettings () { return TextDiffViewerUtil.getTextSettings(myContext); } | getTextSettings |
256,726 | List<AnAction> () { return TextDiffViewerUtil.createEditorPopupActions(); } | createEditorPopupActions |
256,727 | void (@NotNull DocumentEvent event) { super.onDocumentChange(event); myContentPanel.repaintDividers(); } | onDocumentChange |
256,728 | EditorEx () { return getEditor(getCurrentSide()); } | getCurrentEditor |
256,729 | DocumentContent () { return getContent(getCurrentSide()); } | getCurrentContent |
256,730 | EditorEx (@NotNull ThreeSide side) { return side.select(getEditors()); } | getEditor |
256,731 | DocumentContent (@NotNull ThreeSide side) { return side.select(getContents()); } | getContent |
256,732 | ThreeSide (@Nullable Editor editor) { if (getEditor(ThreeSide.BASE) == editor) return ThreeSide.BASE; if (getEditor(ThreeSide.RIGHT) == editor) return ThreeSide.RIGHT; if (getEditor(ThreeSide.LEFT) == editor) return ThreeSide.LEFT; return null; } | getEditorSide |
256,733 | void (@NotNull ThreeSide side, int line) { DiffUtil.scrollEditor(getEditor(side), line, false); setCurrentSide(side); } | scrollToLine |
256,734 | LogicalPosition (@NotNull ThreeSide baseSide, @NotNull ThreeSide targetSide, @NotNull LogicalPosition position) { if (mySyncScrollSupport == null) return position; if (baseSide == targetSide) return position; SyncScrollSupport.SyncScrollable scrollable12 = mySyncScrollSupport.getScrollable12(); SyncScrollSupport.SyncSc... | transferPosition |
256,735 | Navigatable () { return getCurrentContent().getNavigatable(LineCol.fromCaret(getCurrentEditor())); } | getNavigatable |
256,736 | boolean (@NotNull DiffContext context, @NotNull DiffRequest request) { return ThreesideDiffViewer.canShowRequest(context, request, TextEditorHolder.TextEditorHolderFactory.INSTANCE); } | canShowRequest |
256,737 | Navigatable (@NotNull Editor editor, int line) { ThreeSide side = getEditorSide(editor); if (side == null) return null; return getContent(side).getNavigatable(new LineCol(line)); } | getNavigatable |
256,738 | Object (@NotNull @NonNls String dataId) { if (DiffDataKeys.CURRENT_EDITOR.is(dataId)) { return getCurrentEditor(); } return super.getData(dataId); } | getData |
256,739 | void (@NotNull VisibleAreaEvent e) { if (mySyncScrollSupport != null) mySyncScrollSupport.visibleAreaChanged(e); myContentPanel.repaint(); } | visibleAreaChanged |
256,740 | void (boolean value) { disableSyncScrollSupport(value); } | disableSyncScroll |
256,741 | boolean () { if (myScrollToLine == null) return false; scrollToLine(myScrollToLine.first, myScrollToLine.second); return true; } | doScrollToLine |
256,742 | SimpleDiffRequest () { SimpleDiffRequest request = super.createRequest(); ThreeSide currentSide = getCurrentSide(); LogicalPosition currentPosition = DiffUtil.getCaretPosition(getCurrentEditor()); // we won't use DiffUserDataKeysEx.EDITORS_CARET_POSITION to avoid desync scroll position (as they can point to different p... | createRequest |
256,743 | void (@NotNull AnActionEvent e) { ThreeSide currentSide = getCurrentSide(); ThreeSide targetSide = currentSide.select(ThreeSide.BASE, ThreeSide.RIGHT, ThreeSide.LEFT); // cycle right EditorEx targetEditor = getEditor(targetSide); if (myScrollToPosition) { LogicalPosition currentPosition = DiffUtil.getCaretPosition(getC... | actionPerformed |
256,744 | void () { super.onInit(); myPanel.setPersistentNotifications(DiffUtil.createCustomNotifications(this, myContext, myRequest)); myContentPanel.setTitle(createTitle()); } | onInit |
256,745 | void () { destroyEditorHolder(); super.onDispose(); } | onDispose |
256,746 | T (@NotNull EditorHolderFactory<T> factory) { DiffContent content = mySide.select(myRequest.getContents()); return factory.create(content, myContext); } | createEditorHolder |
256,747 | void () { Disposer.dispose(myHolder); } | destroyEditorHolder |
256,748 | JComponent () { List<JComponent> simpleTitles = DiffUtil.createSimpleTitles(this, myRequest); return mySide.select(simpleTitles); } | createTitle |
256,749 | JComponent () { return myPanel; } | getComponent |
256,750 | JComponent () { if (!myPanel.isGoodContent()) return null; return getEditorHolder().getPreferredFocusedComponent(); } | getPreferredFocusedComponent |
256,751 | Side () { return mySide; } | getSide |
256,752 | DiffContent () { return mySide.select(myRequest.getContents()); } | getContent |
256,753 | T () { return myHolder; } | getEditorHolder |
256,754 | Object (@NotNull @NonNls String dataId) { if (DiffDataKeys.CURRENT_CONTENT.is(dataId)) { return getContent(); } return super.getData(dataId); } | getData |
256,755 | Navigatable () { return getContent().getNavigatable(); } | getNavigatable |
256,756 | void () { super.onInit(); installEditorListeners(); } | onInit |
256,757 | void () { destroyEditorListeners(); super.onDispose(); } | onDispose |
256,758 | TextEditorHolder (@NotNull EditorHolderFactory<TextEditorHolder> factory) { TextEditorHolder holder = super.createEditorHolder(factory); boolean[] forceReadOnly = TextDiffViewerUtil.checkForceReadOnly(myContext, myRequest); if (forceReadOnly[0]) holder.getEditor().setViewer(true); return holder; } | createEditorHolder |
256,759 | JComponent () { List<JComponent> textTitles = DiffUtil.createTextTitles(this, myRequest, Arrays.asList(getEditor(), getEditor())); return getSide().select(textTitles); } | createTitle |
256,760 | TextDiffSettings () { return TextDiffViewerUtil.getTextSettings(myContext); } | getTextSettings |
256,761 | List<AnAction> () { return TextDiffViewerUtil.createEditorPopupActions(); } | createEditorPopupActions |
256,762 | void () { new TextDiffViewerUtil.EditorActionsPopup(createEditorPopupActions()).install(getEditors(), myPanel); } | installEditorListeners |
256,763 | void () { } | destroyEditorListeners |
256,764 | EditorEx () { return getEditorHolder().getEditor(); } | getEditor |
256,765 | DocumentContent () { return (DocumentContent)super.getContent(); } | getContent |
256,766 | void (int line) { DiffUtil.scrollEditor(getEditor(), line, false); } | scrollToLine |
256,767 | Navigatable () { return getContent().getNavigatable(LineCol.fromCaret(getEditor())); } | getNavigatable |
256,768 | boolean (@NotNull DiffContext context, @NotNull DiffRequest request) { return OnesideDiffViewer.canShowRequest(context, request, TextEditorHolder.TextEditorHolderFactory.INSTANCE); } | canShowRequest |
256,769 | Navigatable (@NotNull Editor editor, int line) { if (editor != getEditor()) return null; return getContent().getNavigatable(new LineCol(line)); } | getNavigatable |
256,770 | Object (@NotNull @NonNls String dataId) { if (DiffDataKeys.CURRENT_EDITOR.is(dataId)) { return getEditor(); } return super.getData(dataId); } | getData |
256,771 | void (boolean value) { } | disableSyncScroll |
256,772 | boolean () { if (myScrollToLine == null) return false; Side side = myScrollToLine.first; if (side != getSide()) return false; scrollToLine(myScrollToLine.second); return true; } | doScrollToLine |
256,773 | String () { return myActionId; } | getActionId |
256,774 | boolean (boolean enabled) { return enabled && findCollector(myFile) != null; } | updateCollectors |
256,775 | void (@NotNull FileTypeEvent event) { updateVisibility(); } | fileTypesChanged |
256,776 | void (boolean value) { myCrumbsShown = value; updateVisibility(); } | setCrumbsShown |
256,777 | void () { ModalityUiUtil.invokeLaterIfNeeded(ModalityState.stateForComponent(this), () -> { if (Disposer.isDisposed(this)) return; boolean hasCollectors = updateCollectors(myCrumbsShown); if (hasCollectors != isVisible()) { setVisible(hasCollectors); revalidate(); repaint(); } queueUpdate(); }); } | updateVisibility |
256,778 | FileBreadcrumbsCollector (@Nullable VirtualFile file) { if (file == null) return null; FileViewProvider viewProvider = PsiManager.getInstance(myProject).findViewProvider(file); if (viewProvider == null) return null; if (!ContainerUtil.exists(viewProvider.getLanguages(), lang -> BreadcrumbsUtilEx.isBreadcrumbsShownFor(l... | findCollector |
256,779 | int () { if (((EditorEx)myEditor).getVerticalScrollbarOrientation() == EditorEx.VERTICAL_SCROLLBAR_LEFT) { return 0; } return super.getLeftOffset(); } | getLeftOffset |
256,780 | void () { } | onInit |
256,781 | void () { } | onDispose |
256,782 | void () { } | onBeforeRediff |
256,783 | void () { } | onAfterRediff |
256,784 | void () { } | onRediffAborted |
256,785 | String () { return DiffBundle.message(myTextKey); } | getText |
256,786 | ComparisonPolicy () { return switch (this) { case DEFAULT, FORMATTING -> ComparisonPolicy.DEFAULT; case TRIM_WHITESPACES -> ComparisonPolicy.TRIM_WHITESPACES; case IGNORE_WHITESPACES, IGNORE_WHITESPACES_CHUNKS -> ComparisonPolicy.IGNORE_WHITESPACES; }; } | getComparisonPolicy |
256,787 | boolean () { return this == IGNORE_WHITESPACES_CHUNKS; } | isShouldTrimChunks |
256,788 | void () { rediff(wasNotShownYet); wasNotShownYet = false; } | showNotify |
256,789 | void () { abortRediff(); } | hideNotify |
256,790 | void () { if (myDisposed) return; ThreadingAssertions.assertEventDispatchThread(); UIUtil.invokeLaterIfNeeded(() -> { if (myDisposed) return; myDisposed = true; abortRediff(); updateContextHints(); fireEvent(EventType.DISPOSE); onDispose(); }); } | dispose |
256,791 | void () { } | processContextHints |
256,792 | void () { } | updateContextHints |
256,793 | void () { if (isDisposed()) return; abortRediff(); if (UIUtil.isShowing(getComponent())) { myTaskAlarm.addRequest(this::rediff, ProgressIndicatorWithDelayedPresentation.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS); } } | scheduleRediff |
256,794 | void () { myTaskExecutor.abort(); myTaskAlarm.cancelAllRequests(); fireEvent(EventType.REDIFF_ABORTED); } | abortRediff |
256,795 | void () { rediff(false); } | rediff |
256,796 | void (boolean trySync) { if (isDisposed()) return; abortRediff(); fireEvent(EventType.BEFORE_REDIFF); onBeforeRediff(); boolean forceEDT = forceRediffSynchronously(); int waitMillis = trySync || tryRediffSynchronously() ? ProgressIndicatorWithDelayedPresentation.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS : 0; myTaskE... | rediff |
256,797 | Project () { return myProject; } | getProject |
256,798 | ContentDiffRequest () { return myRequest; } | getRequest |
256,799 | DiffContext () { return myContext; } | getContext |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.