Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
285,600
void (boolean trackUiActivity) { if (myTrackUiActivity && !trackUiActivity) { finishActivity(); } myTrackUiActivity = trackUiActivity; }
setTrackUiActivity
285,601
void () { if (!myTrackUiActivity) return; UiActivityMonitor.getInstance().addActivity(getActivityId(), getModalityState()); }
startActivity
285,602
void () { if (!myTrackUiActivity) return; UiActivityMonitor.getInstance().removeActivity(getActivityId()); }
finishActivity
285,603
UiActivity () { if (myUiActivity == null) { myUiActivity = new UiActivity.AsyncBgOperation("UpdateQueue:" + myName + hashCode()); } return myUiActivity; }
getActivityId
285,604
boolean () { return false; }
isDisposed
285,605
boolean () { return false; }
isExpired
285,606
boolean () { return myProcessed; }
wasProcessed
285,607
void () { myProcessed = true; }
setProcessed
285,608
boolean () { return myExecuteInWriteAction; }
executeInWriteAction
285,609
String () { return super.toString() + " Objects: " + Arrays.asList(getEqualityObjects()); }
toString
285,610
int () { return myPriority; }
getPriority
285,611
boolean (Update update) { ChildContext otherChildContext = update.myChildContext; if (myChildContext == null && otherChildContext == null) { return canEat(update); } else if (myChildContext != null && otherChildContext != null) { var thisSkeleton = ThreadContext.getContextSkeleton(myChildContext.getContext()); var otherSkeleton = ThreadContext.getContextSkeleton(otherChildContext.getContext()); return thisSkeleton.equals(otherSkeleton) && canEat(update); } else { return false; } }
actuallyCanEat
285,612
void () { if (myChildContext == null) { run(); } else { try (AccessToken ignored = ThreadContext.installThreadContext(myChildContext.getContext(), true)) { myChildContext.runAsCoroutine(this); } } }
runUpdate
285,613
boolean (@NotNull Update update) { return false; }
canEat
285,614
void () { myRejected = true; if (myChildContext != null) { Job job = myChildContext.getJob(); if (job != null) { job.cancel(null); } } }
setRejected
285,615
boolean () { return myRejected; }
isRejected
285,616
Update (@NonNls Object identity, @NotNull Runnable runnable) { return new Update(identity) { @Override public void run() { runnable.run(); } }; }
create
285,617
void () { runnable.run(); }
run
285,618
DownloadableFileService () { return ApplicationManager.getApplication().getService(DownloadableFileService.class); }
getInstance
285,619
void (@NotNull String errorMessage) { }
onError
285,620
FileStatus (NavigationItem item) { if (item instanceof PsiElement) { return getPsiElementFileStatus((PsiElement)item); } if (item instanceof AbstractTreeNode) { return ((AbstractTreeNode<?>) item).getFileStatus(); } if (item instanceof PsiElementNavigationItem) { PsiElement target = ((PsiElementNavigationItem) item).getTargetElement(); if (target != null) return getPsiElementFileStatus(target); } return FileStatus.NOT_CHANGED; }
get
285,621
FileStatus (@NotNull PsiElement psiElement) { if (!psiElement.isPhysical()) return FileStatus.NOT_CHANGED; PsiFile contFile = psiElement.getContainingFile(); if (contFile == null) return FileStatus.NOT_CHANGED; VirtualFile vFile = contFile.getVirtualFile(); return vFile == null ? FileStatus.NOT_CHANGED : FileStatusManager.getInstance(psiElement.getProject()).getStatus(vFile); }
getPsiElementFileStatus
285,622
LibrariesDownloadConnectionService () { return ourInstance; }
getInstance
285,623
String () { return myDefaultServiceUrl; }
getDefaultServiceUrl
285,624
String () { final String serviceUrl = getSettingValue(SERVICE_URL_ATTR_NAME); return serviceUrl == null ? getDefaultServiceUrl() : serviceUrl; }
getServiceUrl
285,625
String (@NotNull String attributeValue) { if (myAttributesMap == null || myAttributesMap.isEmpty()) { myAttributesMap = readSettings(getAttributeNames()); } return myAttributesMap != null ? myAttributesMap.get(attributeValue) : null; }
getSettingValue
285,626
URL (@NotNull String id) { final String serviceUrl = LibrariesDownloadConnectionService.getInstance().getServiceUrl(); if (StringUtil.isNotEmpty(serviceUrl)) { try { final String url = serviceUrl + "/" + id + "/"; IdeUiService.getInstance().prepareURL(url); return new URL(url); } catch (MalformedURLException e) { LOG.error(e); } catch (IOException e) { // no route to host, unknown host, etc. } } return null; }
createVersionsUrl
285,627
Artifacts (@Nullable URL url) { if (url == null) return null; Artifacts allArtifacts = null; try { allArtifacts = XmlSerializer.deserialize(url, Artifacts.class); } catch (SerializationException e) { final Throwable cause = e.getCause(); if (!(cause instanceof IOException)) { LOG.error(e); } } return allArtifacts; }
deserialize
285,628
Artifact (@NotNull final String versionId, final URL @NotNull ... urls) { return findVersion(getVersions(urls), versionId); }
findVersion
285,629
Artifact (Artifact @Nullable [] versions, @NotNull final String versionId) { return versions == null ? null : ContainerUtil.find(versions, springVersion -> versionId.equals(springVersion.getVersion())); }
findVersion
285,630
List<LibraryInfo> (final String urlPrefix, ArtifactItem @NotNull [] jars) { return ContainerUtil.mapNotNull(jars, artifactItem -> { String downloadUrl = artifactItem.getUrl(); if (urlPrefix != null) { if (downloadUrl == null) { downloadUrl = artifactItem.getName(); } if (!downloadUrl.startsWith("http://")) { downloadUrl = urlPrefix + downloadUrl; } } return new LibraryInfo(artifactItem.getName(), downloadUrl, downloadUrl, artifactItem.getMD5(), artifactItem.getRequiredClasses()); }); }
convert
285,631
String () { return myFqn; }
getFqn
285,632
Artifact[] () { return myVersions; }
getArtifacts
285,633
String () { return myName == null ? getNameFromUrl() : myName; }
getName
285,634
String () { final int index = myUrl.lastIndexOf('/'); return index == -1 ? myUrl : myUrl.substring(index + 1); }
getNameFromUrl
285,635
boolean () { return myOptional; }
isOptional
285,636
String () { return mySourceUrl; }
getSourceUrl
285,637
String () { return myDocUrl; }
getDocUrl
285,638
String () { return myUrl; }
getUrl
285,639
String () { return myMD5; }
getMD5
285,640
String () { return myName; }
toString
285,641
String[] () { if (myRequiredClasses == null) return ArrayUtilRt.EMPTY_STRING_ARRAY; final List<String> classes = ContainerUtil.mapNotNull(myRequiredClasses, requiredClass -> requiredClass.getFqn()); return ArrayUtilRt.toStringArray(classes); }
getRequiredClasses
285,642
RequiredFrameworkVersion () { return myRequiredFrameworkVersion; }
getRequiredFrameworkVersion
285,643
String () { return myName; }
getName
285,644
String () { return myGroup; }
getGroup
285,645
ArtifactItem[] () { return myItems; }
getItems
285,646
String () { return myVersion; }
getVersion
285,647
String () { return myUrlPrefix; }
getUrlPrefix
285,648
String () { return myVersion; }
toString
285,649
String () { return myId; }
getId
285,650
String () { return myPresentableName; }
getPresentableName
285,651
String[] () { return myMirrors; }
getMirrors
285,652
String () { return myMirrors[0]; }
getDefaultMirror
285,653
boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final RemoteRepositoryInfo that = (RemoteRepositoryInfo)o; return myId.equals(that.myId); }
equals
285,654
int () { return myId.hashCode(); }
hashCode
285,655
String () { return myName; }
getName
285,656
String[] () { return myRequiredClasses; }
getRequiredClasses
285,657
LibraryDownloadInfo () { return myDownloadInfo; }
getDownloadingInfo
285,658
boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final LibraryInfo that = (LibraryInfo)o; if (myDownloadInfo != null ? !myDownloadInfo.equals(that.myDownloadInfo) : that.myDownloadInfo != null) return false; if (!myName.equals(that.myName)) return false; if (!Arrays.equals(myRequiredClasses, that.myRequiredClasses)) return false; return true; }
equals
285,659
int () { int result; result = (myDownloadInfo != null ? myDownloadInfo.hashCode() : 0); result = 31 * result + myName.hashCode(); result = 31 * result + Arrays.hashCode(myRequiredClasses); return result; }
hashCode
285,660
String () { return getName(); }
toString
285,661
String () { return myMd5; }
getMd5
285,662
String () { return myRemoteRepository != null ? getDownloadUrl(myRemoteRepository.getDefaultMirror()) : myRelativeDownloadUrl; }
getDownloadUrl
285,663
String (String mirror) { return mirror + myRelativeDownloadUrl; }
getDownloadUrl
285,664
RemoteRepositoryInfo () { return myRemoteRepository; }
getRemoteRepository
285,665
String () { return myFileNamePrefix; }
getFileNamePrefix
285,666
String () { return myFileNameSuffix; }
getFileNameSuffix
285,667
String () { return myFileNamePrefix + myFileNameSuffix; }
getFileName
285,668
String () { return myPresentableUrl != null ? myPresentableUrl : myRemoteRepository != null ? myRemoteRepository.getDefaultMirror() : myRelativeDownloadUrl; }
getPresentableUrl
285,669
String (String mirror) { return myPresentableUrl != null ? myPresentableUrl : mirror; }
getPresentableUrl
285,670
boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final LibraryDownloadInfo that = (LibraryDownloadInfo)o; if (!myFileNamePrefix.equals(that.myFileNamePrefix)) return false; if (!myFileNameSuffix.equals(that.myFileNameSuffix)) return false; if (!Objects.equals(myPresentableUrl, that.myPresentableUrl)) return false; if (!myRelativeDownloadUrl.equals(that.myRelativeDownloadUrl)) return false; if (!Comparing.equal(myRemoteRepository, that.myRemoteRepository)) return false; return true; }
equals
285,671
int () { int result = myRemoteRepository != null ? myRemoteRepository.hashCode() : 0; result = 31 * result + (myRelativeDownloadUrl != null ? myRelativeDownloadUrl.hashCode() : 0); result = 31 * result + (myFileNamePrefix != null ? myFileNamePrefix.hashCode() : 0); result = 31 * result + (myFileNameSuffix != null ? myFileNameSuffix.hashCode() : 0); result = 31 * result + (myPresentableUrl != null ? myPresentableUrl.hashCode() : 0); return result; }
hashCode
285,672
String () { return myName; }
toString
285,673
TextAttributes () { if (myTextAttributesKey != null) { return EditorColorsManager.getInstance().getGlobalScheme().getAttributes(myTextAttributesKey); } return myTextAttributes; }
getAttributes
285,674
TextAttributesKey () { return myTextAttributesKey; }
getAttributesKey
285,675
ConsoleViewContentType (@NotNull Key<?> key, @NotNull TextAttributesKey attributesKey) { ConsoleViewContentType type = new ConsoleViewContentType(key.toString(), attributesKey); registerNewConsoleViewType(key, type); return type; }
registerNewConsoleViewType
285,676
void (final ProcessHandler processHandler, Project project, String message) { ProcessTerminatedListener previousListener = processHandler.getUserData(KEY); if (previousListener != null) { processHandler.removeProcessListener(previousListener); if (project == null) { project = previousListener.myProject; } } ProcessTerminatedListener listener = new ProcessTerminatedListener(project, message); processHandler.addProcessListener(listener); processHandler.putUserData(KEY, listener); }
attach
285,677
void (final ProcessHandler processHandler, final Project project) { String message = IdeCoreBundle.message("finished.with.exit.code.text.message", EXIT_CODE_ENTRY); attach(processHandler, project, "\n" + message + "\n"); }
attach
285,678
void (final ProcessHandler processHandler) { attach(processHandler, null); }
attach
285,679
void (@NotNull ProcessEvent event) { ProcessHandler processHandler = event.getProcessHandler(); processHandler.removeProcessListener(this); @NlsSafe String message = myProcessFinishedMessage.replaceAll(EXIT_CODE_REGEX, stringifyExitCode(event.getExitCode())); processHandler.notifyTextAvailable(message, ProcessOutputTypes.SYSTEM); if (myProject != null) { ApplicationManager.getApplication().invokeLater(() -> StatusBar.Info.set(message, myProject), myProject.getDisposed()); } }
processTerminated
285,680
String (int exitCode) { return stringifyExitCode(OS.CURRENT, exitCode); }
stringifyExitCode
285,681
String (@NotNull OS os, int exitCode) { StringBuilder result = new StringBuilder(); result.append(exitCode); if (os.getPlatform() == Platform.WINDOWS && exitCode >= 0xC0000000 && exitCode < 0xD0000000) { // Quote from http://support.microsoft.com/kb/308558: // If the result code has the "C0000XXX" format, the task did not complete successfully (the "C" indicates an error condition). // The most common "C" error code is "0xC000013A: The application terminated as a result of a CTRL+C". result.append(" (0x").append(StringUtil.toUpperCase(Integer.toHexString(exitCode))); if (exitCode == 0xC000013A) { result.append(": interrupted by Ctrl+C"); } result.append(')'); } else if (os.getPlatform() == Platform.UNIX) { boolean isDarwin = os == OS.macOS; var signal = UnixSignal.fromExitCode(isDarwin, exitCode); if (signal != null) { result.append(" (interrupted by signal ").append(signal.getSignalNumber(isDarwin)).append(":").append(signal.name()).append(')'); } } return result.toString(); }
stringifyExitCode
285,682
record (int exitCode, @Nullable @NlsContexts.DialogMessage String message) { public static final CliResult OK = new CliResult(0, null); @Override public String toString() { return message == null ? String.valueOf(exitCode) : exitCode + ": " + message; } }
CliResult
285,683
String () { return message == null ? String.valueOf(exitCode) : exitCode + ": " + message; }
toString
285,684
void (@NotNull @NlsSafe String name) { myName = name; }
setName
285,685
void (List<String> projects) { myProjects = projects; }
setProjects
285,686
String () { return null; }
getProjectPaths
285,687
void (String projectPaths) { ArrayList<String> paths = new ArrayList<>(StringUtil.split(projectPaths, File.pathSeparator)); paths.forEach(this::addProject); modCounter.incrementAndGet(); }
setProjectPaths
285,688
void (@SystemIndependent String path) { if (!myProjects.contains(path)) { myProjects.add(path); modCounter.incrementAndGet(); } }
addProject
285,689
boolean (@SystemIndependent String path) { if (!myProjects.contains(path)) { return false; } List<String> existing = new ArrayList<>(myProjects); int index = existing.indexOf(path); if (index <= 0) { return false; } List<String> projects = new ArrayList<>(existing.size()); projects.add(path); projects.addAll(existing.subList(0, index)); projects.addAll(existing.subList(index + 1, existing.size())); save(projects); modCounter.incrementAndGet(); return true; }
markProjectFirst
285,690
void (@NotNull List<String> projects) { //myProjectPaths = String.join(File.pathSeparator, projects); myProjects = projects; }
save
285,691
List<String> () { return myProjects; }
getProjects
285,692
boolean (@SystemIndependent String path) { modCounter.incrementAndGet(); return myProjects.remove(path); }
removeProject
285,693
boolean () { return myExpanded; }
isExpanded
285,694
void (boolean expanded) { myExpanded = expanded; modCounter.incrementAndGet(); }
setExpanded
285,695
boolean () { return myTutorials; }
isTutorials
285,696
void (boolean tutorials) { myTutorials = tutorials; modCounter.incrementAndGet(); }
setTutorials
285,697
boolean () { return myBottomGroup; }
isBottomGroup
285,698
void (boolean bottomGroup) { myBottomGroup = bottomGroup; modCounter.incrementAndGet(); }
setBottomGroup
285,699
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ProjectGroup group = (ProjectGroup)o; if (!myName.equals(group.myName)) return false; return true; }
equals