Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
263,000
void () { bufferedListConsumer.flush(); appender.finished(); if (!myRevisionsReturned) { application.invokeLater(() -> myDlg.close(-1), ModalityState.stateForComponent(myDlg.getWindow())); } }
finished
263,001
List<VcsException> () { return myExceptions; }
getExceptions
263,002
boolean () { return myRevisionsReturned; }
isRevisionsReturned
263,003
void (Project project, Consumer<VcsException> customHandler) { ((AbstractVcsHelperImpl)getInstance(project)).myCustomHandler = customHandler; }
setCustomExceptionHandler
263,004
VcsBaseContentProvider (@NotNull Project project, @NotNull VirtualFile file) { return VcsBaseContentProvider.EP_NAME.findFirstSafe(project, it -> it.isSupported(file)); }
findProviderFor
263,005
boolean (@NotNull Project project, @NotNull VirtualFile file) { return isHandledByVcs(project, file) || findProviderFor(project, file) != null; }
isSupported
263,006
boolean (@NotNull Project project, @NotNull VirtualFile file) { FileStatus status = FileStatusManager.getInstance(project).getStatus(file); if (status == FileStatus.ADDED || status == FileStatus.DELETED || status == FileStatus.UNKNOWN || status == FileStatus.IGNORED) { return false; } return true; }
isTracked
263,007
boolean (@NotNull Project project, @NotNull VirtualFile file) { return file.isInLocalFileSystem() && ProjectLevelVcsManager.getInstance(project).getVcsFor(file) != null; }
isHandledByVcs
263,008
BaseContent (@NotNull Project project, @NotNull VirtualFile file) { if (!isHandledByVcs(project, file)) { if (LOG.isDebugEnabled()) { LOG.debug(String.format("File is not under VCS: %s", file)); } return createFromProvider(project, file); } ChangeListManager changeListManager = ChangeListManager.getInstance(project); C...
getBaseRevision
263,009
BaseContent (@NotNull Project project, @NotNull VirtualFile file) { VcsBaseContentProvider provider = findProviderFor(project, file); if (provider == null) return null; if (LOG.isDebugEnabled()) { LOG.debug(String.format("Content by provider %s: %s", provider, file)); } return provider.getBaseRevision(file); }
createFromProvider
263,010
BaseContent (@NotNull Project project, @NotNull ContentRevision contentRevision) { return new BaseContentImpl(project, contentRevision); }
createBaseContent
263,011
VcsRevisionNumber () { return myContentRevision.getRevisionNumber(); }
getRevisionNumber
263,012
String () { return loadContentRevision(myProject, myContentRevision); }
loadContent
263,013
VcsRevisionNumber () { return myRevision; }
getRevisionNumber
263,014
String () { ContentRevision contentRevision = myDiffProvider.createFileContent(myRevision, myFile); if (contentRevision == null) return null; return loadContentRevision(myProject, contentRevision); }
loadContent
263,015
String (@Nullable Project project, @NotNull ContentRevision contentRevision) { try { if (contentRevision instanceof ByteBackedContentRevision) { byte[] revisionContent = ((ByteBackedContentRevision)contentRevision).getContentAsBytes(); FilePath filePath = contentRevision.getFile(); if (revisionContent != null) { return...
loadContentRevision
263,016
boolean () { return isLocked(myProject, myKeys); }
isLocked
263,017
void () { lock(myProject, myKeys); }
lock
263,018
void () { unlock(myProject, myKeys); }
unlock
263,019
BackgroundableActionLock (@NotNull Project project, Object @NonNls @NotNull ... keys) { return new BackgroundableActionLock(project, keys); }
getLock
263,020
boolean (@NotNull Project project, Object @NotNull ... keys) { return getManager(project).isBackgroundTaskRunning(keys); }
isLocked
263,021
void (@NotNull Project project, Object @NotNull ... keys) { getManager(project).startBackgroundTask(keys); }
lock
263,022
void (@NotNull Project project, Object @NotNull ... keys) { if (project.isDisposed()) return; getManager(project).stopBackgroundTask(keys); }
unlock
263,023
ProjectLevelVcsManagerImpl (@NotNull Project project) { return ProjectLevelVcsManagerImpl.getInstanceImpl(project); }
getManager
263,024
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; BackgroundableActionLock lock = (BackgroundableActionLock)o; return myProject.equals(lock.myProject) && Arrays.equals(myKeys, lock.myKeys); }
equals
263,025
int () { int result = Objects.hash(myProject); result = 31 * result + Arrays.hashCode(myKeys); return result; }
hashCode
263,026
boolean (final int start, final int end) { LineStatusTracker<?> tracker = getTracker(); if (tracker == null) { return false; } else { return tracker.isRangeModified(start, end); } }
isRangeChanged
263,027
boolean (int currentNumber) { LineStatusTracker<?> tracker = getTracker(); if (tracker == null) { return false; } else { return tracker.isLineModified(currentNumber); } }
isLineChanged
263,028
int (int currentNumber) { return getLineNumber(currentNumber, false); }
getLineNumber
263,029
int (int currentNumber, boolean approximate) { LineStatusTracker<?> tracker = getTracker(); if (tracker == null) { return currentNumber; } else { return tracker.transferLineToVcs(currentNumber, approximate); } }
getLineNumber
263,030
int () { LineStatusTracker<?> tracker = getTracker(); if (tracker == null) { return myDocument.getLineCount(); } else { return tracker.getVcsDocument().getLineCount(); } }
getLineCount
263,031
KeymapGroup (final Condition<? super AnAction> filtered, final Project project) { KeymapGroup result = KeymapGroupFactory.getInstance().createGroup(KeyMapBundle.message("version.control.group.title")); AnAction[] versionControlsGroups = ActionsTreeUtil.getActions("VcsGroup"); AnAction[] keymapGroups = ActionsTreeUtil.g...
createGroup
263,032
int () { return myOrder; }
getOrder
263,033
boolean (final VirtualFile vcsRoot, final VirtualFile file) { final String vcsUrl = vcsRoot.getUrl(); final MyRootFilter rootFilter = myOtherVcsFolders.get(vcsUrl); if ((rootFilter != null) && (!rootFilter.accept(file))) { return false; } return !isIgnoredByVcs(myVcsManager, myProject, file); }
acceptFolderUnderVcs
263,034
boolean (final ProjectLevelVcsManager vcsManager, final Project project, final VirtualFile file) { return ReadAction.compute(() -> project.isDisposed() || vcsManager.isIgnored(file)); }
isIgnoredByVcs
263,035
void (final VcsRoot[] allRoots) { final String ourPath = myRoot.getUrl(); for (VcsRoot root : allRoots) { final AbstractVcs vcs = root.getVcs(); if (vcs == null || Objects.equals(vcs.getName(), myVcsName)) continue; final String url = root.getPath().getUrl(); if (url.startsWith(ourPath)) { myExcludedByOthers.add(url); ...
init
263,036
boolean (final VirtualFile vf) { final String url = vf.getUrl(); for (String excludedByOtherVcs : myExcludedByOthers) { // use the fact that they are sorted if (url.length() > excludedByOtherVcs.length()) return true; if (url.startsWith(excludedByOtherVcs)) return false; } return true; }
accept
263,037
void (final Project project, final VirtualFile root, final Processor<? super VirtualFile> processor) { final MyRootIterator rootIterator = new MyRootIterator(project, root, null, processor, null); rootIterator.iterate(); }
iterateVfUnderVcsRoot
263,038
void (final Project project, final VirtualFile root, final Processor<? super FilePath> processor) { iterateVcsRoot(project, root, processor, null); }
iterateVcsRoot
263,039
void (final Project project, final VirtualFile root, final Processor<? super FilePath> processor, @Nullable VirtualFileFilter directoryFilter) { final MyRootIterator rootIterator = new MyRootIterator(project, root, processor, null, directoryFilter); rootIterator.iterate(); }
iterateVcsRoot
263,040
void () { VfsUtilCore.visitChildrenRecursively(myRoot, new VirtualFileVisitor<Void>(VirtualFileVisitor.NO_FOLLOW_SYMLINKS) { @Override public void afterChildrenVisited(@NotNull VirtualFile file) { if (myDirectoryFilter != null) { myDirectoryFilter.afterChildrenVisited(file); } } @NotNull @Override public Result visitFi...
iterate
263,041
void (@NotNull VirtualFile file) { if (myDirectoryFilter != null) { myDirectoryFilter.afterChildrenVisited(file); } }
afterChildrenVisited
263,042
Result (@NotNull VirtualFile file) { if (isIgnoredByVcs(myVcsManager, myProject, file)) return SKIP_CHILDREN; if (myRootPresentFilter != null && !myRootPresentFilter.accept(file)) return SKIP_CHILDREN; if (myProject.isDisposed() || !process(file)) return skipTo(myRoot); if (myDirectoryFilter != null && file.isDirectory...
visitFileEx
263,043
boolean (VirtualFile current) { if (myPathProcessor != null) { return myPathProcessor.process(VcsUtil.getFilePath(current)); } else if (myFileProcessor != null) { return myFileProcessor.process(current); } return false; }
process
263,044
void (@NotNull VcsDirtyScope scope, @NotNull Processor<? super FilePath> iterator) { Project project = scope.getProject(); if (project.isDisposed()) return; for (FilePath dir : scope.getRecursivelyDirtyDirectories()) { final VirtualFile vFile = dir.getVirtualFile(); if (vFile != null && vFile.isValid()) { iterateVcsRoo...
iterate
263,045
void (@NotNull VcsDirtyScope scope, @NotNull Processor<? super VirtualFile> iterator) { Project project = scope.getProject(); if (project.isDisposed()) return; for (FilePath dir : scope.getRecursivelyDirtyDirectories()) { final VirtualFile vFile = obtainVirtualFile(dir); if (vFile != null && vFile.isValid()) { iterateV...
iterateExistingInsideScope
263,046
String (final VirtualFile file) { return FileUtil.toSystemDependentName(file.getPath()); }
getPresentableRelativePathFor
263,047
String (final ContentRevision fromRevision, final ContentRevision toRevision) { FilePath path = toRevision.getFile(); FilePath originalPath = fromRevision.getFile(); return getPresentableRelativePath(path, originalPath); }
getPresentableRelativePath
263,048
VcsCacheManager (@NotNull Project project) { return project.getService(VcsCacheManager.class); }
getInstance
263,049
VcsHistoryCache () { return myVcsHistoryCache; }
getVcsHistoryCache
263,050
ContentRevisionCache () { return myContentRevisionCache; }
getContentRevisionCache
263,051
void (@NotNull final List<CodeSmellInfo> smellList) { smellList.sort(Comparator.comparingInt(o -> o.getTextRange().getStartOffset())); ApplicationManager.getApplication().invokeLater(() -> { if (myProject.isDisposed()) return; if (smellList.isEmpty()) { return; } final VcsErrorViewPanel errorTreeView = new VcsErrorView...
showCodeSmellErrors
263,052
InspectionProfile () { InspectionProfile currentProfile; VcsConfiguration vcsConfiguration = VcsConfiguration.getInstance(myProject); String codeSmellProfile = vcsConfiguration.CODE_SMELLS_PROFILE; if (codeSmellProfile != null) { currentProfile = (vcsConfiguration.CODE_SMELLS_PROFILE_LOCAL ? InspectionProfileManager.ge...
getInspectionProfile
263,053
List<CodeSmellInfo> (@NotNull Map<Document, List<HighlightInfo>> highlights) { List<CodeSmellInfo> result = new ArrayList<>(); for (Map.Entry<Document, List<HighlightInfo>> e : highlights.entrySet()) { Document document = e.getKey(); List<HighlightInfo> infos = e.getValue(); for (HighlightInfo info : infos) { final Hig...
convertErrorsAndWarnings
263,054
String (@NotNull HighlightInfo highlightInfo) { final String description = highlightInfo.getDescription(); final HighlightInfoType type = highlightInfo.type; if (type instanceof HighlightInfoType.HighlightInfoTypeSeverityByKey) { final HighlightDisplayKey severityKey = ((HighlightInfoType.HighlightInfoTypeSeverityByKey...
getDescription
263,055
VcsFileStatusProvider (@NotNull Project project) { return project.getService(VcsFileStatusProvider.class); }
getInstance
263,056
FileStatus (@NotNull final VirtualFile virtualFile) { return ChangeListManager.getInstance(myProject).getStatus(virtualFile); }
getFileStatus
263,057
void (@NotNull final VirtualFile virtualFile, @NotNull final Document doc) { FileStatusManager.getInstance(myProject).fileStatusChanged(virtualFile); }
refreshFileStatusFromDocument
263,058
AbstractVcs (@NotNull Project project) { return project.instantiateClass(vcsClass, pluginDescriptor); }
createVcs
263,059
VcsDescriptor () { return new VcsDescriptor(administrativeAreaName, displayName, name, areChildrenValidMappings); }
createDescriptor
263,060
void (@NotNull PluginDescriptor pluginDescriptor) { this.pluginDescriptor = pluginDescriptor; }
setPluginDescriptor
263,061
String (final VirtualFile file) { if (file == null) return ""; return ReadAction.compute(() -> { if (myProject.isDisposed()) return file.getPresentableUrl(); boolean hideExcludedFiles = Registry.is("ide.hide.excluded.files"); ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myProject).getFileIndex(); Module ...
getPresentableRelativePathFor
263,062
String (@NotNull final ContentRevision fromRevision, @NotNull final ContentRevision toRevision) { final FilePath fromPath = fromRevision.getFile(); final FilePath toPath = toRevision.getFile(); final VirtualFile fromParent = VcsImplUtil.findValidParentAccurately(fromPath); final VirtualFile toParent = VcsImplUtil.findV...
getPresentableRelativePath
263,063
FileStatus (@NotNull PsiElement element) { if (!element.isValid()) return FileStatus.NOT_CHANGED; PsiFile file = element.getContainingFile(); if (file == null) return FileStatus.NOT_CHANGED; Document document = file.getViewProvider().getDocument(); LineStatusTracker<?> tracker = LineStatusTrackerManager.getInstance(myP...
getElementStatus
263,064
Element () { Element e = new Element("state"); ProjectLevelVcsManagerImpl.getInstanceImpl(myProject).writeDirectoryMappings(e); return e; }
getState
263,065
void (@NotNull Element state) { ProjectLevelVcsManagerImpl.getInstanceImpl(myProject).readDirectoryMappings(state); }
loadState
263,066
boolean () { return false; }
canHideWarnings
263,067
void () { Disposer.dispose(myMappings); }
dispose
263,068
ProjectLevelVcsManagerImpl (@NotNull Project project) { return (ProjectLevelVcsManagerImpl)getInstance(project); }
getInstanceImpl
263,069
void (AbstractVcs vcs) { AllVcses.getInstance(myProject).registerManually(vcs); }
registerVcs
263,070
void (VirtualFile file, Processor<? super VirtualFile> processor) { VcsRootIterator.iterateVfUnderVcsRoot(myProject, file, processor); }
iterateVfUnderVcsRoot
263,071
VcsDescriptor[] () { return AllVcses.getInstance(myProject).getAll(); }
getAllVcss
263,072
boolean () { return !AllVcses.getInstance(myProject).isEmpty(); }
haveVcses
263,073
VcsAnnotationLocalChangesListener () { return myProject.getService(VcsAnnotationLocalChangesListener.class); }
getAnnotationLocalChangesListener
263,074
boolean (AbstractVcs abstractVcs, VirtualFile[] files) { if (files == null) return false; for (VirtualFile file : files) { if (getVcsFor(file) != abstractVcs) { return false; } } return true; }
checkAllFilesAreUnder
263,075
VcsRoot (@Nullable FilePath file) { if (file == null || myProject.isDisposed()) return null; NewMappings.MappedRoot root = myMappings.getMappedRootFor(file); return root != null ? new VcsRoot(root.vcs, root.root) : null; }
getVcsRootObjectFor
263,076
void (@NotNull AbstractVcs vcs) { if (!ApplicationManager.getApplication().isUnitTestMode() && myMappings.haveActiveVcs(vcs.getName())) { // unlikely LOG.warn("Active vcs '" + vcs.getName() + "' is being unregistered. Remove from mappings first."); } myMappings.beingUnregistered(vcs.getName()); AllVcses.getInstance(myP...
unregisterVcs
263,077
boolean (AbstractVcs vcs) { return checkVcsIsActive(vcs.getName()); }
checkVcsIsActive
263,078
boolean (final String vcsName) { return myMappings.haveActiveVcs(vcsName); }
checkVcsIsActive
263,079
boolean () { return myMappings.hasActiveVcss(); }
hasActiveVcss
263,080
boolean () { return myMappings.isActivated(); }
areVcsesActivated
263,081
boolean () { return !myMappings.isEmpty(); }
hasAnyMappings
263,082
void (final String message, final TextAttributes attributes) { addMessageToConsoleWindow(message, new ConsoleViewContentType("", attributes)); }
addMessageToConsoleWindow
263,083
void (@Nullable String message, @NotNull ConsoleViewContentType contentType) { VcsConsoleTabService.getInstance(myProject).addMessage(message, contentType); }
addMessageToConsoleWindow
263,084
void (@Nullable VcsConsoleLine line) { VcsConsoleTabService.getInstance(myProject).addMessage(line); }
addMessageToConsoleWindow
263,085
PersistentVcsShowSettingOption (VcsConfiguration.StandardOption option) { return myOptionsAndConfirmations.getOption(option); }
getOptions
263,086
List<PersistentVcsShowSettingOption> () { return myOptionsAndConfirmations.getAllOptions(); }
getAllOptions
263,087
VcsShowSettingOption (@NotNull VcsConfiguration.StandardOption option, @NotNull AbstractVcs vcs) { final PersistentVcsShowSettingOption options = getOptions(option); options.addApplicableVcs(vcs); return options; }
getStandardOption
263,088
void (final UpdatedFiles updatedFiles, String displayActionName) { UpdateInfoTree tree = showUpdateProjectInfo(updatedFiles, displayActionName, ActionInfo.STATUS, false); if (tree != null) ViewUpdateInfoNotification.focusUpdateInfoTree(myProject, tree); }
showProjectOperationInfo
263,089
List<VcsDirectoryMapping> () { return myMappings.getDirectoryMappings(); }
getDirectoryMappings
263,090
List<VcsDirectoryMapping> (final AbstractVcs vcs) { return myMappings.getDirectoryMappings(vcs.getName()); }
getDirectoryMappings
263,091
void (@NotNull String path, @Nullable String activeVcsName) { if (myMappingsLoaded) { // ignore per-module VCS settings if the mapping table was loaded from .ipr return; } myHaveLegacyVcsConfiguration = true; myMappings.setMapping(FileUtil.toSystemIndependentName(path), activeVcsName); }
setDirectoryMapping
263,092
void (Collection<Pair<VirtualFile, AbstractVcs>> detectedRoots) { var mappings = new ArrayList<>(myMappings.getDirectoryMappings()); var knownMappedRoots = mappings.stream().map(VcsDirectoryMapping::getDirectory).collect(Collectors.toSet()); var newMappings = detectedRoots.stream() .map(pair -> new VcsDirectoryMapping(...
registerNewDirectMappings
263,093
void (@NotNull List<VcsDirectoryMapping> mappings) { myMappings.setDirectoryMappings(mappings); myMappings.cleanupMappings(); }
setAutoDirectoryMappings
263,094
void (@NotNull VcsDirectoryMapping mapping) { myMappings.removeDirectoryMapping(mapping); }
removeDirectoryMapping
263,095
void (@NotNull List<VcsDirectoryMapping> items) { myHaveLegacyVcsConfiguration = true; myMappings.setDirectoryMappings(items); }
setDirectoryMappings
263,096
void () { myMappings.scheduleMappedRootsUpdate(); }
scheduleMappedRootsUpdate
263,097
void () { myMappings.updateMappedVcsesImmediately(); }
updateMappedVcsesImmediately
263,098
void (final VirtualFile root, final Processor<? super FilePath> iterator) { VcsRootIterator.iterateVcsRoot(myProject, root, iterator); }
iterateVcsRoot
263,099
void (VirtualFile root, Processor<? super FilePath> iterator, @Nullable VirtualFileFilter directoryFilter) { VcsRootIterator.iterateVcsRoot(myProject, root, iterator, directoryFilter); }
iterateVcsRoot