Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
246,100 | int (int x, int y) { if (0 < myImageHeight && myImageY <= y) { int index = myArraySize * (y - myImageY) / myImageHeight; if (index < myArraySize) return index; } return -1; } | findIndex |
246,101 | void (int count) { if (count < 0) count = 0; if (myArray == null) { myArray = new Value[count]; } else if (myArray.length < count) { myArray = ArrayUtil.realloc(myArray, count, Value[]::new); } if (myArraySize != count) { myArraySize = count; invalidate(); } } | setErrorStripeCount |
246,102 | boolean () { for (int index = 0; index < myArraySize; index++) { Value value = myArray[index]; if (value != null && value.myModified) return true; } return false; } | isModified |
246,103 | void () { for (int index = 0; index < myArraySize; index++) { Value value = myArray[index]; if (value != null) value.set(null); } } | clear |
246,104 | void (int index) { Value value = getValue(index, false); if (value != null) value.set(null); } | clear |
246,105 | void (int index, ErrorStripe stripe) { Value value = getValue(index, stripe != null); if (value != null) value.add(stripe); } | addErrorStripe |
246,106 | Value (int index, boolean create) { if (0 > index || index >= myArraySize) return null; if (create && null == myArray[index]) { myArray[index] = mySingleValue ? new SingleValue() : new ComplexValue(); } return myArray[index]; } | getValue |
246,107 | int (int height, int thickness) { if (height > thickness) { if (myAlignment == Alignment.CENTER) return (height - thickness) / 2; if (myAlignment == Alignment.BOTTOM) return height - thickness; } return 0; } | getOffset |
246,108 | void (BufferedImage image, boolean force) { int width = ImageUtil.getUserWidth(image); int height = ImageUtil.getUserHeight(image); Graphics2D g = image.createGraphics(); myImageHeight = 0; int min = myMin + myGap; int max = height / myArraySize; if (max < min) { max = height / min; int currentIndex = 0; SingleValue cu... | updateImage |
246,109 | void (BufferedImage image) { if (isModified()) updateImage(image, false); } | updateImage |
246,110 | BufferedImage (int width, int height) { BufferedImage image = myArraySize == 0 ? null : super.createImage(width, height); if (image != null) updateImage(image, true); return image; } | createImage |
246,111 | void (@NotNull Graphics2D g, int x, int y, int width, int height, Object object) { myImageY = y; super.paint(g, x, y, width, height, object); } | paint |
246,112 | void (MouseEvent event) { onMouseMove(myPainter, event.getX(), event.getY()); } | mouseMoved |
246,113 | void (MouseEvent event) { onMouseClick(myPainter, event.getX(), event.getY()); } | mouseClicked |
246,114 | void () { myScrollBar.removeMouseListener(myMouseAdapter); myScrollBar.removeMouseMotionListener(myMouseAdapter); ComponentUtil.putClientProperty(myScrollBar, JBScrollBar.TRACK, null); } | dispose |
246,115 | int (Painter painter, int x, int y) { int index = painter.findIndex(x, y); if (null != painter.getErrorStripe(index)) return index; index = painter.findIndex(x, y + 1); if (null != painter.getErrorStripe(index)) return index; index = painter.findIndex(x, y - 1); if (null != painter.getErrorStripe(index)) return index; ... | findErrorStripeIndex |
246,116 | void (Painter painter, int x, int y) { onMouseMove(painter, findErrorStripeIndex(painter, x, y)); } | onMouseMove |
246,117 | void (Painter painter, int index) { myScrollBar.setCursor(index < 0 ? null : Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); } | onMouseMove |
246,118 | void (Painter painter, int x, int y) { onMouseClick(painter, findErrorStripeIndex(painter, x, y)); } | onMouseClick |
246,119 | void (Painter painter, int index) { onSelect(painter, index); } | onMouseClick |
246,120 | void (Painter painter, int index) { } | onSelect |
246,121 | ShortcutSet () { return getActiveKeymapShortcuts("GotoNextError"); } | getNextErrorShortcut |
246,122 | void (int index) { onSelect(myPainter, findNextIndex(index)); } | selectNext |
246,123 | ShortcutSet () { return getActiveKeymapShortcuts("GotoPreviousError"); } | getPreviousErrorShortcut |
246,124 | void (int index) { onSelect(myPainter, findPreviousIndex(index)); } | selectPrevious |
246,125 | void (Painter painter, int index, Object object) { painter.setErrorStripe(index, getErrorStripe(object)); } | update |
246,126 | ErrorStripe (Object object) { return object instanceof ErrorStripe ? (ErrorStripe)object : null; } | getErrorStripe |
246,127 | void () { myQueue.cancelAllUpdates(); myQueue.queue(new Update("update") { @Override public void run() { update(myPainter); if (myPainter.isModified()) { myScrollBar.invalidate(); myScrollBar.repaint(); } } }); } | update |
246,128 | void () { update(myPainter); if (myPainter.isModified()) { myScrollBar.invalidate(); myScrollBar.repaint(); } } | run |
246,129 | int (int current) { SearchResult result = new SearchResult(); int max = myPainter.getErrorStripeCount() - 1; if (0 <= current && current < max) { result.updateForward(myPainter, current + 1, max); result.updateForward(myPainter, 0, current); } else if (0 <= max) { result.updateForward(myPainter, 0, max); } return resul... | findNextIndex |
246,130 | int (int current) { SearchResult result = new SearchResult(); int max = myPainter.getErrorStripeCount() - 1; if (0 < current && current <= max) { result.updateBackward(myPainter, current - 1, 0); result.updateBackward(myPainter, max, current); } else if (0 <= max) { result.updateBackward(myPainter, max, 0); } return re... | findPreviousIndex |
246,131 | Component (@NotNull JList<? extends E> list, @Nullable E value, int index, boolean selected, boolean focused) { configure(list, value); setForeground(RenderingUtil.getForeground(list, selected)); setBackground(RenderingUtil.getBackground(list, selected)); setBorder(EMPTY); return this; } | getListCellRendererComponent |
246,132 | Component (@NotNull JTree tree, @Nullable Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean focused) { configure(tree, tree.convertValueToText(value, selected, expanded, leaf, row, focused)); setForeground(RenderingUtil.getForeground(tree, selected)); setBackground(RenderingUtil.getBackgr... | getTreeCellRendererComponent |
246,133 | void () {} | validate |
246,134 | void () {} | invalidate |
246,135 | void () {} | revalidate |
246,136 | void () {} | repaint |
246,137 | void (Rectangle bounds) {} | repaint |
246,138 | void (long unused, int x, int y, int width, int height) {} | repaint |
246,139 | void (String propertyName, byte oldValue, byte newValue) {} | firePropertyChange |
246,140 | void (String propertyName, char oldValue, char newValue) {} | firePropertyChange |
246,141 | void (String propertyName, short oldValue, short newValue) {} | firePropertyChange |
246,142 | void (String propertyName, int oldValue, int newValue) {} | firePropertyChange |
246,143 | void (String propertyName, long oldValue, long newValue) {} | firePropertyChange |
246,144 | void (String propertyName, float oldValue, float newValue) {} | firePropertyChange |
246,145 | void (String propertyName, double oldValue, double newValue) {} | firePropertyChange |
246,146 | void (String propertyName, boolean oldValue, boolean newValue) {} | firePropertyChange |
246,147 | void (String propertyName, Object oldValue, Object newValue) { if ("text".equals(propertyName) || (("font".equals(propertyName) || "foreground".equals(propertyName)) && oldValue != newValue && getClientProperty(BasicHTML.propertyKey) != null)) { super.firePropertyChange(propertyName, oldValue, newValue); } } | firePropertyChange |
246,148 | int () { return myViewBounds.x; } | getX |
246,149 | int () { return myViewBounds.y; } | getY |
246,150 | int () { return myViewBounds.width; } | getWidth |
246,151 | int () { return myViewBounds.height; } | getHeight |
246,152 | int () { return myRightMargin; } | getRightMargin |
246,153 | boolean (int index) { return myShrinkingDisabled || isExpandableHintShown(index); } | isRendererShrinkingDisabled |
246,154 | boolean (int index) { return myShrinkingSelectionDisabled || isExpandableHintShown(index); } | isShrinkingSelectionDisabled |
246,155 | boolean (int index) { return myHintIndex == index; } | isExpandableHintShown |
246,156 | int (@NotNull JComponent component) { if (component instanceof ComponentWithExpandableItems<?> c) { Collection<?> items = c.getExpandableItemsHandler().getExpandedItems(); Object item = items.isEmpty() ? null : items.iterator().next(); if (item instanceof Integer) return (Integer)item; } return -1; } | getExpandableHintIndex |
246,157 | void () { super.addNotify(); myHwFacadeHelper.addNotify(); } | addNotify |
246,158 | void () { super.removeNotify(); myHwFacadeHelper.removeNotify(); } | removeNotify |
246,159 | void () { super.show(); myHwFacadeHelper.show(); } | show |
246,160 | void () { super.hide(); myHwFacadeHelper.hide(); } | hide |
246,161 | void (Graphics g) { myHwFacadeHelper.paint(g, (gg) -> super.paint(gg)); } | paint |
246,162 | DefaultCefContextMenuHandler () { return new DefaultCefContextMenuHandler() { @Override public void onBeforeContextMenu(CefBrowser browser, CefFrame frame, CefContextMenuParams params, CefMenuModel model) { model.clear(); super.onBeforeContextMenu(browser, frame, params, model); } }; } | createDefaultContextMenuHandler |
246,163 | void (CefBrowser browser, CefFrame frame, CefContextMenuParams params, CefMenuModel model) { model.clear(); super.onBeforeContextMenu(browser, frame, params, model); } | onBeforeContextMenu |
246,164 | void (@NotNull String html) { String htmlToRender = prepareHtml(html); loadHTML(htmlToRender, myUrl); } | setHtml |
246,165 | String (@NotNull String html) { return html; } | prepareHtml |
246,166 | void () { super.addNotify(); myHwFacadeHelper.addNotify(); } | addNotify |
246,167 | void () { super.removeNotify(); myHwFacadeHelper.removeNotify(); } | removeNotify |
246,168 | void () { super.show(); myHwFacadeHelper.show(); } | show |
246,169 | void () { super.hide(); myHwFacadeHelper.hide(); } | hide |
246,170 | void (Graphics g) { myHwFacadeHelper.paint(g, (gg) -> super.paint(gg)); } | paint |
246,171 | List<CefBrowser> () { List<CefBrowser> list = new LinkedList<>(); if (getCefApp() == null || !clientsField.isAvailable() || !browsersField.isAvailable()) { return list; } Set<CefClient> clients = clientsField.get(ourCefApp); if (clients == null) { return list; } for (CefClient client : clients) { Map<?, CefBrowser> bro... | getHwBrowsers |
246,172 | HwFacadeHelper (@NotNull JComponent target) { return JBCefApp.isSupported() ? new HwFacadeHelper(target) : // do not provoke any JBCef* class loading new HwFacadeHelper(target) { @Override public void addNotify() { } @Override public void show() { } @Override public void removeNotify() { } @Override public void hide() ... | create |
246,173 | void () { } | addNotify |
246,174 | void () { } | show |
246,175 | void () { } | removeNotify |
246,176 | void () { } | hide |
246,177 | void (@NotNull Graphics g, @NotNull Consumer<? super Graphics> targetPaint) { targetPaint.accept(g); } | paint |
246,178 | boolean () { return myHwFacade != null && Registry.is("ide.browser.jcef.hwfacade.enabled"); } | isActive |
246,179 | boolean () { return JCEFAccessor.getCefApp() != null; } | isCefAppActive |
246,180 | void () { if (!isCefAppActive()) return; assert myHwFacade == null; assert myTarget.isVisible(); myTarget.addComponentListener(myTargetListener = new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { if (isActive()) { myHwFacade.setSize(myTarget.getSize()); } else { activateIfNeeded(JCEFAc... | onShowing |
246,181 | void (ComponentEvent e) { if (isActive()) { myHwFacade.setSize(myTarget.getSize()); } else { activateIfNeeded(JCEFAccessor.getHwBrowsers()); } } | componentResized |
246,182 | void (ComponentEvent e) { if (isActive()) { if (myHwFacade.isVisible()) myHwFacade.setLocation(myTarget.getLocationOnScreen()); } else { activateIfNeeded(JCEFAccessor.getHwBrowsers()); } } | componentMoved |
246,183 | void (@NotNull List<? extends CefBrowser> browsers) { if (isActive() || !Registry.is("ide.browser.jcef.hwfacade.enabled") || !isCefAppActive() || !myTarget.isShowing() || SystemInfo.isLinux) { return; } Rectangle targetBounds = new Rectangle(myTarget.getLocationOnScreen(), myTarget.getSize()); boolean overlaps = false;... | activateIfNeeded |
246,184 | void (ComponentEvent e) { if (myTarget.isVisible()) { myHwFacade.setLocation(myTarget.getLocationOnScreen()); } } | componentMoved |
246,185 | void (Graphics g) { super.paintComponent(g); if (myBackBuffer != null) { g.drawImage(myBackBuffer, 0, 0, null); } } | paintComponent |
246,186 | void () { if (myTarget.isVisible()) { onShowing(); } if (!SystemInfo.isLinux) JBCefBrowser.addOnBrowserMoveResizeCallback(onBrowserMoveResizeCallback); } | addNotify |
246,187 | void () { if (!isCefAppActive()) return; if (AWTAccessor.getComponentAccessor().getPeer(myTarget) != null) { if (isActive()) { myHwFacade.setVisible(true); } else { onShowing(); } } } | show |
246,188 | void () { if (isActive()) { myHwFacade.dispose(); myHwFacade = null; myBackBuffer = null; myTarget.removeComponentListener(myTargetListener); Window owner = SwingUtilities.getWindowAncestor(myTarget); assert owner != null; owner.removeComponentListener(myOwnerListener); } if (!SystemInfo.isLinux) JBCefBrowser.removeOnB... | removeNotify |
246,189 | void () { if (isActive()) { myHwFacade.setVisible(false); } } | hide |
246,190 | void (@NotNull Graphics g, @NotNull Consumer<? super Graphics> targetPaint) { if (isActive()) { Dimension size = myTarget.getSize(); if (myBackBuffer == null || myBackBuffer.getWidth() != size.width || myBackBuffer.getHeight() != size.height) { myBackBuffer = GraphicsEnvironment. getLocalGraphicsEnvironment(). getDefau... | paint |
246,191 | void () { final var stackTraceHolder = new Throwable("Asynchronously launched from here"); ForkJoinPool.commonPool().execute(() -> { try { final var wsi = wsiFuture.get(30, TimeUnit.SECONDS); if (wsi == null) { return; } final List<AnAction> recentProjectActions = RecentProjectListActionProvider.getInstance().getAction... | updateRecentProjectsMenu |
246,192 | void () { if (myFileDialog == null) return; JBRFileDialog jbrDialog = JBRFileDialog.get(myFileDialog); if (jbrDialog != null) { jbrDialog.setLocalizationStrings(IdeBundle.message("windows.native.common.dialog.open"), IdeBundle.message("windows.native.common.dialog.select.folder")); int hints = jbrDialog.getHints(); if ... | initExtendedProperties |
246,193 | void (@Nullable VirtualFile toSelect, @NotNull Consumer<? super List<VirtualFile>> callback) { if (toSelect != null && toSelect.getParent() != null) { String directoryName; String fileName = null; if (toSelect.isDirectory()) { directoryName = toSelect.getCanonicalPath(); } else { directoryName = toSelect.getParent().ge... | choose |
246,194 | FileDialog (String title, int load) { // This is bad. But sometimes we do not have any windows at all. // On the other hand, it is a bit strange to show a file dialog without an owner // Therefore we should minimize usage of this case. return new FileDialog((Frame)null, title, load); } | createFileDialogWithoutOwner |
246,195 | void () { parent.clearRecentTasksList(); } | clearRecentTasksList |
246,196 | void (@NotNull JumpTask @NotNull [] recentTasks) { parent.setRecentTasksList(recentTasks); } | setRecentTasksList |
246,197 | void () { bridge.comExecutor.shutdown(); } | dispose |
246,198 | void () { bridge.ensureNativeIsInitialized(); bridge.clearRecentTasksListNative(); } | clearRecentTasksList |
246,199 | void (@NotNull JumpTask @NotNull [] recentTasks) { bridge.ensureNativeIsInitialized(); bridge.setRecentTasksListNative(recentTasks); } | setRecentTasksList |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.