Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
262,000
String () { return "VCS.ChangelistChooser"; }
getDimensionServiceKey
262,001
void () { mySelectedList = myPanel.getSelectedList(myProject); if (mySelectedList != null) { super.doOKAction(); } }
doOKAction
262,002
LocalChangeList () { return mySelectedList; }
getSelectedList
262,003
JComponent () { return myPanel; }
createCenterPanel
262,004
DefaultTreeModel () { return TreeModelBuilder.buildFromChanges(myProject, getGrouping(), myChanges, myChangeNodeDecorator); }
buildTreeModel
262,005
void (@NotNull Collection<? extends Change> changes) { myChanges.clear(); myChanges.addAll(changes); myViewer.rebuildTree(); }
setChangesToDisplay
262,006
void (@Nullable ChangeNodeDecorator value) { myChangeNodeDecorator = value; myViewer.rebuildTree(); }
setChangeNodeDecorator
262,007
void (@NotNull Collection<? extends Change> changes) { myViewer.setIncludedChanges(changes); }
setIncludedChanges
262,008
List<Change> () { return VcsTreeModelData.all(myViewer).userObjects(Change.class); }
getAllChanges
262,009
List<Change> () { return VcsTreeModelData.selected(myViewer).userObjects(Change.class); }
getSelectedChanges
262,010
List<Change> () { return VcsTreeModelData.included(myViewer).userObjects(Change.class); }
getIncludedChanges
262,011
Project () { return myProject; }
getProject
262,012
boolean () { return myShowFlatten.get(); }
isShowFlatten
262,013
void (@NotNull JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { ChangesBrowserNode<?> node = (ChangesBrowserNode<?>)value; node.render(this, selected, expanded, hasFocus); SpeedSearchUtil.applySpeedSearchHighlighting(tree, this, true, selected); }
customizeCellRenderer
262,014
void (@Nullable VirtualFile vFile, @NotNull @NlsSafe String fileName, Color color) { ChangesFileNameDecorator decorator = myProject != null && !myProject.isDefault() && !myProject.isDisposed() ? ChangesFileNameDecorator.getInstance(myProject) : null; if (decorator != null) { decorator.appendFileName(this, vFile, fileNa...
appendFileName
262,015
void () { setBackgroundInsets(null); setToolTipText(null); super.clear(); }
clear
262,016
void (@NotNull Graphics2D g, int index, @NotNull Color bgColor, int x, int y, int width, int height) { if (myBackgroundInsets != null) { g.setColor(bgColor); g.fillRect(x + myBackgroundInsets.left, y + myBackgroundInsets.top, width - myBackgroundInsets.width(), height - myBackgroundInsets.height()); } else { super.doPa...
doPaintFragmentBackground
262,017
void (@NotNull @Nls String text, @NotNull SimpleTextAttributes baseStyle) { if (myIssueLinkRenderer != null) { myIssueLinkRenderer.appendTextWithLinks(text, baseStyle); } else { append(text, baseStyle); } }
appendTextWithIssueLinks
262,018
void (@NotNull FilePath filePath, boolean isDirectory) { if (isDirectory) { setIcon(PlatformIcons.FOLDER_ICON); return; } Icon icon = FilePathIconProvider.EP_NAME.computeSafeIfAny(provider -> provider.getIcon(filePath, myProject)); if (icon != null) { setIcon(icon); return; } setIcon(VcsUtil.getIcon(myProject, filePath...
setIcon
262,019
void (@Nullable JBInsets backgroundInsets) { myBackgroundInsets = backgroundInsets; }
setBackgroundInsets
262,020
boolean () { return myHighlightProblems; }
isShowingLocalChanges
262,021
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
262,022
boolean (@NotNull DataContext dataContext) { return myTree.getSelectionPaths() != null; }
isCopyEnabled
262,023
boolean (@NotNull DataContext dataContext) { return true; }
isCopyVisible
262,024
void (@NotNull DataContext dataContext) { List<TreePath> paths = ContainerUtil.sorted(Arrays.asList(Objects.requireNonNull(myTree.getSelectionPaths())), TreeUtil.getDisplayOrderComparator(myTree)); CopyPasteManager.getInstance().setContents(new StringSelection(StringUtil.join(paths, path -> { Object node = path.getLast...
performCopy
262,025
VirtualFileHierarchicalComparator () { return ourInstance; }
getInstance
262,026
int (@NotNull VirtualFile vf1, @NotNull VirtualFile vf2) { boolean isDir1 = vf1.isDirectory(); boolean isDir2 = vf2.isDirectory(); if (!isDir1 && !isDir2) return 0; if (isDir1 && !isDir2) return -1; if (!isDir1) return 1; return Integer.compare(vf1.getPath().length(), vf2.getPath().length()); }
compare
262,027
AsyncChangesTreeModel () { return SimpleAsyncChangesTreeModel.create(grouping -> { return TreeModelBuilder.buildFromChanges(myProject, grouping, myChanges, myChangeNodeDecorator); }); }
getChangesTreeModel
262,028
void (@NotNull Collection<? extends Change> changes) { myChanges = new ArrayList<>(changes); myViewer.rebuildTree(); }
setChangesToDisplay
262,029
void (@NotNull Collection<? extends Change> changes, @NotNull ChangesTree.TreeStateStrategy<?> treeStateStrategy) { myChanges = new ArrayList<>(changes); myViewer.rebuildTree(treeStateStrategy); }
setChangesToDisplay
262,030
void (@Nullable ChangeNodeDecorator value) { myChangeNodeDecorator = value; myViewer.rebuildTree(); }
setChangeNodeDecorator
262,031
void (@NotNull Collection<? extends Change> changes) { myViewer.setIncludedChanges(changes); }
setIncludedChanges
262,032
List<Change> () { return VcsTreeModelData.all(myViewer).userObjects(Change.class); }
getAllChanges
262,033
List<Change> () { return VcsTreeModelData.selected(myViewer).userObjects(Change.class); }
getSelectedChanges
262,034
List<Change> () { return VcsTreeModelData.included(myViewer).userObjects(Change.class); }
getIncludedChanges
262,035
void (@NotNull ChangesBrowserNodeRenderer renderer, boolean selected, boolean expanded, boolean hasFocus) { renderer.append(getTextPresentation(), myAttributes); appendCount(renderer); }
render
262,036
void () { }
dispose
262,037
ChangesBrowserModuleNode (@NotNull Module module) { FilePath moduleRoot = getModuleRootFilePath(module); if (moduleRoot == null) return null; return new ChangesBrowserModuleNode(module, moduleRoot); }
create
262,038
void (@NotNull final ChangesBrowserNodeRenderer renderer, final boolean selected, final boolean expanded, final boolean hasFocus) { final Module module = (Module)userObject; renderer.append(module.isDisposed() ? "" : module.getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES); appendCount(renderer); appendParentPath(ren...
render
262,039
FilePath () { return myModuleRoot; }
getModuleRoot
262,040
FilePath () { return getModuleRoot(); }
getNodeFilePath
262,041
String () { return getUserObject().getName(); }
getTextPresentation
262,042
int () { return MODULE_SORT_WEIGHT; }
getSortWeight
262,043
int (final Module o2) { return compareFileNames(getUserObject().getName(), o2.getName()); }
compareUserObjects
262,044
FilePath (@NotNull Module module) { return ReadAction.compute(() -> { if (module.isDisposed()) return null; VirtualFile[] roots = ModuleRootManager.getInstance(module).getContentRoots(); if (roots.length == 1) { return VcsUtil.getFilePath(roots[0]); } return VcsUtil.getFilePath(ModuleUtilCore.getModuleDirPath(module), ...
getModuleRootFilePath
262,045
DefaultTreeModel () { return new ChangesTreeModel(ChangesBrowserNode.createRoot()); }
buildEmpty
262,046
DefaultTreeModel (@Nullable Project project, @NotNull ChangesGroupingPolicyFactory grouping, @NotNull Collection<? extends Change> changes, @Nullable ChangeNodeDecorator changeNodeDecorator) { return new TreeModelBuilder(project, grouping) .setChanges(changes, changeNodeDecorator) .build(); }
buildFromChanges
262,047
DefaultTreeModel (@Nullable Project project, @NotNull ChangesGroupingPolicyFactory grouping, @NotNull Collection<? extends FilePath> filePaths) { return new TreeModelBuilder(project, grouping) .setFilePaths(filePaths) .build(); }
buildFromFilePaths
262,048
DefaultTreeModel (@NotNull Project project, @NotNull ChangesGroupingPolicyFactory grouping, @NotNull Collection<? extends ChangeList> changeLists) { return buildFromChangeLists(project, grouping, changeLists, false); }
buildFromChangeLists
262,049
DefaultTreeModel (@NotNull Project project, @NotNull ChangesGroupingPolicyFactory grouping, @NotNull Collection<? extends ChangeList> changeLists, boolean skipSingleDefaultChangelist) { return new TreeModelBuilder(project, grouping) .setChangeLists(changeLists, skipSingleDefaultChangelist, null) .build(); }
buildFromChangeLists
262,050
DefaultTreeModel (@Nullable Project project, @NotNull ChangesGroupingPolicyFactory grouping, @NotNull Collection<? extends VirtualFile> virtualFiles) { return new TreeModelBuilder(project, grouping) .setVirtualFiles(virtualFiles, null) .build(); }
buildFromVirtualFiles
262,051
TreeModelBuilder (@NotNull Collection<? extends Change> changes, @Nullable ChangeNodeDecorator changeNodeDecorator) { return setChanges(changes, changeNodeDecorator, null); }
setChanges
262,052
TreeModelBuilder (@NotNull Collection<? extends Change> changes, @Nullable ChangeNodeDecorator changeNodeDecorator, @Nullable ChangesBrowserNode.Tag tag) { insertChanges(changes, createTagNode(tag), changeNodeDecorator); return this; }
setChanges
262,053
void (@NotNull Collection<? extends Change> changes, @NotNull ChangesBrowserNode<?> subtreeRoot) { insertChanges(changes, subtreeRoot, null); }
insertChanges
262,054
void (@NotNull Collection<? extends Change> changes, @NotNull ChangesBrowserNode<?> subtreeRoot, @Nullable ChangeNodeDecorator changeNodeDecorator) { for (Change change : sorted(changes, CHANGE_COMPARATOR)) { insertChangeNode(change, subtreeRoot, createChangeNode(change, changeNodeDecorator)); } }
insertChanges
262,055
TreeModelBuilder (@Nullable List<? extends FilePath> unversionedFiles) { assert myProject != null; if (ContainerUtil.isEmpty(unversionedFiles)) return this; ChangesBrowserUnversionedFilesNode node = new ChangesBrowserUnversionedFilesNode(myProject, unversionedFiles); return insertSpecificFilePathNodeToModel(unversioned...
setUnversioned
262,056
TreeModelBuilder (@Nullable List<? extends FilePath> ignoredFiles) { assert myProject != null; if (ContainerUtil.isEmpty(ignoredFiles)) return this; ChangesBrowserIgnoredFilesNode node = new ChangesBrowserIgnoredFilesNode(myProject, ignoredFiles); return insertSpecificFilePathNodeToModel(ignoredFiles, node, FileStatus....
setIgnored
262,057
TreeModelBuilder (@NotNull List<? extends FilePath> specificFiles, @NotNull ChangesBrowserSpecificFilePathsNode<?> node, @NotNull FileStatus status) { insertSubtreeRoot(node); if (!node.isManyFiles()) { node.markAsHelperNode(); insertLocalFilePathIntoNode(specificFiles, node, status); } return this; }
insertSpecificFilePathNodeToModel
262,058
TreeModelBuilder (@NotNull Collection<? extends ChangeList> changeLists, boolean skipSingleDefaultChangeList, @Nullable Function<? super ChangeNodeDecorator, ? extends ChangeNodeDecorator> changeDecoratorProvider) { assert myProject != null; final RemoteRevisionsCache revisionsCache = RemoteRevisionsCache.getInstance(m...
setChangeLists
262,059
boolean (Collection<? extends ChangeList> lists) { if (lists.size() != 1) return false; ChangeList single = lists.iterator().next(); if (!(single instanceof LocalChangeList)) return false; return ((LocalChangeList)single).isBlank(); }
isSingleBlankChangeList
262,060
TreeModelBuilder (@Nullable List<? extends VirtualFile> lockedFolders) { assert myProject != null; if (ContainerUtil.isEmpty(lockedFolders)) return this; insertFilesIntoNode(lockedFolders, createLockedFolders(myProject)); return this; }
setLockedFolders
262,061
TreeModelBuilder (@NotNull List<? extends VirtualFile> modifiedWithoutEditing) { return setVirtualFiles(modifiedWithoutEditing, ChangesBrowserNode.MODIFIED_WITHOUT_EDITING_TAG); }
setModifiedWithoutEditing
262,062
TreeModelBuilder (@Nullable Collection<? extends VirtualFile> files, @Nullable ChangesBrowserNode.Tag tag) { if (ContainerUtil.isEmpty(files)) return this; insertFilesIntoNode(files, createTagNode(tag)); return this; }
setVirtualFiles
262,063
void (@NotNull Collection<? extends VirtualFile> files, @NotNull ChangesBrowserNode<?> subtreeRoot) { List<VirtualFile> sortedFiles = sorted(files, FILE_COMPARATOR); for (VirtualFile file : sortedFiles) { insertChangeNode(file, subtreeRoot, ChangesBrowserNode.createFile(myProject, file)); } }
insertFilesIntoNode
262,064
void (@NotNull Collection<? extends FilePath> files, @NotNull ChangesBrowserNode<?> subtreeRoot, @NotNull FileStatus status) { List<FilePath> sortedFilePaths = sorted(files, PATH_COMPARATOR); for (FilePath filePath : sortedFilePaths) { insertChangeNode(filePath, subtreeRoot, ChangesBrowserNode.createFilePath(filePath, ...
insertLocalFilePathIntoNode
262,065
TreeModelBuilder (@Nullable Collection<? extends LocallyDeletedChange> locallyDeletedChanges) { if (ContainerUtil.isEmpty(locallyDeletedChanges)) return this; ChangesBrowserNode<?> subtreeRoot = createTagNode(ChangesBrowserNode.LOCALLY_DELETED_NODE_TAG); for (LocallyDeletedChange change : sorted(locallyDeletedChanges, ...
setLocallyDeletedPaths
262,066
TreeModelBuilder (@NotNull Collection<? extends FilePath> filePaths) { return setFilePaths(filePaths, myRoot); }
setFilePaths
262,067
TreeModelBuilder (@NotNull Collection<? extends FilePath> filePaths, @NotNull ChangesBrowserNode<?> subtreeRoot) { for (FilePath file : sorted(filePaths, PATH_COMPARATOR)) { assert file != null; insertChangeNode(file, subtreeRoot, ChangesBrowserNode.createFilePath(file)); } return this; }
setFilePaths
262,068
TreeModelBuilder (@Nullable Map<VirtualFile, @NlsSafe String> switchedRoots) { if (ContainerUtil.isEmpty(switchedRoots)) return this; ChangesBrowserNode<?> rootsHeadNode = createTagNode(ChangesBrowserNode.SWITCHED_ROOTS_TAG, SimpleTextAttributes.GRAYED_BOLD_ATTRIBUTES, true); List<VirtualFile> files = sorted(switchedRo...
setSwitchedRoots
262,069
void (@NotNull Change change1, @NotNull SimpleColoredComponent component, boolean isShowFlatten) { }
decorate
262,070
void (@NotNull Change change1, @NotNull ChangesBrowserNodeRenderer renderer, boolean showFlatten) { renderer.append("[" + branchName + "] ", SimpleTextAttributes.GRAYED_BOLD_ATTRIBUTES); }
preDecorate
262,071
TreeModelBuilder (@NotNull MultiMap<@NlsSafe String, VirtualFile> switchedFiles) { if (switchedFiles.isEmpty()) return this; ChangesBrowserNode<?> subtreeRoot = createTagNode(ChangesBrowserNode.SWITCHED_FILES_TAG); for (@Nls String branchName : switchedFiles.keySet()) { List<VirtualFile> switchedFileList = sorted(switc...
setSwitchedFiles
262,072
TreeModelBuilder (@Nullable Map<VirtualFile, LogicalLock> logicallyLockedFiles) { if (ContainerUtil.isEmpty(logicallyLockedFiles)) return this; ChangesBrowserNode<?> subtreeRoot = createTagNode(ChangesBrowserNode.LOGICALLY_LOCKED_TAG); List<VirtualFile> keys = sorted(logicallyLockedFiles.keySet(), FILE_COMPARATOR); for...
setLogicallyLockedFiles
262,073
TreeModelBuilder (@NotNull ChangesBrowserNode<?> node) { insertSubtreeRoot(node, myRoot); return this; }
insertSubtreeRoot
262,074
TreeModelBuilder (@NotNull ChangesBrowserNode<?> node, @NotNull ChangesBrowserNode<?> subtreeRoot) { myModel.insertNodeInto(node, subtreeRoot, subtreeRoot.getChildCount()); return this; }
insertSubtreeRoot
262,075
void (@NotNull Object nodePath, @NotNull ChangesBrowserNode<?> subtreeRoot, @NotNull ChangesBrowserNode<?> node) { @NotNull StaticFilePath result; if (nodePath instanceof Change) { result = staticFrom((Change)nodePath); } else if (nodePath instanceof VirtualFile) { result = staticFrom((VirtualFile)nodePath); } else if ...
insertChangeNode
262,076
void (@NotNull FilePath nodePath, @NotNull ChangesBrowserNode<?> subtreeRoot, @NotNull ChangesBrowserNode<?> node) { insertChangeNode(staticFrom(nodePath), subtreeRoot, node); }
insertChangeNode
262,077
void (@NotNull VirtualFile nodePath, @NotNull ChangesBrowserNode<?> subtreeRoot, @NotNull ChangesBrowserNode<?> node) { insertChangeNode(staticFrom(nodePath), subtreeRoot, node); }
insertChangeNode
262,078
void (@NotNull Change nodePath, @NotNull ChangesBrowserNode<?> subtreeRoot, @NotNull ChangesBrowserNode<?> node) { insertChangeNode(staticFrom(nodePath), subtreeRoot, node); }
insertChangeNode
262,079
void (@NotNull StaticFilePath pathKey, @NotNull ChangesBrowserNode<?> subtreeRoot, @NotNull ChangesBrowserNode<?> node) { insertChangeNode(pathKey, subtreeRoot, node, TreeModelBuilder::createPathNode); }
insertChangeNode
262,080
void (@NotNull StaticFilePath pathKey, @NotNull ChangesBrowserNode<?> subtreeRoot, @NotNull ChangesBrowserNode<?> node, @NotNull Function<StaticFilePath, ChangesBrowserNode<?>> nodeBuilder) { ProgressManager.checkCanceled(); PATH_NODE_BUILDER.set(subtreeRoot, nodeBuilder); if (!GROUPING_POLICY.isIn(subtreeRoot)) { Chan...
insertChangeNode
262,081
DefaultTreeModel () { return build(false); }
build
262,082
DefaultTreeModel (boolean forcePrepareCaches) { TreeUtil.sort(myModel, BROWSER_NODE_COMPARATOR); collapseDirectories(myModel, myRoot); if (myProject != null && !ApplicationManager.getApplication().isDispatchThread()) { // Pre-fill background colors for small trees to reduce blinking if (!TreeUtil.hasManyNodes(myRoot, 1...
build
262,083
void (@NotNull Project project, @NotNull ChangesBrowserNode<?> root) { root.traverse().forEach(node -> { node.cacheBackgroundColor(project); // Allow to interrupt read lock ProgressManager.checkCanceled(); }); }
precalculateFileColors
262,084
void (@NotNull DefaultTreeModel model, @NotNull ChangesBrowserNode<?> node) { ChangesBrowserNode<?> collapsedNode = node; while (collapsedNode.getChildCount() == 1) { ChangesBrowserNode<?> child = (ChangesBrowserNode<?>)collapsedNode.getChildAt(0); ChangesBrowserNode<?> collapsed = collapseParentWithOnlyChild(collapsed...
collapseDirectories
262,085
StaticFilePath (@NotNull FilePath fp) { return new StaticFilePath(fp.isDirectory(), fp.getPath()); }
staticFrom
262,086
StaticFilePath (@NotNull VirtualFile vf) { return new StaticFilePath(vf.isDirectory(), vf.getPath()); }
staticFrom
262,087
StaticFilePath (@NotNull Change change) { return staticFrom(ChangesUtil.getFilePath(change)); }
staticFrom
262,088
FilePath (@NotNull Object o) { if (o instanceof Change) { return ChangesUtil.getFilePath((Change)o); } else if (o instanceof VirtualFile) { return VcsUtil.getFilePath((VirtualFile)o); } else if (o instanceof FilePath) { return (FilePath)o; } else if (o instanceof LocallyDeletedChange) { return ((LocallyDeletedChange)o)...
getPathForObject
262,089
boolean () { return myModel.getChildCount(myRoot) == 0; }
isEmpty
262,090
void (@NotNull AnActionEvent e) { final Navigatable[] navigatableArray = e.getData(CommonDataKeys.NAVIGATABLE_ARRAY); if (navigatableArray != null && navigatableArray.length > 0) { ApplicationManager.getApplication().invokeLater(() -> OpenSourceUtil.navigate(navigatableArray)); DialogWrapper dialog = DialogWrapper.find...
actionPerformed
262,091
boolean () { return !isDirectory(); }
isFile
262,092
boolean () { return ChangesUtil.getFilePath(getUserObject()).isDirectory(); }
isDirectory
262,093
void (@NotNull ChangesBrowserNodeRenderer renderer, boolean selected, boolean expanded, boolean hasFocus) { ReadAction.run(() -> { Change change = getUserObject(); FilePath filePath = ChangesUtil.getFilePath(change); VirtualFile file = filePath.getVirtualFile(); if (myDecorator != null) { myDecorator.preDecorate(change...
render
262,094
void (@NotNull Change change, @NotNull FilePath filePath, @NotNull ChangesBrowserNodeRenderer renderer) { Icon additionalIcon = change.getAdditionalIcon(); if (additionalIcon != null) { renderer.setIcon(additionalIcon); return; } renderer.setIcon(filePath, filePath.isDirectory() || !isLeaf()); }
setIcon
262,095
void (@NotNull ChangesBrowserNodeRenderer renderer, @Nullable VirtualFile file) { if (file != null && myProject != null && !myProject.isDefault() && !myProject.isDisposed()) { String branch = ChangeListManager.getInstance(myProject).getSwitchedBranch(file); if (branch != null) { String switchedToBranch = "[" + VcsBundl...
appendSwitched
262,096
String () { return getUserObject().getDescription(); }
getTooltip
262,097
String () { return ChangesUtil.getFilePath(getUserObject()).getName(); }
getTextPresentation
262,098
String () { return FileUtil.toSystemDependentName(ChangesUtil.getFilePath(getUserObject()).getPath()); }
toString
262,099
int () { return CHANGE_SORT_WEIGHT; }
getSortWeight