Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
286,300
FileSystemProvider (Path path) { if (isMountedFSPath(path)) throw new UnsupportedOperationException(); return myLocalProvider; }
tryGetLocalProvider
286,301
FileSystemProvider () { return isInitialized() ? getMountedFSProvider() : myLocalProvider; }
getProvider
286,302
FileSystemProvider (URI uri) { return isInitialized() && isMountedFSURI(uri) ? getMountedFSProvider() : myLocalProvider; }
getProvider
286,303
FileSystemProvider (Path path) { return isInitialized() && isMountedFSPath(path) ? getMountedFSProvider() : myLocalProvider; }
getProvider
286,304
FileSystemProvider (Path... path) { FileSystemProvider provider = null; for (Path p : path) { FileSystemProvider current = getProvider(p); if (provider == null) { provider = current; continue; } if (current != provider) throw new IllegalArgumentException("Provider mismatch"); } return Objects.requireNonNull(provider); ...
getProvider
286,305
FileSystemProvider () { if (myProvider == null) { synchronized (myLock) { if (myProvider == null) { myProvider = createInstance( myProviderClassName, new Class[]{FileSystem.class}, myFileSystem); } } } return myProvider; }
getMountedFSProvider
286,306
Path (Path path) { return path == null ? null : path(myFileSystem, path); }
path
286,307
Path (CoreRoutingFileSystem fileSystem, Path path) { return path instanceof CorePath ? path : new CorePath(fileSystem, path); }
path
286,308
boolean (Path path) { return path instanceof CorePath && myFileSystem.isMountedFSPath((CorePath)path); }
isMountedFSPath
286,309
boolean (URI uri) { return uri != null && CoreRoutingFileSystem.isMountedFSFile(uri.getPath()); }
isMountedFSURI
286,310
Path (Path path) { return path == null ? null : ((CorePath)path).getDelegate(); }
unwrap
286,311
String (String path) { return path.replace("\\", SEPARATOR); }
normalizePath
286,312
String () { return "UiActivity: " + myElements; }
toString
286,313
int () { return ComparableObjectCheck.hashCode(this, super.hashCode()); }
hashCode
286,314
boolean (Object obj) { return ComparableObjectCheck.equals(this, obj); }
equals
286,315
boolean (UiActivity other) { if (myElements.size() > other.myElements.size()) return false; for (int i = 0; i < myElements.size(); i++) { if (!myElements.get(i).equals(other.myElements.get(i))) return false; } return true; }
isSameOrGeneralFor
286,316
UiActivityMonitor () { return ApplicationManager.getApplication().getService(UiActivityMonitor.class); }
getInstance
286,317
Icon (@NotNull VirtualFile vFile) { return IconUtil.getIcon(vFile, 0, null); }
getIcon
286,318
int (int value) { return Math.max(min, Math.min(max, value)); }
fit
286,319
String () { return "[" + min + ".." + initial + ".." + max + "]"; }
toString
286,320
void () { onReady(null); }
onReady
286,321
void (@Nullable Object readyRequestor) { if (!isReady()) { return; } if (readyRequestor == null) { for (ActionCallback each : getReadyCallbacks()) { each.setDone(); } } else { Pair<ActionCallback, List<ActionCallback>> callbacks = getReadyCallbacks(readyRequestor); callbacks.getFirst().setDone(); for (ActionCallback ea...
onReady
286,322
void () { }
onReadyWasSent
286,323
ActionCallback (@NotNull Object requestor) { return isReady() ? ActionCallback.DONE : addReadyCallback(requestor); }
getReady
286,324
ActionCallback (Object requestor) { synchronized (myReadyCallbacks) { ActionCallback cb = myReadyCallbacks.get(requestor); if (cb == null) { cb = new ActionCallback(); myReadyCallbacks.put(requestor, cb); } return cb; } }
addReadyCallback
286,325
int () { return ourDataKeyIndex.size(); }
allKeysCount
286,326
boolean (String dataId) { return myName.equals(dataId); }
is
286,327
String (T value) { return null; }
getCaptionAboveOf
286,328
String (T value) { return null; }
getTooltipFor
286,329
Icon (T value) { return null; }
getIconFor
286,330
boolean (T value) { return false; }
hasSeparatorAboveOf
286,331
void (@NotNull @Nls String fragment, @NotNull SimpleTextAttributes attributes) { myTexts.add(fragment); myCachedToString = null; myAttributes.add(attributes); }
append
286,332
void (int index, @NotNull @Nls String fragment, @NotNull SimpleTextAttributes attributes) { myTexts.add(index, fragment); myCachedToString = null; myAttributes.add(index, attributes); }
insert
286,333
void () { myTexts.clear(); myCachedToString = null; myAttributes.clear(); }
clear
286,334
void (@NotNull ColoredTextContainer component) { int size = myTexts.size(); for (int i = 0; i < size; i++) { String text = myTexts.get(i); SimpleTextAttributes attribute = myAttributes.get(i); component.append(text, attribute); } }
appendToComponent
286,335
ArrayList<SimpleTextAttributes> () { return myAttributes; }
getAttributes
286,336
SimpleColoredText (SimpleTextAttributes attributes, boolean override) { SimpleColoredText result = new SimpleColoredText(); for (int i = 0; i < myTexts.size(); i++) { SimpleTextAttributes overridden = override ? SimpleTextAttributes.merge(myAttributes.get(i), attributes) : SimpleTextAttributes.merge(attributes, myAttri...
derive
286,337
ColoredText () { if (myTexts.isEmpty()) { return ColoredText.empty(); } if (myTexts.size() == 1) { return ColoredText.singleFragment(myTexts.get(0), myAttributes.get(0)); } ColoredText.Builder builder = ColoredText.builder(); for (int i = 0; i < myTexts.size(); i++) { builder.append(myTexts.get(i), myAttributes.get(i))...
toColoredText
286,338
void (JTable table, boolean isSelected, boolean hasFocus, int row, int column) { clear(); mySelected = isSelected; myFont = table.getFont(); myForeground = getSelectionForeground(table, isSelected); myBackground = RenderingUtil.getBackground(table, isSelected); myCellBorder = getBorder(isSelected, hasFocus); }
collectState
286,339
Color (JTable table, boolean isSelected) { return RenderingUtil.getForeground(table, isSelected); }
getSelectionForeground
286,340
void (JComponent renderer) { renderer.setForeground(myForeground); renderer.setBackground(myBackground); renderer.setFont(myFont); renderer.setBorder(myCellBorder); }
updateRenderer
286,341
void () { mySelected = false; myForeground = null; myBackground = null; myFont = null; myCellBorder = null; }
clear
286,342
SimpleTextAttributes (SimpleTextAttributes attributes) { if (!mySelected) return attributes; return new SimpleTextAttributes(attributes.getStyle(), myForeground); }
modifyAttributes
286,343
Icon (boolean isDark) { return new RoundedIcon(IconLoader.getDarkIcon(mySourceIcon, isDark), myArcRatio, mySuperEllipse); }
getDarkIcon
286,344
void (Component c, Graphics graphics, int x, int y) { Graphics2D g = (Graphics2D)graphics.create(); try { g.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY); g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); g.setRenderingHin...
paintIcon
286,345
void (Graphics2D g, int x, int y, String s, double scale) { g.setFont(JBUI.Fonts.label().biggerOn(20)); Rectangle2D bounds = g.getFontMetrics().getStringBounds(s, g); g.setColor(Color.WHITE); float xx = (float)(getIconWidth() - bounds.getWidth()) / 2; float yy = (float)(getIconHeight() - bounds.getHeight()); for (int d...
printDebugMessage
286,346
Shape (double x, double y, double width, double height, double arcRatio) { if (width == height && arcRatio == 1.0) { return new Ellipse2D.Double(x, y, width, height); } GeneralPath path = new GeneralPath(); path.moveTo(1, 0); double step = Math.PI / 360; double n = getPower(arcRatio); for (double theta = step; theta <=...
getSuperEllipse
286,347
double (double arcRatio) { return 100d - 98d * Math.pow(arcRatio, .1);//1->2, 0->100 }
getPower
286,348
int () { return mySourceIcon.getIconWidth(); }
getIconWidth
286,349
int () { return mySourceIcon.getIconHeight(); }
getIconHeight
286,350
int () { return Objects.hash(mySourceIcon, myArcRatio); }
hashCode
286,351
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RoundedIcon icon = (RoundedIcon)o; return myArcRatio == icon.myArcRatio && mySourceIcon.equals(icon.mySourceIcon); }
equals
286,352
String () { return "RoundedIcon(" + mySourceIcon + ", r=" + myArcRatio + ")"; }
toString
286,353
Color () { return myFgColor; }
getFgColor
286,354
int () { return myStyle; }
getStyle
286,355
boolean () { return BitUtil.isSet(myStyle, STYLE_STRIKEOUT); }
isStrikeout
286,356
boolean () { return BitUtil.isSet(myStyle, STYLE_WAVED); }
isWaved
286,357
boolean () { return BitUtil.isSet(myStyle, STYLE_UNDERLINE); }
isUnderline
286,358
boolean () { return BitUtil.isSet(myStyle, STYLE_BOLD_DOTTED_LINE); }
isBoldDottedLine
286,359
boolean () { return BitUtil.isSet(myStyle, STYLE_SEARCH_MATCH); }
isSearchMatch
286,360
boolean () { return BitUtil.isSet(myStyle, STYLE_SMALLER); }
isSmaller
286,361
boolean () { return BitUtil.isSet(myStyle, STYLE_OPAQUE); }
isOpaque
286,362
boolean () { return BitUtil.isSet(myStyle, STYLE_CLICKABLE); }
isClickable
286,363
boolean () { return BitUtil.isSet(myStyle, STYLE_HOVERED); }
isHovered
286,364
boolean () { return BitUtil.isSet(myStyle, STYLE_NO_BORDER); }
isNoBorder
286,365
boolean () { return BitUtil.isSet(myStyle, STYLE_BOLD_UNDERLINE); }
isBoldUnderline
286,366
boolean () { return BitUtil.isSet(myStyle, STYLE_USE_EFFECT_COLOR); }
useEffectColor
286,367
SimpleTextAttributes (TextAttributes attributes) { if (attributes == null) return REGULAR_ATTRIBUTES; Color fgColor = attributes.getForegroundColor(); if (fgColor == null) fgColor = REGULAR_ATTRIBUTES.getFgColor(); Color bgColor = attributes.getBackgroundColor(); int style = attributes.getFontType(); if (attributes.get...
fromTextAttributes
286,368
int () { return myStyle & FONT_MASK; }
getFontStyle
286,369
TextAttributes () { Color effectColor; EffectType effectType; if (isWaved()) { effectColor = myWaveColor; effectType = EffectType.WAVE_UNDERSCORE; } else if (isStrikeout()) { effectColor = myWaveColor; effectType = EffectType.STRIKEOUT; } else if (isUnderline()) { effectColor = myWaveColor; effectType = EffectType.LINE...
toTextAttributes
286,370
SimpleTextAttributes (@StyleAttributeConstant int style, @Nullable Color fg, @Nullable Color bg, @Nullable Color wave) { return new SimpleTextAttributes(bg != null ? bg : getBgColor(), fg != null ? fg : getFgColor(), wave != null ? wave : getWaveColor(), style == -1 ? getStyle() : style); }
derive
286,371
SimpleTextAttributes (final SimpleTextAttributes weak, final SimpleTextAttributes strong) { final int style = strong.getStyle() | weak.getStyle(); final Color wave; if (!Comparing.equal(strong.getWaveColor(), REGULAR_ATTRIBUTES.getWaveColor())) { wave = strong.getWaveColor(); } else { wave = weak.getWaveColor(); } fina...
merge
286,372
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SimpleTextAttributes that = (SimpleTextAttributes)o; return myStyle == that.myStyle && Objects.equals(myBgColor, that.myBgColor) && Objects.equals(myFgColor, that.myFgColor) && Objects.equals(myWaveColor, that.my...
equals
286,373
int () { return Objects.hash(myBgColor, myFgColor, myWaveColor, myStyle); }
hashCode
286,374
String () { return "[" + myBgColor + ", " + myFgColor + ", " + myWaveColor + ", " + myStyle + "]"; }
toString
286,375
String ( JLabel label, FontMetrics fontMetrics, @NlsContexts.Label String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR) { String s = layoutCompoundLabel( label, fontMetrics, text, icon, label.getVerticalAlignment(), label.getHorizontalAlignment(), label.getVerticalTextPosition(), label.getHorizont...
layoutCL
286,376
String (JComponent c, FontMetrics fm, @NlsContexts.Label String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap) { boolean orientationIsLeftToRight = true; if (c != null) { if (!(c.g...
layoutCompoundLabel
286,377
String ( FontMetrics fm, @NlsContexts.Label String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap) { /* Initialize the icon bounds rectangle iconR. */ if (icon != null) { iconR.widt...
layoutCompoundLabel
286,378
void (JLabel l, Graphics g, String s, int textX, int textY) { int accChar = l.getDisplayedMnemonic(); g.setColor(l.getForeground()); BasicGraphicsUtils.drawString(g, s, accChar, textX, textY); }
paintEnabledText
286,379
void (JLabel l, Graphics g, String s, int textX, int textY) { int accChar = l.getDisplayedMnemonic(); g.setColor(l.getBackground()); BasicGraphicsUtils.drawString(g, s, accChar, textX, textY); }
paintDisabledText
286,380
TreeUIHelper () { return ApplicationManager.getApplication().getService(TreeUIHelper.class); }
getInstance
286,381
boolean (int row, int column) { return row == this.row && column == this.column; }
at
286,382
Icon (Icon icon) { return icon instanceof OffsetIcon ? ((OffsetIcon)icon).myIcon : icon; }
getOriginalIcon
286,383
OffsetIcon () { return new OffsetIcon(this); }
copy
286,384
Icon () { return myIcon; }
getIcon
286,385
int () { return myOffset; }
getOffset
286,386
int () { return myOffset + myIcon.hashCode(); }
hashCode
286,387
boolean (Object obj) { if (obj == this) return true; if (obj instanceof OffsetIcon icon) { return icon.myOffset == myOffset && Objects.equals(icon.myIcon, myIcon); } return false; }
equals
286,388
void (Component c, Graphics g, int x, int y) { getScaleContext().update(); if (myScaledIcon == null) { float scale = getScale(); myScaledIcon = scale == 1f ? myIcon : IconUtil.scale(myIcon, null, scale); } myScaledIcon.paintIcon(c, g, myScaledOffset + x, y); }
paintIcon
286,389
int () { getScaleContext().update(); return (int)ceil(scaleVal(myWidth, OBJ_SCALE)) + myScaledOffset; }
getIconWidth
286,390
int () { getScaleContext().update(); return (int)ceil(scaleVal(myHeight, OBJ_SCALE)); }
getIconHeight
286,391
void () { myWidth = myIcon.getIconWidth(); myHeight = myIcon.getIconHeight(); myScaledOffset = (int)ceil(scaleVal(myOffset)); }
updateSize
286,392
String () { return "OffsetIcon: offset=" + myOffset + "; icon=" + myIcon; }
toString
286,393
ColoredText () { return ColoredTextImpl.EMPTY; }
empty
286,394
ColoredText (@Nls @NotNull String fragmentText) { return singleFragment(fragmentText, SimpleTextAttributes.REGULAR_ATTRIBUTES); }
singleFragment
286,395
ColoredText (@Nls @NotNull String fragmentText, @NotNull SimpleTextAttributes attributes) { return new ColoredTextImpl(new ColoredTextFragmentImpl(fragmentText, attributes)); }
singleFragment
286,396
Builder () { return new ColoredTextBuilderImpl(); }
builder
286,397
SimpleTextAttributes () { return myAttributes; }
fragmentAttributes
286,398
String () { return myFragmentText; }
toString
286,399
String () { return myFragments.stream().map(Fragment::fragmentText).collect(Collectors.joining()); }
toString