Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
262,400
int () { return DEFAULT_SORT_WEIGHT; }
getSortWeight
262,401
int (final T o2) { return 0; }
compareUserObjects
262,402
int (@NotNull String name1, @NotNull String name2) { return FileNameComparator.INSTANCE.compare(name1, name2); }
compareFileNames
262,403
int (@NotNull FilePath path1, @NotNull FilePath path2) { return ChangesComparator.getFilePathComparator(true).compare(path1, path2); }
compareFilePaths
262,404
void (@NotNull ChangesBrowserNodeRenderer renderer, @Nullable FilePath parentPath) { if (parentPath != null) { String presentablePath = VcsUtil.getPresentablePath(renderer.getProject(), parentPath, true, true); if (presentablePath.isEmpty()) return; renderer.append(spaceAndThinSpace() + presentablePath, SimpleTextAttri...
appendParentPath
262,405
void (@NotNull ChangesBrowserNodeRenderer renderer, @Nullable VirtualFile parentPath) { if (parentPath != null) { String presentablePath = VcsUtil.getPresentablePath(renderer.getProject(), parentPath, true, true); if (presentablePath.isEmpty()) return; renderer.append(spaceAndThinSpace() + presentablePath, SimpleTextAt...
appendParentPath
262,406
void (@NotNull ChangesBrowserNodeRenderer renderer) { renderer.append((getCountText().isEmpty() ? spaceAndThinSpace() : ", ") + VcsBundle.message("changes.nodetitle.updating"), SimpleTextAttributes.GRAYED_ATTRIBUTES); }
appendUpdatingState
262,407
Color (@NotNull Project project) { return getBackgroundColorFor(project, getUserObject()); }
getBackgroundColor
262,408
Color (@NotNull Project project, @Nullable Object object) { VirtualFile file; if (object instanceof FilePath) { file = getScopeVirtualFileFor((FilePath)object); } else if (object instanceof Change) { file = getScopeVirtualFileFor(ChangesUtil.getFilePath((Change)object)); } else { file = ObjectUtils.tryCast(object, Virt...
getBackgroundColorFor
262,409
VirtualFile (@NotNull FilePath filePath) { if (filePath.isNonLocal()) return null; return VcsImplUtil.findValidParentAccurately(filePath); }
getScopeVirtualFileFor
262,410
boolean () { return true; }
shouldExpandByDefault
262,411
String () { return myValue; }
toString
262,412
Tag (@Nullable Object object) { if (object == null) return null; if (object instanceof Tag) return (Tag)object; return new WrapperTag(object); }
wrap
262,413
String () { return value.toString(); //NON-NLS }
toString
262,414
String () { return VcsBundle.message(myKey); }
toString
262,415
T () { return value; }
getValue
262,416
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ValueTag<?> tag = (ValueTag<?>)o; return Objects.equals(value, tag.value); }
equals
262,417
int () { return Objects.hash(value); }
hashCode
262,418
boolean () { return !isDirectory(); }
isFile
262,419
boolean () { return getUserObject().getPath().isDirectory(); }
isDirectory
262,420
void (@NotNull ChangesBrowserNodeRenderer renderer, boolean selected, boolean expanded, boolean hasFocus) { // todo would be good to have render code in one place FilePath filePath = getUserObject().getPath(); renderer.appendFileName(filePath.getVirtualFile(), filePath.getName(), FileStatus.NOT_CHANGED.getColor()); if ...
render
262,421
String () { return getUserObject().getDescription(); }
getTooltip
262,422
void (@NotNull PluginDescriptor pluginDescriptor) { myPluginDescriptor = pluginDescriptor; }
setPluginDescriptor
262,423
String () { return tabName; }
getTabName
262,424
void (final String tabName) { this.tabName = tabName; }
setTabName
262,425
String () { return className; }
getClassName
262,426
void (final String className) { this.className = className; }
setClassName
262,427
String () { return preloaderClassName; }
getPreloaderClassName
262,428
void (final String preloaderClassName) { this.preloaderClassName = preloaderClassName; }
setPreloaderClassName
262,429
String () { return displayNameSupplierClassName; }
getDisplayNameSupplierClassName
262,430
void (String displayNameSupplierClassName) { this.displayNameSupplierClassName = displayNameSupplierClassName; }
setDisplayNameSupplierClassName
262,431
boolean () { return isInCommitToolWindow; }
isInCommitToolWindow
262,432
void (boolean isInCommitToolWindow) { this.isInCommitToolWindow = isInCommitToolWindow; }
setInCommitToolWindow
262,433
ChangesViewContentProvider (@NotNull Project project) { if (myInstance == null) { myInstance = (ChangesViewContentProvider)newClassInstance(project, className); } return myInstance; }
getInstance
262,434
ChangesViewContentProvider () { return myInstance; }
getCachedInstance
262,435
boolean () { return !getUserObject().isDirectory(); }
isFile
262,436
boolean () { if (getUserObject().isDirectory()) { return isLeaf() || getFileStatus() != FileStatus.NOT_CHANGED; } return false; }
isDirectory
262,437
void (@NotNull final ChangesBrowserNodeRenderer renderer, final boolean selected, final boolean expanded, final boolean hasFocus) { final VirtualFile file = getUserObject(); try (AccessToken ignore = SlowOperations.knownIssue("IDEA-322065, EA-857522")) { FileStatus fileStatus = getFileStatus(); renderer.appendFileName(...
render
262,438
String () { return getUserObject().getName(); }
getTextPresentation
262,439
String () { return getUserObject().getPresentableUrl(); }
toString
262,440
int () { return VIRTUAL_FILE_SORT_WEIGHT; }
getSortWeight
262,441
int (ChangesBrowserFileNode o) { return compareFileNames(myName, o.myName); }
compareTo
262,442
FileStatus () { if (myProject == null || myProject.isDisposed()) return FileStatus.NOT_CHANGED; return ChangeListManager.getInstance(myProject).getStatus(getUserObject()); }
getFileStatus
262,443
AnAction (@NotNull Consumer<? super Integer> onSelected, int defaultSelection) { return createGoToChangeAction(getRequests(), onSelected, defaultSelection); }
createGoToChangeAction
262,444
AnAction (@NotNull List<? extends Producer> producers, @NotNull Consumer<? super Integer> onSelected, int defaultSelection) { return new PresentableGoToChangePopupAction<ProducerWrapper>() { @Override protected @NotNull ListSelection<? extends ProducerWrapper> getChanges() { List<ProducerWrapper> wrappers = new ArrayLi...
createGoToChangeAction
262,445
PresentableChange (@NotNull ProducerWrapper change) { return change.producer; }
getPresentation
262,446
void (@NotNull ProducerWrapper change) { onSelected.consume(change.index); }
onSelected
262,447
AnAction (@NotNull Consumer<? super Integer> onSelected, int defaultSelection) { List<? extends DiffRequestProducer> requests = getRequests(); // may contain other producers with intermediate MessageDiffRequest List<Producer> producers = ContainerUtil.map(requests, it -> ObjectUtils.tryCast(it, Producer.class)); if (!C...
createGoToChangeAction
262,448
void () { if (!isLargeModel()) return; int fixedRowHeight = UIManager.getInt(JBUI.CurrentTheme.Tree.rowHeightKey()); if (fixedRowHeight > 0) return; // leave hardcoded value from BasicTreeUI.installDefaults TreeCellRenderer renderer = getCellRenderer(); if (renderer == null) return; ChangesBrowserNode<?> sampleNode = n...
updateFixedRowHeight
262,449
void (TreeUI ui) { super.setUI(ui); updateFixedRowHeight(); }
setUI
262,450
void () { ClickListener handler = new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent event, int clickCount) { TreePath path = getPathIfCheckBoxClicked(event.getPoint()); if (path != null) { setSelectionPath(path); List<Object> selected = getIncludableUserObjects(selected(ChangesTree.this)); bool...
installCheckBoxClickHandler
262,451
boolean (@NotNull MouseEvent event, int clickCount) { TreePath path = getPathIfCheckBoxClicked(event.getPoint()); if (path != null) { setSelectionPath(path); List<Object> selected = getIncludableUserObjects(selected(ChangesTree.this)); boolean exclude = toggleChanges(selected); logInclusionToggleEvents(exclude, event);...
onClick
262,452
void (@NotNull ChangesBrowserNodeRenderer nodeRenderer) { new TreeLinkMouseListener(nodeRenderer) { @Override protected int getRendererRelativeX(@NotNull MouseEvent e, @NotNull JTree tree, @NotNull TreePath path) { int x = super.getRendererRelativeX(e, tree, path); if (myShowCheckboxes && isIncludable(path)) { x -= myC...
installTreeLinkHandler
262,453
int (@NotNull MouseEvent e, @NotNull JTree tree, @NotNull TreePath path) { int x = super.getRendererRelativeX(e, tree, path); if (myShowCheckboxes && isIncludable(path)) { x -= myCheckboxWidth; } return x; }
getRendererRelativeX
262,454
void (MouseEvent e) { if (!isEmpty()) { // apply only if tree is not empty - otherwise "getEmptyText()" should handle the case super.mouseMoved(e); } }
mouseMoved
262,455
ChangesGroupingSupport () { ChangesGroupingSupport result = new ChangesGroupingSupport(myProject, this, false); migrateShowFlattenSetting(); installGroupingSupport(this, result, GROUPING_KEYS, DEFAULT_GROUPING_KEYS); return result; }
installGroupingSupport
262,456
void (@NotNull ChangesTree tree, @NotNull ChangesGroupingSupport groupingSupport, @NotNull @NonNls String propertyName, @NonNls List<String> defaultGroupingKeys) { installGroupingSupport(tree, groupingSupport, () -> { List<String> storedList = PropertiesComponent.getInstance(tree.getProject()).getList(propertyName); re...
installGroupingSupport
262,457
void (@NotNull ChangesTree tree, @NotNull ChangesGroupingSupport groupingSupport, @NotNull Supplier<? extends Collection<String>> settingsGetter, @NotNull Consumer<? super Collection<String>> settingsSetter) { installGroupingSupport(groupingSupport, settingsGetter, settingsSetter, () -> tree.onGroupingChanged()); }
installGroupingSupport
262,458
void (@NotNull ChangesGroupingSupport groupingSupport, @NotNull Supplier<? extends Collection<String>> settingsGetter, @NotNull Consumer<? super Collection<String>> settingsSetter, @NotNull Runnable refresh) { groupingSupport.setGroupingKeysOrSkip(settingsGetter.get()); groupingSupport.addPropertyChangeListener(e -> { ...
installGroupingSupport
262,459
void () { PropertiesComponent properties = PropertiesComponent.getInstance(myProject); if (properties.isValueSet(FLATTEN_OPTION_KEY)) { properties.setList(GROUPING_KEYS, properties.isTrueValue(FLATTEN_OPTION_KEY) ? Collections.emptyList() : DEFAULT_GROUPING_KEYS); properties.unsetValue(FLATTEN_OPTION_KEY); } }
migrateShowFlattenSetting
262,460
void (@Nls @NotNull String emptyText) { getEmptyText().setText(emptyText); }
setEmptyText
262,461
void (@NotNull Runnable runnable) { addSelectionListener(runnable, null); }
addSelectionListener
262,462
void (@NotNull Runnable runnable, @Nullable Disposable parent) { TreeSelectionListener listener = new TreeSelectionListener() { @Override public void valueChanged(TreeSelectionEvent e) { runnable.run(); } }; addTreeSelectionListener(listener); if (parent != null) Disposer.register(parent, () -> removeTreeSelectionListe...
addSelectionListener
262,463
void (TreeSelectionEvent e) { runnable.run(); }
valueChanged
262,464
void (@NotNull Runnable handler) { setDoubleClickHandler(e -> { handler.run(); return true; }); setEnterKeyHandler(e -> { handler.run(); return true; }); }
setDoubleClickAndEnterKeyHandler
262,465
void (@Nullable Processor<? super MouseEvent> handler) { myHandlers.setDoubleClickHandler(handler); }
setDoubleClickHandler
262,466
void (@Nullable Processor<? super KeyEvent> handler) { myHandlers.setEnterKeyHandler(handler); }
setEnterKeyHandler
262,467
void (ActionGroup group) { PopupHandler.installPopupMenu(this, group, "ChangesTreePopup"); }
installPopupHandler
262,468
JComponent () { return this; }
getPreferredFocusedComponent
262,469
void (@NotNull PropertyChangeListener listener) { myGroupingSupport.addPropertyChangeListener(listener); }
addGroupingChangeListener
262,470
void (@NotNull PropertyChangeListener listener) { myGroupingSupport.removePropertyChangeListener(listener); }
removeGroupingChangeListener
262,471
ChangesGroupingSupport () { return myGroupingSupport; }
getGroupingSupport
262,472
ChangesGroupingPolicyFactory () { return getGroupingSupport().getGrouping(); }
getGrouping
262,473
Project () { return myProject; }
getProject
262,474
boolean () { return !myGroupingSupport.isDirectory(); }
isShowFlatten
262,475
boolean () { return myShowCheckboxes; }
isShowCheckboxes
262,476
void (boolean value) { boolean oldValue = myShowCheckboxes; myShowCheckboxes = value; if (oldValue != value) { updateFixedRowHeight(); repaint(); } }
setShowCheckboxes
262,477
boolean () { return myHighlightProblems; }
isHighlightProblems
262,478
boolean () { boolean isFlat = true; Enumeration enumeration = getRoot().depthFirstEnumeration(); while (isFlat && enumeration.hasMoreElements()) { isFlat = ((ChangesBrowserNode<?>)enumeration.nextElement()).getLevel() <= 1; } return isFlat; }
isCurrentModelFlat
262,479
void () { rebuildTree(KEEP_SELECTED_OBJECTS); }
onGroupingChanged
262,480
void (@NotNull TreeStateStrategy<?> treeStateStrategy) { TreeStateStrategy<?> oldTreeStateStrategy = myTreeStateStrategy; myTreeStateStrategy = treeStateStrategy; try { rebuildTree(); } finally { myTreeStateStrategy = oldTreeStateStrategy; } }
rebuildTree
262,481
void (@NotNull DefaultTreeModel model) { updateTreeModel(model, myTreeStateStrategy); }
updateTreeModel
262,482
boolean () { return myModelUpdateInProgress; }
isModelUpdateInProgress
262,483
void () { // expanding lots of nodes is a slow operation (and result is not very useful) if (TreeUtil.hasManyNodes(this, EXPAND_NODES_THRESHOLD)) { TreeUtil.collapseAll(this, 1); return; } expandDefaults(); int selectedTreeRow = -1; if (myShowCheckboxes) { if (!getIncludedSet().isEmpty()) { ChangesBrowserNode root = ge...
resetTreeState
262,484
void (@Nullable VirtualFile toSelect) { if (toSelect == null) return; selectFile(VcsUtil.getFilePath(toSelect)); }
selectFile
262,485
void (@Nullable FilePath toSelect) { if (toSelect == null) return; int rowInTree = findRowContainingFile(getRoot(), toSelect); if (rowInTree == -1) return; setSelectionRow(rowInTree); TreeUtil.showRowCentered(this, rowInTree, false); }
selectFile
262,486
int (@NotNull TreeNode root, @NotNull FilePath toSelect) { TreeNode targetNode = TreeUtil.treeNodeTraverser(root).traverse(TreeTraversal.POST_ORDER_DFS).find(node -> { if (node instanceof DefaultMutableTreeNode) { Object userObject = ((DefaultMutableTreeNode)node).getUserObject(); if (userObject instanceof Change) { re...
findRowContainingFile
262,487
boolean (@NotNull Change change, @NotNull FilePath toSelect) { return toSelect.equals(ChangesUtil.getAfterPath(change)) || toSelect.equals(ChangesUtil.getBeforePath(change)); }
matches
262,488
InclusionModel () { if (!ApplicationManager.getApplication().isDispatchThread()) { LOG.error(new Throwable("Access is allowed from Event Dispatch Thread (EDT) only")); } return myInclusionModel; }
getInclusionModel
262,489
void (@Nullable InclusionModel inclusionModel) { myInclusionModel.removeInclusionListener(myInclusionModelListener); myInclusionModel = inclusionModel != null ? inclusionModel : NullInclusionModel.INSTANCE; myInclusionModel.addInclusionListener(myInclusionModelListener); }
setInclusionModel
262,490
void (@Nullable Runnable runnable) { myTreeInclusionListener = runnable; }
setInclusionListener
262,491
void () { if (myTreeInclusionListener != null) myTreeInclusionListener.run(); }
notifyInclusionListener
262,492
void (@NotNull Collection<?> changes) { getInclusionModel().setInclusion(changes); }
setIncludedChanges
262,493
void (@NotNull Object change) { includeChanges(Collections.singleton(change)); }
includeChange
262,494
void (@NotNull Collection<?> changes) { getInclusionModel().addInclusion(changes); }
includeChanges
262,495
void (@NotNull Object change) { excludeChanges(Collections.singleton(change)); }
excludeChange
262,496
void (@NotNull Collection<?> changes) { getInclusionModel().removeInclusion(changes); }
excludeChanges
262,497
boolean (@NotNull Collection<?> changes) { boolean hasExcluded = false; for (Object item : changes) { if (getInclusionModel().getInclusionState(item) != State.SELECTED) { hasExcluded = true; break; } } if (hasExcluded) { includeChanges(changes); return false; } else { excludeChanges(changes); return true; } }
toggleChanges
262,498
boolean (@NotNull Object change) { return getInclusionModel().getInclusionState(change) != State.NOT_SELECTED; }
isIncluded
262,499
Set<Object> () { return getInclusionModel().getInclusion(); }
getIncludedSet