Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
241,700 | void (final Graphics2D g, final char c, final float x, final float y, final Font font, final Color color) { g.setFont(font); g.setColor(color); g.drawString(String.valueOf(c), x, y); } | drawChar |
241,701 | Color (final Editor editor) { Color overriddenColor = editor.getCaretModel().getPrimaryCaret().getVisualAttributes().getColor(); if (overriddenColor != null) return overriddenColor; final Color caretColor = editor.getColorsScheme().getColor(EditorColors.CARET_COLOR); return caretColor == null ? new JBColor(Gray._0, Gra... | getCaretColor |
241,702 | void (final EditorImpl editor, final int offset, final List<? extends TextAttributes> attributes) { final List<RangeHighlighterEx> list1 = new ArrayList<>(); final List<RangeHighlighterEx> list2 = new ArrayList<>(); final Processor<RangeHighlighterEx> processor = highlighter -> { if (!highlighter.isValid()) return true... | updateAttributes |
241,703 | void (final EditorImpl editor, final TextAttributes attributes, final List<? extends RangeHighlighterEx> highlighters) { if (highlighters.size() > 1) { ContainerUtil.quickSort(highlighters, IterationState.createByLayerThenByAttributesComparator(editor.getColorsScheme())); } TextAttributes syntax = attributes; TextAttri... | updateAttributes |
241,704 | void () { try { Thread.sleep(DEBUG_PAUSE_DURATION); } catch (InterruptedException e) { // ... } } | pause |
241,705 | void (@NotNull Int2ObjectMap<DisplayedFoldingAnchor> resultsMap, @NotNull FoldRegion region, int visualLine, int visualHeight, @NotNull DisplayedFoldingAnchor.Type type, @NotNull List<FoldRegion> activeRegions) { DisplayedFoldingAnchor prev = resultsMap.get(visualLine); if (prev != null && !prev.type.singleLine) { if (... | tryAdding |
241,706 | boolean (@NotNull FoldRegion region) { if (!region.isExpanded()) { return Boolean.TRUE.equals(region.getUserData(FoldingModelImpl.HIDE_GUTTER_RENDERER_FOR_COLLAPSED)); } return false; } | skipFoldingAnchor |
241,707 | void () { for (SoftWrapChangeListener listener : mySoftWrapListeners) { listener.recalculationEnds(); } } | recalculationEnds |
241,708 | void () { EditorSettings editorSettings = myEditor.getSettings(); if (editorSettings instanceof SettingsImpl) { ((SettingsImpl)editorSettings).setUseSoftWrapsQuiet(); } else { LOG.error(new IllegalStateException("Unexpected implementation class of editor settings: " + "class=" + editorSettings.getClass() + "editor=" + ... | forceSoftWraps |
241,709 | boolean () { return shouldSoftWrapsBeForced(null); } | shouldSoftWrapsBeForced |
241,710 | boolean (@Nullable DocumentEvent event) { if (Boolean.FALSE.equals(myEditor.getUserData(EditorImpl.FORCED_SOFT_WRAPS))) { return false; } Project project = myEditor.getProject(); Document document = myEditor.getDocument(); if (project != null && PostprocessReformattingAspect.getInstance(project).isDocumentLocked(docume... | shouldSoftWrapsBeForced |
241,711 | boolean () { return myEditor.getSettings().isUseSoftWraps() && !myEditor.isOneLineMode(); } | areSoftWrapsEnabledInEditor |
241,712 | void () { boolean softWrapsUsedBefore = myUseSoftWraps; myUseSoftWraps = areSoftWrapsEnabledInEditor(); int tabWidthBefore = myTabWidth; myTabWidth = EditorUtil.getTabSize(myEditor); boolean fontsChanged = false; if (!myFontPreferences.equals(myEditor.getColorsScheme().getFontPreferences())) { fontsChanged = true; myEd... | reinitSettings |
241,713 | boolean () { return myForceAdditionalColumns; } | isRespectAdditionalColumns |
241,714 | void () { myForceAdditionalColumns = true; } | forceAdditionalColumnsUsage |
241,715 | boolean () { ThreadingAssertions.assertEventDispatchThread(); return myUseSoftWraps && !myEditor.isPurePaintingMode(); } | isSoftWrappingEnabled |
241,716 | int (int offset) { if (!isSoftWrappingEnabled()) { return -1; } return myStorage.getSoftWrapIndex(offset); } | getSoftWrapIndex |
241,717 | boolean (SoftWrap softWrap) { FoldingModel foldingModel = myEditor.getFoldingModel(); int start = softWrap.getStart(); if (foldingModel.isOffsetCollapsed(start)) { return false; } // There is a possible case that soft wrap and collapsed folding region share the same offset, i.e., soft wrap is represented // before the ... | isVisible |
241,718 | int (@NotNull Graphics g, @NotNull SoftWrapDrawingType drawingType, int x, int y, int lineHeight) { if (!isSoftWrappingEnabled() || !myEditor.getSettings().isPaintSoftWraps()) { return 0; } if (!myEditor.getSettings().isAllSoftWrapsShown()) { int visualLine = y / lineHeight; LogicalPosition position = myEditor.visualTo... | paint |
241,719 | int (@NotNull Graphics g, @NotNull SoftWrapDrawingType drawingType, int x, int y, int lineHeight) { if (!myEditor.getSettings().isPaintSoftWraps()) { return 0; } return myPainter.paint(g, drawingType, x, y, lineHeight); } | doPaint |
241,720 | int (@NotNull SoftWrapDrawingType drawingType) { return myPainter.getMinDrawingWidth(drawingType); } | getMinDrawingWidthInPixels |
241,721 | void () { if (myUpdateInProgress || myBulkUpdateInProgress || !isSoftWrappingEnabled()) { return; } if (myDirty) { myStorage.removeAll(); myApplianceManager.reset(); myDeferredFoldRegions.clear(); myDirty = false; } myApplianceManager.recalculateIfNecessary(); } | prepareToMapping |
241,722 | boolean (@NotNull VisualPosition visual) { return isInsideSoftWrap(visual, false); } | isInsideSoftWrap |
241,723 | boolean (@NotNull VisualPosition visual) { return isInsideSoftWrap(visual, true); } | isInsideOrBeforeSoftWrap |
241,724 | boolean (@NotNull VisualPosition visual, boolean countBeforeSoftWrap) { if (!isSoftWrappingEnabled()) { return false; } SoftWrapModel model = myEditor.getSoftWrapModel(); if (!model.isSoftWrappingEnabled()) { return false; } int offset = myEditor.visualPositionToOffset(visual); if (offset <= 0) { // Never expect to be ... | isInsideSoftWrap |
241,725 | void () { CaretModel caretModel = myEditor.getCaretModel(); VisualPosition visualCaretPosition = caretModel.getVisualPosition(); if (!isInsideSoftWrap(visualCaretPosition)) { return; } SoftWrap softWrap = myStorage.getSoftWrap(caretModel.getOffset()); if (softWrap == null) { return; } myEditor.getDocument().replaceStri... | beforeDocumentChangeAtCaret |
241,726 | boolean (@NotNull SoftWrapChangeListener listener) { mySoftWrapListeners.add(listener); return myStorage.addSoftWrapChangeListener(listener); } | addSoftWrapChangeListener |
241,727 | int () { return EditorDocumentPriorities.SOFT_WRAP_MODEL; } | getPriority |
241,728 | void (@NotNull DocumentEvent event) { myAfterLineEndInlayUpdated = false; if (myBulkUpdateInProgress) { return; } myUpdateInProgress = true; if (!isSoftWrappingEnabled()) { myDirty = true; return; } myApplianceManager.beforeDocumentChange(event); } | beforeDocumentChange |
241,729 | void (@NotNull DocumentEvent event) { if (myBulkUpdateInProgress) { return; } myUpdateInProgress = false; if (!isSoftWrappingEnabled()) { if (shouldSoftWrapsBeForced(event)) { forceSoftWraps(); if (isSoftWrappingEnabled()) { myDirty = false; myApplianceManager.recalculateAll(); return; } } myDirty = true; return; } myA... | documentChanged |
241,730 | void (@NotNull FoldRegion region) { myUpdateInProgress = true; if (!isSoftWrappingEnabled() || !region.isValid()) { myDirty = true; return; } // We delay processing of changed fold regions till the invocation of onFoldProcessingEnd(), as // FoldingModel can return inconsistent data before that moment. myDeferredFoldReg... | onFoldRegionStateChange |
241,731 | void () { myUpdateInProgress = false; if (!isSoftWrappingEnabled()) { return; } try { if (!myDirty) { // no need to recalculate specific areas if the whole document will be reprocessed myApplianceManager.recalculate(myDeferredFoldRegions); } } finally { myDeferredFoldRegions.clear(); } } | onFoldProcessingEnd |
241,732 | void (@NotNull Inlay<?> inlay, int changeFlags) { if (myEditor.getDocument().isInBulkUpdate() || inlay.getPlacement() != Inlay.Placement.INLINE && inlay.getPlacement() != Inlay.Placement.AFTER_LINE_END || (changeFlags & InlayModel.ChangeFlags.WIDTH_CHANGED) == 0) { return; } if (myEditor.getInlayModel().isInBatchMode()... | onUpdated |
241,733 | void (@NotNull Editor editor) { if (myEditor.getDocument().isInBulkUpdate()) return; if (myInlayChangedInBatchMode) { myInlayChangedInBatchMode = false; recalculate(); } } | onBatchModeFinish |
241,734 | void (PropertyChangeEvent evt) { if (EditorEx.PROP_FONT_SIZE.equals(evt.getPropertyName())) { myDirty = true; } } | propertyChange |
241,735 | void () { release(); } | dispose |
241,736 | void () { myStorage.removeAll(); myDeferredFoldRegions.clear(); } | release |
241,737 | SoftWrapApplianceManager () { return myApplianceManager; } | getApplianceManager |
241,738 | void (SoftWrapPainter painter) { myPainter = painter; myApplianceManager.setSoftWrapPainter(painter); } | setSoftWrapPainter |
241,739 | String () { return dumpState(); } | toString |
241,740 | boolean () { return myUseSoftWraps && myDirty; } | isDirty |
241,741 | boolean (int startOffset, int endOffset) { assert startOffset >= 0; assert startOffset <= endOffset; assert endOffset <= myEditor.getDocument().getTextLength(); if (myDisabled) return true; if (startOffset < myVisualLineStartOffset || startOffset > myVisualLineEndOffset) { myVisualLineStartOffset = EditorUtil.getNotFol... | rangeCanBeVisible |
241,742 | void (@NotNull Project project) { // validate all editors are disposed after fireProjectClosed() was called, because it's the place where editor should be released Disposer.register(project, () -> { Project[] openProjects = ProjectManager.getInstance().getOpenProjects(); boolean isLastProjectClosed = openProjects.lengt... | projectClosed |
241,743 | void (boolean entering, @NotNull Object modalEntity) { collectAllEditors().forEach(editor -> ((EditorImpl)editor).beforeModalityStateChanged()); } | beforeModalityStateChanged |
241,744 | void (@NotNull Project project, boolean isLastProjectClosed) { collectAllEditors().forEach(editor -> { if (editor.getProject() == project || (editor.getProject() == null && isLastProjectClosed)) { try { throwNotReleasedError(editor); } finally { releaseEditor(editor); } } }); } | validateEditorsAreReleased |
241,745 | void (@NotNull Editor editor) { if (editor instanceof EditorImpl) { ((EditorImpl)editor).throwDisposalError("Editor " + editor + " hasn't been released:"); } throw new RuntimeException("Editor of " + editor.getClass() + " and the following text hasn't been released:\n" + editor.getDocument().getText()); } | throwNotReleasedError |
241,746 | Document (char @NotNull [] text) { return createDocument(new CharArrayCharSequence(text)); } | createDocument |
241,747 | Document (@NotNull CharSequence text) { DocumentEx document = new DocumentImpl(text); myEditorEventMulticaster.registerDocument(document); return document; } | createDocument |
241,748 | Document (boolean allowUpdatesWithoutWriteAction) { DocumentEx document = new DocumentImpl("", allowUpdatesWithoutWriteAction); myEditorEventMulticaster.registerDocument(document); return document; } | createDocument |
241,749 | Document (@NotNull CharSequence text, boolean acceptsSlashR, boolean allowUpdatesWithoutWriteAction) { DocumentEx document = new DocumentImpl(text, acceptsSlashR, allowUpdatesWithoutWriteAction); myEditorEventMulticaster.registerDocument(document); return document; } | createDocument |
241,750 | void () { collectAllEditors().forEach(editor -> { if (AsyncEditorLoader.isEditorLoaded(editor)) { ((EditorEx)editor).reinitSettings(); } }); } | refreshAllEditors |
241,751 | Editor (@NotNull Document document) { return createEditor(document, false, null, EditorKind.UNTYPED); } | createEditor |
241,752 | Editor (@NotNull Document document) { return createEditor(document, true, null, EditorKind.UNTYPED); } | createViewer |
241,753 | Editor (@NotNull Document document, Project project) { return createEditor(document, false, project, EditorKind.UNTYPED); } | createEditor |
241,754 | Editor (@NotNull Document document, @Nullable Project project, @NotNull EditorKind kind) { return createEditor(document, false, project, kind); } | createEditor |
241,755 | Editor (@NotNull Document document, Project project) { return createEditor(document, true, project, EditorKind.UNTYPED); } | createViewer |
241,756 | Editor (@NotNull Document document, @Nullable Project project, @NotNull EditorKind kind) { return createEditor(document, true, project, kind); } | createViewer |
241,757 | Editor (final @NotNull Document document, final Project project, final @NotNull FileType fileType, final boolean isViewer) { EditorEx editor = createEditor(document, isViewer, project, EditorKind.UNTYPED); editor.setHighlighter(EditorHighlighterFactory.getInstance().createEditorHighlighter(project, fileType)); return e... | createEditor |
241,758 | Editor (@NotNull Document document, Project project, @NotNull VirtualFile file, boolean isViewer) { EditorEx editor = createEditor(document, isViewer, project, EditorKind.UNTYPED); editor.setHighlighter(EditorHighlighterFactory.getInstance().createEditorHighlighter(project, file)); return editor; } | createEditor |
241,759 | Editor (@NotNull Document document, Project project, @NotNull VirtualFile file, boolean isViewer, @NotNull EditorKind kind) { EditorEx editor = createEditor(document, isViewer, project, kind); editor.setHighlighter(EditorHighlighterFactory.getInstance().createEditorHighlighter(project, file)); return editor; } | createEditor |
241,760 | EditorImpl (@NotNull Document document, boolean isViewer, @Nullable Project project, @NotNull EditorKind kind) { Document hostDocument = document instanceof DocumentWindow ? ((DocumentWindow)document).getDelegate() : document; return doCreateEditor(project, hostDocument, isViewer, kind, null, null); } | createEditor |
241,761 | EditorImpl (@NotNull Document document, @NotNull Project project, @NotNull VirtualFile file, @Nullable EditorHighlighter highlighter) { assert !(document instanceof DocumentWindow); return doCreateEditor(project, document, false, EditorKind.MAIN_EDITOR, file, highlighter); } | createMainEditor |
241,762 | EditorImpl (@Nullable Project project, @NotNull Document document, boolean isViewer, @NotNull EditorKind kind, @Nullable VirtualFile file, @Nullable EditorHighlighter highlighter) { EditorImpl editor = new EditorImpl(document, isViewer, project, kind, file, highlighter); ClientEditorManager editorManager = ClientEditor... | doCreateEditor |
241,763 | void (@NotNull Editor editor) { ThreadingAssertions.assertEventDispatchThread(); try { EditorFactoryEvent event = new EditorFactoryEvent(this, editor); myEditorFactoryEventDispatcher.getMulticaster().editorReleased(event); EP.forEachExtensionSafe(it -> it.editorReleased(event)); } finally { try { if (editor instanceof ... | releaseEditor |
241,764 | Stream<Editor> (@NotNull Document document, @Nullable Project project) { return collectAllEditors() .filter(editor -> editor.getDocument().equals(document) && (project == null || project.equals(editor.getProject()))); } | editors |
241,765 | Stream<Editor> () { return ClientEditorManager.getAllInstances().stream().flatMap(ClientEditorManager::editors); } | collectAllEditors |
241,766 | void (@NotNull EditorFactoryListener listener) { myEditorFactoryEventDispatcher.addListener(listener); } | addEditorFactoryListener |
241,767 | void (@NotNull EditorFactoryListener listener, @NotNull Disposable parentDisposable) { myEditorFactoryEventDispatcher.addListener(listener, parentDisposable); } | addEditorFactoryListener |
241,768 | void (@NotNull EditorFactoryListener listener) { myEditorFactoryEventDispatcher.removeListener(listener); } | removeEditorFactoryListener |
241,769 | EditorEventMulticaster () { return myEditorEventMulticaster; } | getEventMulticaster |
241,770 | void (@NotNull Editor editor, char charTyped, @NotNull DataContext dataContext) { editor.putUserData(EditorImpl.DISABLE_CARET_SHIFT_ON_WHITESPACE_INSERTION, Boolean.TRUE); try { myDelegate.execute(editor, charTyped, dataContext); } finally { editor.putUserData(EditorImpl.DISABLE_CARET_SHIFT_ON_WHITESPACE_INSERTION, nul... | execute |
241,771 | void (@NotNull Editor editor, char c, @NotNull DataContext context, @NotNull ActionPlan plan) { if (myDelegate instanceof TypedActionHandlerEx) { ((TypedActionHandlerEx)myDelegate).beforeExecute(editor, c, context, plan); } } | beforeExecute |
241,772 | MarkupModelListener (boolean documentMarkupModel) { return new MarkupModelListener() { final Queue<RangeHighlighterEx> toRemove = new ConcurrentLinkedDeque<>(); @Override public void afterAdded(@NotNull RangeHighlighterEx highlighter) { ErrorStripeMarkersModel.this.afterAdded(highlighter, documentMarkupModel); } @Overr... | createMarkupListener |
241,773 | void (@NotNull RangeHighlighterEx highlighter) { ErrorStripeMarkersModel.this.afterAdded(highlighter, documentMarkupModel); } | afterAdded |
241,774 | void (@NotNull RangeHighlighterEx highlighter) { toRemove.add(highlighter); } | beforeRemoved |
241,775 | void (@NotNull RangeHighlighterEx highlighter) { while (true) { RangeHighlighterEx marker = toRemove.poll(); if (marker == null) break; ErrorStripeMarkerImpl errorStripeMarker = errorStripeForRemovedMarker(highlighter, documentMarkupModel); if (errorStripeMarker != null) { removeErrorStripeMarker(errorStripeMarker); } ... | afterRemoved |
241,776 | void (@NotNull RangeHighlighterEx highlighter, boolean renderersChanged, boolean fontStyleOrColorChanged) { ErrorStripeMarkersModel.this.attributesChanged(highlighter, documentMarkupModel); } | attributesChanged |
241,777 | void (@NotNull RangeHighlighterEx highlighter, boolean documentMarkupModel) { if (isAvailable(highlighter, documentMarkupModel)) { createErrorStripeMarker(highlighter); } } | afterAdded |
241,778 | ErrorStripeMarkerImpl (@NotNull RangeHighlighterEx originalHighlighter, boolean documentMarkupModel) { ErrorStripeMarkerImpl errorStripeMarker = findErrorStripeMarker(originalHighlighter, false); if (errorStripeMarker == null && isAvailable(originalHighlighter, documentMarkupModel)) { errorStripeMarker = findErrorStrip... | errorStripeForRemovedMarker |
241,779 | boolean (@NotNull RangeHighlighterEx highlighter, boolean documentMarkupModel) { if (documentMarkupModel) { if (!highlighter.getEditorFilter().avaliableIn(myEditor) || !myEditor.isHighlighterAvailable(highlighter)) return false; } return highlighter.getErrorStripeMarkColor(myEditor.getColorsScheme()) != null; } | isAvailable |
241,780 | void (@NotNull RangeHighlighterEx h) { ErrorStripeMarkerImpl marker = new ErrorStripeMarkerImpl(myEditor.getDocument(), h); treeFor(h).addInterval(marker, h.getStartOffset(), h.getEndOffset(), h.isGreedyToLeft(), h.isGreedyToRight(), (h instanceof RangeMarkerImpl) && ((RangeMarkerImpl)h).isStickingToRight(), h.getLayer... | createErrorStripeMarker |
241,781 | void (@NotNull ErrorStripeMarkerImpl errorStripeMarker) { RangeHighlighterEx highlighter = errorStripeMarker.getHighlighter(); treeFor(highlighter).removeInterval(errorStripeMarker); EdtInvocationManager.invokeLaterIfNeeded(() -> { if (!myEditor.isDisposed()) { myListeners.forEach(l -> l.errorMarkerChanged(new ErrorStr... | removeErrorStripeMarker |
241,782 | ErrorStripeMarkerImpl (@NotNull RangeHighlighterEx highlighter, boolean lookEverywhere) { TextRange range = lookEverywhere ? new ProperTextRange(0, myEditor.getDocument().getTextLength()) : highlighter.getTextRange(); MarkupIterator<ErrorStripeMarkerImpl> iterator = treeFor(highlighter).overlappingIterator(range); try ... | findErrorStripeMarker |
241,783 | ErrorStripeRangeMarkerTree (@NotNull RangeHighlighter highlighter) { return highlighter.getTargetArea() == HighlighterTargetArea.EXACT_RANGE ? myTree : myTreeForLines; } | treeFor |
241,784 | void () { myTree.clear(); myTreeForLines.clear(); } | clear |
241,785 | void () { myDelegate.dispose(); myToRemove.forEach(m -> treeFor(m.getHighlighter()).removeInterval(m)); } | dispose |
241,786 | boolean () { return myNext != null; } | hasNext |
241,787 | RangeHighlighterEx () { RangeHighlighterEx result = myNext; advance(); return result; } | next |
241,788 | void () { while (myDelegate.hasNext()) { ErrorStripeMarkerImpl next = myDelegate.next(); RangeHighlighterEx highlighter = next.getHighlighter(); if (highlighter.isValid()) { myNext = highlighter; return; } else { myToRemove.add(next); } } myNext = null; } | advance |
241,789 | Point () { return myPoint; } | getPoint |
241,790 | VisualPosition () { if (myVisualPosition == null) { myVisualPosition = myEditor.xyToVisualPosition(myPoint); } return myVisualPosition; } | getVisualPosition |
241,791 | LogicalPosition () { if (myLogicalPosition == null) { myLogicalPosition = myEditor.visualToLogicalPosition(getVisualPosition()); } return myLogicalPosition; } | getLogicalPosition |
241,792 | boolean () { return false; } | isExpanded |
241,793 | void (boolean expanded) {} | setExpanded |
241,794 | String () { return ""; } | getPlaceholderText |
241,795 | Editor () { return null; } | getEditor |
241,796 | boolean () { return false; } | shouldNeverExpand |
241,797 | Document () { throw new UnsupportedOperationException(); } | getDocument |
241,798 | int () { return 0; } | getStartOffset |
241,799 | int () { return 0; } | getEndOffset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.