Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
259,900
void (@NotNull LocalChangeList list, @NotNull List<Change> changes) { ChangeListManager.getInstance(myProject).moveChangesTo(list, changes); }
moveChangesTo
259,901
void (@NotNull LocalChangeList list, @NotNull List<? extends VirtualFile> unversionedFiles) { ScheduleForAdditionAction.Manager.addUnversionedFilesToVcsInBackground(myProject, list, unversionedFiles); }
addUnversionedFiles
259,902
VcsCurrentRevisionProxy (@NotNull VirtualFile file, @NotNull Project project) { AbstractVcs vcs = ProjectLevelVcsManager.getInstance(project).getVcsFor(file); if (vcs != null) { DiffProvider diffProvider = vcs.getDiffProvider(); if (diffProvider != null) { return new VcsCurrentRevisionProxy(diffProvider, file, project,...
create
259,903
FilePath () { return VcsUtil.getFilePath(myFile); }
getFile
259,904
VcsRevisionNumber () { try { return getVcsRevision().first; } catch(VcsException ex) { return VcsRevisionNumber.NULL; } }
getRevisionNumber
259,905
ChangeListManagerEx (@NotNull Project project) { return (ChangeListManagerEx)getInstance(project); }
getInstanceEx
259,906
ApplyPatchStatus (final Project project, final ShelvedChangeList shelvedChangeList, @Nullable final LocalChangeList targetChangeList, final ShelveChangesManager shelveManager, @NlsContexts.Label @Nullable final String leftConflictTitle, @NlsContexts.Label @Nullable final String rightConflictTitle) { VirtualFile baseDir...
doSystemUnshelve
259,907
void (@NotNull final Project project, @NotNull List<ShelvedChange> changes) { final UndoManagerImpl undoManager = (UndoManagerImpl)UndoManager.getInstance(project); if (undoManager != null && !changes.isEmpty()) { ContainerUtil.process(changes, change -> { final VirtualFile vfUnderProject = VfsUtil.findFileByIoFile(new...
markUnshelvedFilesNonUndoable
259,908
void (String projectPath, @NotNull List<ShelvedChange> shelvedChanges, @NotNull List<ShelvedBinaryFile> binaryFiles) { HashSet<File> filesToRefresh = new HashSet<>(); shelvedChanges.forEach(c -> { filesToRefresh.add(new File(projectPath + c.getBeforePath())); filesToRefresh.add(new File(projectPath + c.getAfterPath()))...
refreshFilesBeforeUnshelve
259,909
List<Change> (List<? extends Change> list) { final List<Change> result = new ArrayList<>(); final Map<FilePath, Change> map = new HashMap<>(); for (Change change : list) { if (change.getBeforeRevision() == null) { result.add(change); } else { final FilePath beforePath = ChangesUtil.getBeforePath(change); final Change e...
preprocessChangesRemoveDeletedForDuplicateMoved
259,910
boolean () { return true; }
showAllChangesForEmptySelection
259,911
DiffRequestProducer () { return myCurrentChange != null ? myCurrentChange.createProducer(getProject()) : null; }
getCurrentRequestProvider
259,912
DiffRequest (@NotNull DiffRequestProducer provider) { DiffRequest request = super.loadRequestFast(provider); return isRequestValid(request) ? request : null; }
loadRequestFast
259,913
boolean (@Nullable DiffRequest request) { if (request instanceof ContentDiffRequest) { for (DiffContent content : ((ContentDiffRequest)request).getContents()) { // We compare CurrentContentRevision by their FilePath in cache map // If file was removed and then created again - we should not reuse request with old invali...
isRequestValid
259,914
void (boolean state, boolean fromModelRefresh) { if (state) { refresh(fromModelRefresh); } else { clear(); } }
updatePreview
259,915
Project () { //noinspection ConstantConditions return super.getProject(); }
getProject
259,916
boolean () { return DiffUtil.isFocusedComponent(getProject(), getComponent()); }
isWindowFocused
259,917
void () { if (myCurrentChange != null) { myCurrentChange = null; updateRequest(); } dropCaches(); }
clear
259,918
void (boolean fromModelRefresh) { if (isDisposed()) return; List<? extends Wrapper> selectedChanges = ContainerUtil.newArrayList(iterateSelectedChanges()); if (selectedChanges.isEmpty() && showAllChangesForEmptySelection()) selectedChanges = ContainerUtil.newArrayList(iterateAllChanges()); Wrapper selectedChange = myCu...
refresh
259,919
void (@Nullable Wrapper change) { myCurrentChange = change; updateRequest(); }
setCurrentChange
259,920
Wrapper () { return myCurrentChange; }
getCurrentChange
259,921
boolean () { List<? extends Wrapper> allChanges = toListIfNotMany(iterateAllChanges(), true); return allChanges == null || allChanges.size() > 1; }
canNavigate
259,922
void (@NotNull Wrapper change) { setCurrentChange(change); selectChange(change); }
onSelected
259,923
boolean (boolean fromUpdate) { PrevNextDifferenceIterable strategy = getSelectionStrategy(fromUpdate); return strategy != null && strategy.canGoNext(); }
hasNextChange
259,924
boolean (boolean fromUpdate) { PrevNextDifferenceIterable strategy = getSelectionStrategy(fromUpdate); return strategy != null && strategy.canGoPrev(); }
hasPrevChange
259,925
void (boolean fromDifferences) { goToNextChangeImpl(fromDifferences, () -> { Objects.requireNonNull(getSelectionStrategy(false)).goNext(); }); }
goToNextChange
259,926
void (boolean fromDifferences) { goToPrevChangeImpl(fromDifferences, () -> { Objects.requireNonNull(getSelectionStrategy(false)).goPrev(); }); }
goToPrevChange
259,927
boolean () { return true; }
isNavigationEnabled
259,928
PrevNextDifferenceIterable (boolean fromUpdate) { if (myCurrentChange == null) return null; List<? extends Wrapper> selectedChanges = toListIfNotMany(iterateSelectedChanges(), fromUpdate); if (selectedChanges == null) return DumbPrevNextDifferenceIterable.INSTANCE; if (selectedChanges.size() > 1) { return new ChangesNa...
getSelectionStrategy
259,929
boolean () { if (myCurrentChange == null) return false; int index = myChanges.indexOf(myCurrentChange); return index == -1 || index < myChanges.size() - 1; }
canGoNext
259,930
boolean () { if (myCurrentChange == null) return false; int index = myChanges.indexOf(myCurrentChange); return index == -1 || index > 0; }
canGoPrev
259,931
void () { int index = myChanges.indexOf(myCurrentChange); if (index != -1) { select(myChanges.get(index + 1)); } else { select(myFallback); } }
goNext
259,932
void () { int index = myChanges.indexOf(myCurrentChange); if (index != -1) { select(myChanges.get(index - 1)); } else { select(myFallback); } }
goPrev
259,933
void (@NotNull Wrapper change) { myCurrentChange = change; if (myUpdateSelection) selectChange(change); }
select
259,934
boolean () { return true; }
canGoPrev
259,935
boolean () { return true; }
canGoNext
259,936
void () { throw new UnsupportedOperationException(); }
goPrev
259,937
void () { throw new UnsupportedOperationException(); }
goNext
259,938
boolean (Object o) { if (this == o) return true; if (getClass() != o.getClass()) return false; Wrapper wrapper = (Wrapper)o; return Comparing.equal(getUserObject(), wrapper.getUserObject()); }
equals
259,939
int () { return getUserObject().hashCode(); }
hashCode
259,940
Object () { return change; }
getUserObject
259,941
FilePath () { return ChangesUtil.getFilePath(change); }
getFilePath
259,942
FileStatus () { return change.getFileStatus(); }
getFileStatus
259,943
DiffRequestProducer (@Nullable Project project) { if (change.getBeforeRevision() instanceof FakeRevision || change.getAfterRevision() instanceof FakeRevision) { LoadingDiffRequest request = new LoadingDiffRequest(ChangeDiffRequestProducer.getRequestTitle(change)); return new ErrorChangeRequestProducer(change, request);...
createProducer
259,944
boolean (Object o) { if (this == o) return true; if (getClass() != o.getClass()) return false; ChangeWrapper wrapper = (ChangeWrapper)o; return ChangeListChange.HASHING_STRATEGY.equals(wrapper.change, change) && Objects.equals(wrapper.nodeTag, nodeTag); }
equals
259,945
int () { return Objects.hash(change, nodeTag); }
hashCode
259,946
FilePath () { return path; }
getFilePath
259,947
FileStatus () { return FileStatus.UNKNOWN; }
getFileStatus
259,948
Object () { return path; }
getUserObject
259,949
DiffRequestProducer (@Nullable Project project) { return UnversionedDiffRequestProducer.create(project, path); }
createProducer
259,950
String () { return ChangeDiffRequestProducer.getRequestTitle(myChange); }
getName
259,951
void () { }
scheduleRefresh
259,952
void () { }
resetViewImmediatelyAndRefreshLater
259,953
void (VirtualFile vFile) { }
selectFile
259,954
void (@NotNull List<? extends Change> changes) { }
selectChanges
259,955
void (String text, boolean isError) { }
updateProgressText
259,956
void (boolean b) { }
setBusy
259,957
void (@NotNull String groupingKey) { }
setGrouping
259,958
void () { }
refreshImmediately
259,959
boolean () { return false; }
isAllowExcludeFromCommit
259,960
void () { myMap.values().forEach(FilePathHolder::cleanAll); myMap.clear(); }
cleanAll
259,961
void (@NotNull VcsDirtyScope scope) { AbstractVcs vcs = scope.getVcs(); FilePathHolder holder = myMap.get(vcs); if (holder != null) { holder.cleanUnderScope(scope); } }
cleanUnderScope
259,962
void (@NotNull CompositeFilePathHolder holder) { for (Map.Entry<AbstractVcs, FilePathHolder> entry : holder.myMap.entrySet()) { myMap.put(entry.getKey(), (FilePathHolder)entry.getValue().copy()); } }
copyFrom
259,963
void (@NotNull AbstractVcs vcs, @NotNull FilePath file) { myMap.get(vcs).addFile(file); }
addFile
259,964
boolean () { return myMap.values().stream() .anyMatch(holder -> holder instanceof VcsManagedFilesHolder && ((VcsManagedFilesHolder)holder).isInUpdatingMode()); }
isInUpdatingMode
259,965
boolean (@NotNull FilePath file, @NotNull VcsRoot vcsRoot) { FilePathHolder holder = myMap.get(vcsRoot.getVcs()); return holder != null && holder.containsFile(file, vcsRoot.getPath()); }
containsFile
259,966
Collection<FilePath> () { HashSet<FilePath> result = new HashSet<>(); for (FilePathHolder fileHolder : myMap.values()) { result.addAll(fileHolder.values()); } return result; }
getFiles
259,967
void (@NotNull AbstractVcs vcs) { if (!myMap.containsKey(vcs)) { myMap.put(vcs, createHolderForVcs(myProject, vcs)); } for (FileHolder fileHolder : myMap.values()) { fileHolder.notifyVcsStarted(vcs); } }
notifyVcsStarted
259,968
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CompositeFilePathHolder holder = (CompositeFilePathHolder)o; return Objects.equals(myMap, holder.myMap); }
equals
259,969
int () { return Objects.hash(myMap); }
hashCode
259,970
FilePathHolder (@NotNull Project project, @NotNull AbstractVcs vcs) { VcsManagedFilesHolder.Provider provider = VcsManagedFilesHolder.VCS_UNVERSIONED_FILES_HOLDER_EP .findFirstSafe(project, ep -> ep.getVcs().equals(vcs)); if (provider != null) { return provider.createHolder(); } else { return new FilePathHolderImpl(pro...
createHolderForVcs
259,971
UnversionedFilesCompositeHolder () { UnversionedFilesCompositeHolder result = new UnversionedFilesCompositeHolder(myProject); result.copyFrom(this); return result; }
copy
259,972
FilePathHolder (@NotNull Project project, @NotNull AbstractVcs vcs) { VcsManagedFilesHolder.Provider provider = VcsManagedFilesHolder.VCS_IGNORED_FILES_HOLDER_EP .findFirstSafe(project, ep -> ep.getVcs().equals(vcs)); if (provider != null) { return provider.createHolder(); } else { return new RecursiveFilePathHolderImp...
createHolderForVcs
259,973
IgnoredFilesCompositeHolder () { IgnoredFilesCompositeHolder result = new IgnoredFilesCompositeHolder(myProject); result.copyFrom(this); return result; }
copy
259,974
void () { LOG.debug("starting"); try { LOG.debug("saving documents, blocking project autosync"); saveAndBlockInAwt(); try { LOG.debug("freezing the ChangeListManager"); freeze(); LOG.debug("running the operation"); myRunnable.run(); LOG.debug("operation completed."); } finally { LOG.debug("unfreezing the ChangeListMana...
execute
259,975
void () { ApplicationManager.getApplication().invokeAndWait(() -> { StoreReloadManager.Companion.getInstance(myProject).blockReloadingProjectOnExternalChanges(); FileDocumentManager.getInstance().saveAllDocuments(); SaveAndSyncHandler saveAndSyncHandler = SaveAndSyncHandler.getInstance(); saveAndSyncHandler.blockSaveOn...
saveAndBlockInAwt
259,976
void () { ApplicationManager.getApplication().invokeAndWait(() -> { StoreReloadManager.Companion.getInstance(myProject).unblockReloadingProjectOnExternalChanges(); SaveAndSyncHandler saveAndSyncHandler = SaveAndSyncHandler.getInstance(); saveAndSyncHandler.unblockSaveOnFrameDeactivation(); saveAndSyncHandler.unblockSyn...
unblockInAwt
259,977
void () { BackgroundTaskUtil.syncPublisher(myProject, Listener.TOPIC).onFreeze(); myChangeListManager.freeze(VcsBundle.message("local.changes.freeze.message", myOperationTitle)); }
freeze
259,978
void () { BackgroundTaskUtil.syncPublisher(myProject, Listener.TOPIC).onUnfreeze(); myChangeListManager.unfreeze(); }
unfreeze
259,979
void () { debug("Initialized"); myStarted = true; }
initialized
259,980
boolean () { return myStopped; }
isStopped
259,981
void () { schedule(false); }
schedule
259,982
void (boolean withFastTrack) { synchronized (myLock) { if (!myStarted && ApplicationManager.getApplication().isUnitTestMode()) return; if (myStopped) return; if (myRequestSubmitted) return; myRequestSubmitted = true; if (withFastTrack) { FastTrackRunnable fastRunnable = new FastTrackRunnable(); myScheduler.submit(fastR...
schedule
259,983
void () { synchronized (myLock) { myStopped = true; } }
pause
259,984
void () { synchronized (myLock) { myStopped = false; myRequestSubmitted = false; myRequestRunning = false; } schedule(); }
forceGo
259,985
void () { synchronized (myLock) { myStopped = false; } schedule(); }
go
259,986
void () { debug("Stop called"); List<Runnable> waiters; synchronized (myLock) { myStopped = true; waiters = new ArrayList<>(myWaitingUpdateCompletionQueue); myWaitingUpdateCompletionQueue.clear(); } debug("Stop - calling runnables"); runWaiters(waiters); debug("Stop - finished"); }
stop
259,987
void () { while (true) { final Semaphore semaphore = new Semaphore(); synchronized (myLock) { if (!myRequestSubmitted && !myRequestRunning) { return; } if (!myRequestRunning) { myScheduler.submit(new RefreshRunnable()); } semaphore.down(); myWaitingUpdateCompletionSemaphores.add(semaphore); } if (!semaphore.waitFor(100...
waitUntilRefreshed
259,988
void () { synchronized (myLock) { for (Semaphore semaphore : myWaitingUpdateCompletionSemaphores) { semaphore.up(); } myWaitingUpdateCompletionSemaphores.clear(); } }
freeSemaphores
259,989
void (@NotNull Runnable afterUpdate, @NotNull InvokeAfterUpdateMode mode, @Nullable @Nls String title) { debug("invokeAfterUpdate called"); InvokeAfterUpdateCallback.Callback callback = InvokeAfterUpdateCallback.create(myProject, mode, afterUpdate, title); boolean stopped; synchronized (myLock) { stopped = myStopped; i...
invokeAfterUpdate
259,990
boolean () { return !myIgnoreBackgroundOperation && ProjectLevelVcsManager.getInstance(myProject).isBackgroundVcsOperationRunning(); }
checkHeavyOperations
259,991
boolean () { return !myStarted || !StartupManagerEx.getInstanceEx(myProject).startupActivityPassed(); }
checkLifeCycle
259,992
void () { List<Runnable> copy; synchronized (myLock) { if (!myRequestSubmitted) return; myRequestSubmitted = false; LOG.assertTrue(!myRequestRunning); if (myStopped) { debug("Stopped", this); return; } copy = new ArrayList<>(myWaitingUpdateCompletionQueue); myWaitingUpdateCompletionQueue.clear(); } debug("Before callba...
run
259,993
String () { return "CLM Refresh Fast-Track runnable@" + hashCode(); }
toString
259,994
void () { final List<Runnable> copy = new ArrayList<>(); try { synchronized (myLock) { if (!myRequestSubmitted) return; myRequestSubmitted = false; LOG.assertTrue(!myRequestRunning); myRequestRunning = true; if (myStopped) { debug("Stopped", this); return; } if (checkLifeCycle() || checkHeavyOperations()) { debug("Resc...
run
259,995
String () { return "CLM Refresh runnable@" + hashCode(); }
toString
259,996
void (boolean ignoreBackgroundOperation) { myIgnoreBackgroundOperation = ignoreBackgroundOperation; debug("Ignore background operations: " + ignoreBackgroundOperation); }
setIgnoreBackgroundOperation
259,997
void (@NotNull String text, @NotNull Runnable runnable) { if (LOG.isDebugEnabled()) { LOG.debug(String.format("%s. Runnable: %s, Project: %s", text, runnable, myProject)); } }
debug
259,998
void (@NotNull String text) { if (LOG.isDebugEnabled()) { LOG.debug(String.format("%s. Project: %s", text, myProject)); } }
debug
259,999
void (List<? extends Runnable> copy) { // do not run under lock for (Runnable runnable : copy) { try { runnable.run(); } catch (ProcessCanceledException ignore) { } catch (Throwable e) { LOG.error(e); } } }
runWaiters