Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
67,400
Fragment (final long earliestRevision, final long oldestRevision, final int desirableSize, final boolean includeYoungest, final boolean includeOldest) { if ((earliestRevision > getEarliestRevision()) || (earliestRevision == -1)) { if (myAlreadyReaded == null) { return null; } // just return first return createFromLoade...
getEarliestBunchInInterval
67,401
Fragment (final long earliestRevision, final long oldestRevision, final int desirableSize, final boolean includeOldest, final boolean wasConsistentWithPrevious) { try { if (myIterator.hasNext()) { final ChangesBunch changesBunch = myIterator.next(); if (changesBunch == null) { return null; } addToLoaded(changesBunch); ...
packNext
67,402
boolean () { return myHadBeenAccessed; }
hadBeenSuccessfullyAccessed
67,403
Fragment (final ChangesBunch loadedBunch, final long earliestRevision, final long oldestRevision, final int desirableSize, final boolean includeYoungest, final boolean includeOldest, final boolean consistent) { boolean consistentWithPrevious = loadedBunch.isConsistentWithPrevious(); boolean consistentWithYounger = cons...
createFromLoaded
67,404
boolean () { return getEarliestRevision() == -1; }
isEmpty
67,405
long () { return -1; }
getEarliestRevision
67,406
boolean () { return false; }
isEmpty
67,407
boolean (@NotNull VcsException e) { return e instanceof SvnBindException && ((SvnBindException)e).contains(ErrorCode.FS_NOT_FOUND); }
isElementNotFound
67,408
boolean () { return myEarliestRevisionWasAccessed; }
isEarliestRevisionWasAccessed
67,409
void (@NotNull LogEntry entry) { for (LogEntryPath entryPath : entry.getChangedPaths().values()) { if (entryPath != null && 'A' == entryPath.getType() && entryPath.getCopyPath() != null) { if (myCurrentPath.equals(entryPath.getPath())) { myHadChanged = true; myCurrentPath = entryPath.getCopyPath(); return; } else if (U...
accept
67,410
void () { myInclude.addActionListener(e -> myListener.run()); myUrlText.setText(myInfo.getUrl().toString()); myFixedSelectLocal.addActionListener(e -> { if (mySelectedBranch != null) { Pair<WorkingCopyInfo, Url> info = IntegratedSelectedOptionsDialog.selectWorkingCopy(myProject, myInfo.getUrl(), mySelectedBranch.getUrl...
initWithData
67,411
void () { myContentPanel = new JPanel(new GridBagLayout()); myContentPanel.setMinimumSize(new Dimension(200, 100)); final GridBagConstraints gb = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, JBUI.insets(1), 0, 0); myInclude = new JCheckBox(); gb.fill = GridBagCon...
init
67,412
void (final boolean value) { myMixedRevisions.setVisible(value); }
setMixedRevisions
67,413
String (@NotNull Url url, @Nullable String localPath) { String result = null; Set<String> paths = SvnBranchMapperManager.getInstance().get(url); if (!ContainerUtil.isEmpty(paths)) { result = localPath != null ? ContainerUtil.find(paths, localPath) : ContainerUtil.getFirstItem(ContainerUtil.sorted(paths)); } return resu...
getLocal
67,414
void (@Nullable Url url, @Nullable String localPath) { final String local = url == null ? null : getLocal(url, localPath == null ? myBranchToLocal.get(url) : localPath); if (local == null) { myLocalArea.setForeground(JBColor.RED); myLocalArea.setText(message("label.select.target.working.copy")); } else { myLocalArea.se...
calculateBranchPathByBranch
67,415
void (@NotNull WCInfoWithBranches.Branch branch) { myBranchField.setText(branch.getName()); if (!initSelectedBranch(branch)) { myInfo = myRefresher.fun(myInfo); initSelectedBranch(branch); } }
refreshSelectedBranch
67,416
boolean (@NotNull WCInfoWithBranches.Branch branch) { boolean found = myInfo.getBranches().contains(branch); if (found) { mySelectedBranch = branch; } return found; }
initSelectedBranch
67,417
void (final boolean onlyOneRoot) { myOnlyOneRoot = onlyOneRoot; myInclude.setEnabled(! myOnlyOneRoot); myInclude.setSelected(true); }
setOnlyOneRoot
67,418
JPanel () { return myContentPanel; }
getContentPanel
67,419
void () { myFixedSelectLocal = new FixedSizeButton(20); }
createUIComponents
67,420
InfoHolder () { return new InfoHolder(mySelectedBranch, getLocalBranch(), myInclude.isSelected()); }
getInfo
67,421
void (@NotNull InfoHolder holder) { myInclude.setSelected(holder.isEnabled()); if (holder.getBranch() != null) { refreshSelectedBranch(holder.getBranch()); calculateBranchPathByBranch(mySelectedBranch.getUrl(), holder.getLocal()); } }
initSelection
67,422
String () { return myLocal; }
getLocal
67,423
boolean () { return myEnabled; }
isEnabled
67,424
WCInfoWithBranches () { return myInfo; }
getWcInfo
67,425
String () { return mySelectedBranch != null ? myBranchToLocal.get(mySelectedBranch.getUrl()) : null; }
getLocalBranch
67,426
boolean () { return myOnlyOneRoot || myInclude.isSelected(); }
isEnabled
67,427
VcsRevisionNumber () { if (myCommittedPath == null) { return null; } if (myCommittedPath.isNonLocal()) { // technically, it does not make sense, since there's no "current" revision for non-local history (if look how it's used) // but ok, lets keep it for now return new SvnRevisionNumber(Revision.HEAD); } return getCurr...
calcCurrentRevisionNumber
67,428
VcsRevisionNumber (final SvnVcs vcs, final File file) { Info info = vcs.getInfo(file); return info != null ? new SvnRevisionNumber(info.getCommitInfo().getRevision()) : null; }
getCurrentCommittedRevision
67,429
FilePath () { return myCommittedPath; }
getCommittedPath
67,430
boolean () { return myHaveMergeSources; }
isHaveMergeSources
67,431
VcsHistorySession () { return new SvnHistorySession(myVcs, getRevisionList(), myCommittedPath, myHaveMergeSources, getCurrentRevisionNumber(), true, myHasLocalSource); }
copy
67,432
boolean () { return myHasLocalSource; }
hasLocalSource
67,433
void (@NotNull AnActionEvent e) { final DataContext dc = e.getDataContext(); final ChangeList[] lists = VcsDataKeys.CHANGE_LISTS.getData(dc); final boolean enabled = lists != null && lists.length == 1 && lists[0] instanceof SvnChangeList; if (! enabled) return; final SvnChangeList svnList = (SvnChangeList) lists[0]; Pr...
actionPerformed
67,434
void (final long number, final String oldComment, final SvnRepositoryLocation location, Project project, Consumer<? super String> listener, final boolean fromVersionControl) { final SvnEditCommitMessageDialog dialog = new SvnEditCommitMessageDialog(project, number, oldComment); dialog.show(); if (DialogWrapper.OK_EXIT_...
askAndEditRevision
67,435
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
67,436
void (@NotNull AnActionEvent e) { final DataContext dc = e.getDataContext(); final ChangeList[] lists = VcsDataKeys.CHANGE_LISTS.getData(dc); final boolean enabled = lists != null && lists.length == 1 && lists[0] instanceof SvnChangeList; boolean visible; Project project = CommonDataKeys.PROJECT.getData(dc); if (projec...
update
67,437
boolean (ContentRevision cr) { return cr instanceof MarkerVcsContentRevision && SvnVcs.getKey().equals(((MarkerVcsContentRevision) cr).getVcsKey()); }
isSvn
67,438
void (@NotNull ProgressIndicator indicator) { final String url = myLocation.getURL(); final Url root; try { root = SvnUtil.getRepositoryRoot(myVcs, createUrl(url)); if (root == null) { myException = new VcsException(message("error.can.not.find.repository.root.for.url", url)); return; } Target target = Target.on(root); ...
run
67,439
void () { if (myException != null) { AbstractVcsHelper.getInstance(myProject).showError(myException, message("tab.title.edit.revision.comment")); } else { if (myListener != null) { myListener.consume(myNewMessage); } if (!myProject.isDefault()) { CommittedChangesCache.getInstance(myProject).commitMessageChanged(myLocat...
onSuccess
67,440
Origin () { return myOrigin; }
getOrigin
67,441
List<CommittedChangeList> () { return myList; }
getList
67,442
ChangesBunch () { return myOriginBunch; }
getOriginBunch
67,443
boolean () { return myConsistentWithOlder; }
isConsistentWithOlder
67,444
boolean () { return myConsistentWithYounger; }
isConsistentWithYounger
67,445
void (final Project project, final SvnFileRevision revision, final VirtualFile file) { if (ModalityState.nonModal().equals(ModalityState.current())) { ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(ChangesViewContentManager.TOOLWINDOW_ID); final ContentManager contentManager = toolWindow.g...
showMe
67,446
String () { return null; }
getDisplayName
67,447
String () { return null; }
getHelpTopic
67,448
void (final SvnFileRevision revision, final MyNode node, final List<TreePath> nodesToExpand) { final MyNode current = new MyNode(new MyNamedConfigurable(revision, myFile, myProject, myListsMap)); node.add(current); final TreeNode[] path = ((DefaultTreeModel)myTree.getModel()).getPathToRoot(node); nodesToExpand.add(new ...
addRecursively
67,449
void (@NotNull JTree tree, final Object value, final boolean selected, final boolean expanded, final boolean leaf, final int row, final boolean hasFocus) { final FontMetrics metrics = tree.getFontMetrics(tree.getFont()); final SvnFileRevision revision; if (value instanceof MyRootNode) { revision = myRevision; } else { ...
customizeCellRenderer
67,450
void () { myTree.setCellRenderer(new MyTreeCellRenderer()); myRoot.removeAllChildren(); final List<TreePath> nodesToExpand = new ArrayList<>(); addRecursively(myRevision, myRoot, nodesToExpand); ((DefaultTreeModel) myTree.getModel()).reload(myRoot); for (TreePath treePath : nodesToExpand) { myTree.expandPath(treePath);...
fillTree
67,451
void (final String name) { }
setDisplayName
67,452
SvnFileRevision () { return myRevision; }
getEditableObject
67,453
String () { return myRevision.getRevisionNumber().asString(); }
getBannerSlogan
67,454
SvnChangeList () { SvnChangeList list = myListsMap.get(myRevision.getRevision().getNumber()); if (list == null) { list = (SvnChangeList)SvnVcs.getInstance(myProject).loadRevisions(myFile, myRevision.getRevisionNumber()); myListsMap.put(myRevision.getRevision().getNumber(), list); } return list; }
getList
67,455
JComponent () { if (myPanel == null) { final SvnChangeList list = getList(); if (list == null) { myPanel = new JPanel(); } else { CommittedChangeListPanel panel = new CommittedChangeListPanel(myProject); panel.setChangeList(list); myPanel = panel; } } return myPanel; }
createOptionsPanel
67,456
String () { return getBannerSlogan(); }
getDisplayName
67,457
String () { return null; }
getHelpTopic
67,458
boolean () { return false; }
isModified
67,459
void () { }
apply
67,460
SvnFileRevision () { return myRevision; }
getRevision
67,461
JComponent () { final JComponent component = new SvnMergeSourceDetails(myProject, myRevision, myFile).createComponent(); component.setMinimumSize(new Dimension(300, 200)); return component; }
createCenterPanel
67,462
void (@Nullable CopyData copyData) { if (LOG.isDebugEnabled()) { LOG.debug("Found branch point " + join(Arrays.asList(myAbsoluteTrunkUrl.toDecodedString(), myAbsoluteBranchUrl.toDecodedString(), copyData), ", ")); } }
debug
67,463
void (@NotNull BranchPoint trunk, @NotNull BranchPoint branch, boolean isBranchFromTrunk) { if (LOG.isDebugEnabled()) { LOG.debug("Searching branch point for " + join(List.of(trunk, branch, isBranchFromTrunk), ", ")); } }
debug
67,464
String () { return MoreObjects.toStringHelper(this) .add("target", myTarget) .add("revision", myEntry != null ? myEntry.getRevision() : -1) .add("path", myPath != null && myPath.getCopyPath() != null ? format(myPath.getCopyPath(), Revision.of(myPath.getCopyRevision())) : null) .toString(); }
toString
67,465
String () { return ensureStartSlash(getRelativeUrl(myRepositoryRoot, myTarget.getUrl())); }
relativePath
67,466
long () { if (! detectStartRevision()) return -1; final Ref<Long> latest = new Ref<>(-1L); try { if (myEndNumber == -1) { myEndNumber = getLatestRevision(); } final Url existingParent = getExistingParent(myUrl); if (existingParent == null) { return myStartNumber; } final Revision startRevision = Revision.of(myStartNumb...
getDeletionRevision
67,467
LogEntryConsumer (@NotNull final Ref<Long> latest) { return logEntry -> { final Map changedPaths = logEntry.getChangedPaths(); for (Object o : changedPaths.values()) { final LogEntryPath path = (LogEntryPath)o; if ((path.getType() == 'D') && (myRelativeUrl.equals(path.getPath()))) { latest.set(logEntry.getRevision()); ...
createHandler
67,468
long () { if (! detectStartRevision()) return myStartNumber; long latestOk = myStartNumber; try { if (myEndNumber == -1) { myEndNumber = getLatestRevision(); } // TODO: At least binary search could be applied here for optimization for (long i = myStartNumber + 1; i < myEndNumber; i++) { if (existsInRevision(myUrl, i)) ...
getLatestExistent
67,469
boolean () { if (! myStartExistsKnown) { final SvnFileUrlMapping mapping = myVcs.getSvnFileUrlMapping(); final RootUrlInfo rootUrlInfo = mapping.getWcRootForUrl(myUrl); if (rootUrlInfo == null) return true; final VirtualFile vf = rootUrlInfo.getVirtualFile(); final Info info = myVcs.getInfo(vf); if (info == null || !in...
detectStartRevision
67,470
VcsRevisionNumber () { return myNumber; }
getRevisionNumber
67,471
PropertyConsumer (Revision revision, @NotNull List<? super PropertyData> lines) { ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator(); if (indicator != null) { indicator.checkCanceled(); indicator.setText(message("show.properties.diff.progress.text.revision.information", revision.toString...
createHandler
67,472
void (File path, PropertyData property) { registerProperty(property); }
handleProperty
67,473
void (Url url, PropertyData property) { registerProperty(property); }
handleProperty
67,474
void (@NotNull PropertyData property) { if (indicator != null) { indicator.checkCanceled(); indicator.setText2(message("show.properties.diff.progress.text2.property.information", property.getName())); } lines.add(property); }
registerProperty
67,475
String (@NotNull List<? extends PropertyData> lines) { StringBuilder sb = new StringBuilder(); lines.sort(Comparator.comparing(PropertyData::getName)); for (PropertyData line : lines) { addPropertyPresentation(line, sb); } return sb.toString(); }
toSortedStringPresentation
67,476
void (@NotNull PropertyData property, @NotNull StringBuilder sb) { if (sb.length() != 0) { sb.append(ourPropertiesDelimiter); } sb.append(property.getName()).append("=").append(property.getValue()); }
addPropertyPresentation
67,477
CommittedChangeList (@NotNull RepositoryLocationGroup group, @NotNull List<? extends CommittedChangeList> lists) { return new SvnChangeList(lists, new SvnRepositoryLocation(group.toPresentableString())); }
zip
67,478
long (@NotNull CommittedChangeList list) { return list.getNumber(); }
getNumber
67,479
boolean () { return true; }
supportsHistoryForDirectories
67,480
DiffFromHistoryHandler () { return new SvnDiffFromHistoryHandler(myVcs); }
getHistoryDiffHandler
67,481
boolean (@NotNull VirtualFile file) { return true; }
canShowHistoryFor
67,482
VcsDependentHistoryComponents (final VcsHistorySession session, JComponent forShortcutRegistration) { final ColumnInfo<?, ?>[] columns; final Consumer<VcsFileRevision> listener; final JComponent addComp; if (((SvnHistorySession)session).isHaveMergeSources()) { final MergeSourceColumnInfo mergeSourceColumn = new MergeSo...
getUICustomization
67,483
boolean () { return getDocument().getLength() == 0; }
isStatusVisible
67,484
Color () { return UIUtil.getEditorPaneBackground(); }
getBackground
67,485
void (Graphics g) { super.paintComponent(g); statusText.paint(this, g); }
paintComponent
67,486
JComponent () { return createScrollPane(field, true); }
getComponent
67,487
void () { }
updateButtons
67,488
void () { }
installDnDSupport
67,489
boolean () { return false; }
isModelEditable
67,490
FilePath (SvnHistorySession session) { return session.getCommittedPath(); }
getUsedFilePath
67,491
Boolean (SvnHistorySession session) { return session.isHaveMergeSources(); }
getAdditionallyCachedData
67,492
SvnHistorySession (Boolean aBoolean, @NotNull List<? extends VcsFileRevision> revisions, @NotNull FilePath filePath, VcsRevisionNumber currentRevision) { return new SvnHistorySession(myVcs, revisions, filePath, aBoolean, currentRevision, false, ! filePath.isNonLocal()); }
createFromCachedData
67,493
void (Consumer<VcsFileRevision> consumer) { myConsumer = consumer; }
setConsumer
67,494
void () { assert myUrl != null; mySupport15 = checkRepositoryVersion15(myVcs, myUrl); }
initSupports15
67,495
void () { myInfo = myVcs.getInfo(myFile.getIOFile()); if (myInfo == null || myInfo.getRepositoryRootUrl() == null) { myException = new VcsException(message("error.file.is.not.under.version.control", myFile.getPath())); return; } if (myInfo.getUrl() == null) { myException = new VcsException(message("error.file.is.not.un...
preliminary
67,496
void () { Url repoRootURL = myInfo.getRepositoryRootUrl(); String relativeUrl = getRelativeUrl(repoRootURL, myUrl); if (myPI != null) { myPI.setText2(message("progress.text2.changes.establishing.connection", myUrl.toDecodedString())); } final Revision pegRevision = myInfo.getRevision(); final Target target = Target.on(...
load
67,497
void () { if (myPI != null) { myPI.setText2(message("progress.text2.changes.establishing.connection", myUrl.toDecodedString())); } try { if (myForceBackwards) { if (!existsNow(myUrl)) { loadBackwards(myUrl); return; } } Revision operationalFrom = myFrom == null ? Revision.HEAD : myFrom; // TODO: try to rewrite without ...
load
67,498
boolean (Url svnurl) { final Info info; try { info = myVcs.getInfo(svnurl, Revision.HEAD, Revision.HEAD); } catch (SvnBindException e) { return false; } return info != null && info.getUrl() != null && info.getRevision().isValid(); }
existsNow
67,499
String () { return null; }
getHelpId