Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
66,000
void () { if (!myExceptions.isEmpty()) { AbstractVcsHelper.getInstance(myProject).showErrors(myExceptions, myTitle); } }
showErrors
66,001
void () { myProcessor.clear(); showErrors(); }
end
66,002
void (@Nullable Url url) { myUrl = url; }
setUrl
66,003
Url () { return myRootURL; }
getRootURL
66,004
void (@NotNull WorkingCopyFormat format) { myFormat = format; }
setFormat
66,005
VirtualFile () { return myFile; }
getFile
66,006
Url () { return myUrl; }
getUrl
66,007
WorkingCopyFormat () { return myFormat; }
getFormat
66,008
NestedCopyType () { return myType; }
getType
66,009
String (final VirtualFile file) { return file.getPath(); }
key
66,010
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; NestedCopyInfo info = (NestedCopyInfo)o; if (!key(myFile).equals(key(info.myFile))) return false; return true; }
equals
66,011
int () { return key(myFile).hashCode(); }
hashCode
66,012
void (@Nullable final Url value) { myRootURL = value; }
setRootURL
66,013
void (@NotNull VcsDirtyScope dirtyScope, @NotNull ChangeListManagerGate addGate, @NotNull SvnChangeProviderContext context) { FileDocumentManager fileDocumentManager = FileDocumentManager.getInstance(); for (Document unsavedDocument : fileDocumentManager.getUnsavedDocuments()) { final VirtualFile file = fileDocumentMan...
processUnsaved
66,014
void (@NotNull SvnChangeProviderContext context, @Nullable VcsDirtyScope dirtyScope) { for (SvnChangedFile copiedFile : context.getCopiedFiles()) { context.checkCanceled(); processCopiedFile(copiedFile, context, dirtyScope); } for (SvnChangedFile deletedFile : context.getDeletedFiles()) { context.checkCanceled(); conte...
processCopiedAndDeleted
66,015
void (@NotNull SvnChangedFile copiedFile, @NotNull SvnChangeProviderContext context, @Nullable VcsDirtyScope dirtyScope) { Url copyFromURL = Objects.requireNonNull(copiedFile.getCopyFromURL()); SvnChangedFile movedFromFile = find(context.getDeletedFiles(), it -> copyFromURL.equals(it.getStatus().getUrl())); if (movedFr...
processCopiedFile
66,016
void (@NotNull SvnChangeProviderContext context, @NotNull FilePath oldPath, @Nullable final VcsDirtyScope dirtyScope, @NotNull Set<SvnChangedFile> movedFiles, @NotNull SvnChangedFile deletedFile, @Nullable Status copiedStatus, @Nullable String clName) { FilePath filePath = VcsUtil.getFilePath(deletedFile.getStatus().ge...
applyMovedChange
66,017
boolean () { return true; }
isModifiedDocumentTrackingRequired
66,018
void (@NotNull List<VirtualFile> files) { new CleanupWorker(myVcs, files).execute(); }
doCleanup
66,019
WorkingCopyFormat (@NotNull File path) { File root = SvnUtil.getWorkingCopyRoot(path); return root != null ? SvnUtil.getFormat(root) : WorkingCopyFormat.UNKNOWN; }
findRootAndGetFormat
66,020
void (@NotNull VirtualFileEvent event) { if (! event.isFromRefresh()) { return; } final VirtualFile file = event.getFile(); if (SvnUtil.SVN_ADMIN_DIR_NAME.equals(file.getName())) { if (event.getParent() != null) { VirtualFile parent = event.getParent(); fireFileStatusesChanged(parent); refreshAnnotationsUnder(parent); ...
fileCreated
66,021
void (VirtualFile parent) { BackgroundTaskUtil.syncPublisher(myProject, VcsAnnotationRefresher.LOCAL_CHANGES_CHANGED).dirtyUnder(parent); }
refreshAnnotationsUnder
66,022
void (@NotNull VirtualFileEvent event) { if (! event.isFromRefresh()) { return; } final VirtualFile file = event.getFile(); if (isWcDbFile(file)) { LOG.debug("wc.db had changed"); final VirtualFile parentWcDb = file.getParent(); if (parentWcDb != null && SvnUtil.isAdminDirectory(parentWcDb)) { final VirtualFile parent ...
contentsChanged
66,023
void (@NotNull VirtualFileEvent event) { if (!event.isFromRefresh()) { return; } final VirtualFile file = event.getFile(); if (SvnUtil.SVN_ADMIN_DIR_NAME.equals(file.getName())) { if (event.getParent() != null) { VirtualFile parent = event.getParent(); fireFileStatusesChanged(parent); refreshAnnotationsUnder(parent); }...
fileDeleted
66,024
void (VirtualFile parent) { final VirtualFile[] children = parent.getChildren(); final List<VirtualFile> files = new ArrayList<>(children.length + 1); files.add(parent); Collections.addAll(files, children); myDirtyScopeManager.filesDirty(files, null); }
fireFileStatusesChanged
66,025
boolean (final VirtualFile file) { VirtualFile parent = file.getParent(); return ! file.isDirectory() && SvnUtil.ENTRIES_FILE_NAME.equals(file.getName()) && parent != null && SvnUtil.SVN_ADMIN_DIR_NAME.equals(parent.getName()); }
isEntriesFile
66,026
boolean (final VirtualFile file) { VirtualFile parent = file.getParent(); return ! file.isDirectory() && SvnUtil.WC_DB_FILE_NAME.equals(file.getName()) && parent != null && SvnUtil.SVN_ADMIN_DIR_NAME.equals(parent.getName()); }
isWcDbFile
66,027
boolean (@NotNull SvnVcs vcs, @NotNull VirtualFile file) { return isUnderControl(vcs.getProject(), file); }
isUnderControl
66,028
boolean (@NotNull Project project, @NotNull VirtualFile file) { return !isIgnoredInAnySense(project, file) && !ChangeListManager.getInstance(project).isUnversioned(file); }
isUnderControl
66,029
boolean (@NotNull SvnVcs vcs, @NotNull VirtualFile file) { return FileStatus.ADDED.equals(FileStatusManager.getInstance(vcs.getProject()).getStatus(file)); }
isAdded
66,030
boolean (@NotNull SvnVcs vcs, @NotNull VirtualFile file) { return ChangeListManagerImpl.getInstanceImpl(vcs.getProject()).isLogicallyLocked(file); }
isExplicitlyLocked
66,031
boolean (@NotNull Project project, @NotNull VirtualFile file) { ChangeListManager manager = ChangeListManager.getInstance(project); return manager.isIgnoredFile(file) || FileStatus.IGNORED.equals(manager.getStatus(file)); }
isIgnoredInAnySense
66,032
VcsRevisionNumber (@NotNull VirtualFile file) { final Info svnInfo = myVcs.getInfo(virtualToIoFile(file)); return getRevision(svnInfo); }
getCurrentRevision
66,033
VcsRevisionNumber (@Nullable Info info) { VcsRevisionNumber result = null; if (info != null) { Revision revision = !info.getCommitInfo().getRevision().isValid() && info.getCopyFromRevision().isValid() ? info.getCopyFromRevision() : info.getRevision(); result = new SvnRevisionNumber(revision); } return result; }
getRevision
66,034
void (@NotNull Map<VirtualFile, VcsRevisionNumber> revisionMap, @NotNull Map<String, VirtualFile> fileMap, @NotNull List<File> ioFiles) { myVcs.collectInfo(ioFiles, createInfoHandler(revisionMap, fileMap)); }
collectRevisionsInBatch
66,035
InfoConsumer (@NotNull final Map<VirtualFile, VcsRevisionNumber> revisionMap, @NotNull final Map<String, VirtualFile> fileMap) { return info -> { if (info != null) { VirtualFile file = fileMap.get(info.getFile().getAbsolutePath()); if (file != null) { revisionMap.put(file, getRevision(info)); } else { LOG.info("Could n...
createInfoHandler
66,036
VcsRevisionDescription (@NotNull VirtualFile file) { return getCurrentRevisionDescription(virtualToIoFile(file)); }
getCurrentRevisionDescription
66,037
VcsRevisionDescription (@NotNull File path) { final Info svnInfo = myVcs.getInfo(path); if (svnInfo == null) { return null; } if (!svnInfo.getCommitInfo().getRevision().isValid() && svnInfo.getCopyFromRevision().isValid() && svnInfo.getCopyFromUrl() != null) { File localPath = myVcs.getSvnFileUrlMapping().getLocalPath(...
getCurrentRevisionDescription
66,038
String (@NotNull File path, @NotNull Info info) { String result; try { PropertyValue property = myVcs.getFactory(path).createPropertyClient() .getProperty(Target.on(path), COMMIT_MESSAGE, true, info.getCommitInfo().getRevision()); result = PropertyValue.toString(property); } catch (VcsException e) { LOG.info("Failed to...
getCommitMessage
66,039
ItemLatestState () { return createResult(Revision.HEAD, true, true); }
defaultResult
66,040
ItemLatestState (@NotNull Revision revision, boolean exists, boolean defaultHead) { return new ItemLatestState(new SvnRevisionNumber(revision), exists, defaultHead); }
createResult
66,041
ItemLatestState (@NotNull VirtualFile file) { return getLastRevision(virtualToIoFile(file)); }
getLastRevision
66,042
ContentRevision (@NotNull VcsRevisionNumber revisionNumber, @NotNull VirtualFile selectedFile) { FilePath filePath = VcsUtil.getFilePath(selectedFile); Revision revision = ((SvnRevisionNumber)revisionNumber).getRevision(); if (!Revision.HEAD.equals(revision) && revisionNumber.equals(getCurrentRevision(selectedFile))) {...
createFileContent
66,043
Status (@NotNull File file, boolean remote) { Status result = null; try { result = myVcs.getFactory(file).createStatusClient().doStatus(file, remote); } catch (SvnBindException e) { LOG.debug(e); } return result; }
getFileStatus
66,044
ItemLatestState (@NotNull FilePath filePath) { return getLastRevision(filePath.getIOFile()); }
getLastRevision
66,045
VcsRevisionNumber (@NotNull VirtualFile vcsRoot) { Info info = myVcs.getInfo(virtualToIoFile(vcsRoot), Revision.HEAD); return info != null ? new SvnRevisionNumber(info.getCommitInfo().getRevision()) : null; }
getLatestCommittedRevision
66,046
ItemLatestState (@NotNull File file) { Status svnStatus = getFileStatus(file, true); if (svnStatus == null || itemExists(svnStatus)) { // IDEADEV-21785 (no idea why this can happen) final Info info = myVcs.getInfo(file, Revision.HEAD); if (info == null || info.getUrl() == null) { LOG.info("No SVN status returned for " ...
getLastRevision
66,047
Revision (@NotNull File file, @NotNull Status svnStatus) { WorkingCopyFormat format = myVcs.getWorkingCopyFormat(file); long revision = -1; // skipped for >= 1.8 if (format.less(WorkingCopyFormat.ONE_DOT_EIGHT)) { // get really latest revision // TODO: Algorithm seems not to be correct in all cases - for instance, when...
getLastExistingRevision
66,048
boolean (@NotNull Status svnStatus) { return !StatusType.STATUS_DELETED.equals(svnStatus.getRemoteItemStatus()); }
itemExists
66,049
void () { try { final byte[] bytes = FileUtil.loadFileBytes(myFile); final DataInputStream dis = new DataInputStream(new UnsyncByteArrayInputStream(bytes)); final int size = dis.readInt(); for (int i = 0; i < size; i++) { final KeyWrapper<K> keyWrapper = new KeyWrapper<>(myKeyDescriptor, myKeyDescriptor.read(dis)); fin...
init
66,050
void (final K key, final V value) { myMap.put(new KeyWrapper<>(myKeyDescriptor, key), value); myDirty = true; }
put
66,051
V (final K key) { return myMap.get(new KeyWrapper<>(myKeyDescriptor, key)); }
get
66,052
void () { if (! myDirty) return; try{ final BufferExposingByteArrayOutputStream bos = new BufferExposingByteArrayOutputStream(); final DataOutput out = new DataOutputStream(bos); out.writeInt(myMap.size()); for (Map.Entry<KeyWrapper<K>, V> entry : myMap.entrySet()) { myKeyDescriptor.save(out, entry.getKey().myKey); myV...
force
66,053
boolean () { return myDirty; }
isDirty
66,054
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final KeyWrapper<K> that = (KeyWrapper) o; return myDescriptor.isEqual(this.myKey, that.myKey); }
equals
66,055
int () { return myDescriptor.getHashCode(myKey); }
hashCode
66,056
Collection<K> () { final ArrayList<K> result = new ArrayList<>(myMap.size()); for (KeyWrapper<K> keyWrapper : myMap.keySet()) { result.add(keyWrapper.myKey); } return result; }
keySet
66,057
boolean () { return ourInProgress.get(); }
isInProgress
66,058
void () { }
dispose
66,059
Url (@NotNull File file) { Url result = null; RootUrlInfo rootUrlInfo = getWcRootForFilePath(getFilePath(file)); if (rootUrlInfo != null) { try { result = append(rootUrlInfo.getUrl(), getRelativePath(rootUrlInfo.getPath(), file.getAbsolutePath())); } catch (SvnBindException e) { LOG.info(e); } } return result; }
getUrlForFile
66,060
File (@NotNull Url url) { RootUrlInfo parentInfo = getWcRootForUrl(url); return parentInfo != null ? new File(parentInfo.getIoFile(), getRelativeUrl(parentInfo.getUrl(), url)) : null; }
getLocalPath
66,061
RootUrlInfo (@NotNull FilePath path) { synchronized (myMonitor) { String root = myMoreRealMapping.getRootForPath(toSystemDependentName(path.toString())); return root != null ? myMoreRealMapping.byFile(root) : null; } }
getWcRootForFilePath
66,062
RootUrlInfo (@NotNull Url url) { synchronized (myMonitor) { RootUrlInfo result = null; Url rootUrl = find(myMoreRealMapping.getUrls(), parentRootUrl -> isAncestor(parentRootUrl, url)); if (rootUrl != null) { result = myMoreRealMapping.byUrl(rootUrl); if (result == null) { LOG.info("Inconsistent maps for url:" + url + "...
getWcRootForUrl
66,063
List<RootUrlInfo> () { synchronized (myMonitor) { return myMoreRealMapping.getAllCopies(); } }
getAllWcInfos
66,064
List<RootUrlInfo> () { synchronized (myMonitor) { return new ArrayList<>(myErrorRoots); } }
getErrorRoots
66,065
List<VirtualFile> (@NotNull List<VirtualFile> result) { if (MyRootsHelper.isInProgress()) return new ArrayList<>(result); List<VirtualFile> cachedRoots; List<VirtualFile> lonelyRoots; synchronized (myMonitor) { cachedRoots = myMoreRealMapping.getUnderVcsRoots(); lonelyRoots = myMoreRealMapping.getLonelyRoots(); } myPro...
convertRoots
66,066
void (@NotNull Set<NestedCopyInfo> set) { myNestedCopiesHolder.add(set); }
acceptNestedData
66,067
boolean () { synchronized (myMonitor) { boolean result = myInitialized; myInitialized = true; return result; } }
init
66,068
void () { myRefreshQueue.queue(DisposableUpdate.createDisposable(this, "refresh", () -> refresh())); }
scheduleRefresh
66,069
void () { SvnVcs vcs = SvnVcs.getInstance(myProject); VirtualFile[] roots = myRootsHelper.execute(); SvnRootsDetector rootsDetector = new SvnRootsDetector(this, vcs, myNestedCopiesHolder); SvnRootsDetector.Result result = rootsDetector.detectCopyRoots(roots, init()); if (result != null) { putWcDbFilesToVfs(result.getTo...
refresh
66,070
void () { myNewMapping.addAll(myResult.getTopRoots()); myNewMapping.reportLonelyRoots(myResult.getLonelyRoots()); myNewFilteredMapping.addAll(new UniqueRootsFilter().filter(myResult.getTopRoots())); runUpdateMappings(); }
apply
66,071
void () { // TODO: Not clear so far why read action is used here - may be because of ROOTS_RELOADED message sent? ReadAction.run(() -> { if (!myProject.isDisposed()) { boolean mappingsChanged = updateMappings(); notifyRootsReloaded(mappingsChanged); } }); }
runUpdateMappings
66,072
boolean () { boolean mappingsChanged; synchronized (myMonitor) { mappingsChanged = !myMoreRealMapping.equals(myNewFilteredMapping); mappingsChanged |= !myErrorRoots.equals(myResult.getErrorRoots()); myMapping.copyFrom(myNewMapping); myMoreRealMapping.copyFrom(myNewFilteredMapping); myErrorRoots.clear(); myErrorRoots.ad...
updateMappings
66,073
void (boolean mappingsChanged) { if (mappingsChanged || !myInitedReloaded) { myInitedReloaded = true; // all listeners are asynchronous BackgroundTaskUtil.syncPublisher(myProject, SvnVcs.ROOTS_RELOADED).consume(true); BackgroundTaskUtil.syncPublisher(myProject, ProjectLevelVcsManager.VCS_CONFIGURATION_CHANGED_IN_PLUGIN...
notifyRootsReloaded
66,074
boolean () { synchronized (myMonitor) { return myMapping.isEmpty(); } }
isEmpty
66,075
SvnMappingSavedPart () { SvnMappingSavedPart result = new SvnMappingSavedPart(); SvnMapping mapping = new SvnMapping(); SvnMapping realMapping = new SvnMapping(); synchronized (myMonitor) { mapping.copyFrom(myMapping); realMapping.copyFrom(myMoreRealMapping); } mapping.getAllCopies().forEach(result::add); realMapping.g...
getState
66,076
void (@NotNull final SvnMappingSavedPart state) { ProjectLevelVcsManager.getInstance(myProject).runAfterInitialization( () -> getApplication().executeOnPooledThread(() -> { SvnMapping mapping = new SvnMapping(); SvnMapping realMapping = new SvnMapping(); try { fillMapping(mapping, state.getMappingRoots()); fillMapping(...
loadState
66,077
void (@NotNull SvnMapping mapping, @NotNull List<SvnCopyRootSimple> list) { LocalFileSystem lfs = LocalFileSystem.getInstance(); for (SvnCopyRootSimple simple : list) { VirtualFile copyRoot = lfs.findFileByIoFile(new File(simple.myCopyRoot)); VirtualFile vcsRoot = lfs.findFileByIoFile(new File(simple.myVcsRoot)); if (c...
fillMapping
66,078
void (@NotNull FilePath path, final Status status) { VirtualFile file = path.getVirtualFile(); if (file != null) { if (status.is(StatusType.STATUS_EXTERNAL)) { // We do not determine here url, repository url - because url, repository url in status will determine location in the // repository where folder is located and...
process
66,079
void (@NotNull VirtualFile file, @Nullable Url url, @NotNull WorkingCopyFormat format, @Nullable Url rootURL) { myCopies.add(new NestedCopyInfo(file, url, format, NestedCopyType.inner, rootURL)); }
processCopyRoot
66,080
void (@NotNull VirtualFile vf, Url url) { final File ioFile = VfsUtilCore.virtualToIoFile(vf); final RootUrlInfo info = myVcs.getSvnFileUrlMapping().getWcRootForFilePath(getFilePath(vf)); if (info != null && FileUtil.filesEqual(ioFile, info.getIoFile()) && !info.getUrl().equals(url)) { myVcs.invokeRefreshSvnRoots(); } ...
bewareRoot
66,081
void () { }
finish
66,082
Set<NestedCopyInfo> () { return myCopies; }
getCopies
66,083
ConfigurableUi<SvnConfiguration> () { return myUiSupplier.get(); }
createUi
66,084
SvnConfiguration () { return SvnConfiguration.getInstance(myProject); }
getSettings
66,085
void (@NotNull String path, @NotNull final Consumer<? super String> dirConsumer, final Project project, @Nullable final Component component) { FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor() .withTitle(message("dialog.title.select.configuration.directory")) .withDescriptio...
selectConfigurationDirectory
66,086
ConflictState () { return myConflictState; }
getConflictState
66,087
void (boolean isPhantom) { myIsPhantom = isPhantom; }
setIsPhantom
66,088
boolean () { return myConflictState.isTree(); }
isTreeConflict
66,089
boolean () { return myIsPhantom; }
isPhantom
66,090
TreeConflictDescription () { return myBeforeDescription; }
getBeforeDescription
66,091
void (TreeConflictDescription beforeDescription) { myBeforeDescription = beforeDescription; }
setBeforeDescription
66,092
TreeConflictDescription () { return myAfterDescription; }
getAfterDescription
66,093
void (TreeConflictDescription afterDescription) { myAfterDescription = afterDescription; }
setAfterDescription
66,094
Icon () { return myConflictState.getIcon(); }
getAdditionalIcon
66,095
String () { String description = myConflictState.getDescription(); if (description == null) return null; return myBeforeDescription != null ? myAfterDescription != null ? message("label.file.has.conflicts.before.and.after", description, myBeforeDescription.toPresentableString(), myAfterDescription.toPresentableString()...
getDescription
66,096
FilePath () { return myTreeConflictMarkHolder; }
getTreeConflictMarkHolder
66,097
Node () { return myNode; }
getNode
66,098
Url () { return myNode.getRepositoryRootUrl(); }
getRepositoryUrl
66,099
WorkingCopyFormat () { return myFormat; }
getFormat