Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
59,200
Project () { return getProperties().getProject(); }
getProject
59,201
GradleConsoleProperties () { return (GradleConsoleProperties)getExecutionConsole().getProperties(); }
getProperties
59,202
boolean () { return false; }
isSuite
59,203
SMTestProxy (@Nullable String parentTestId) { var rootNode = getResultsViewer().getTestsRootNode(); if (StringUtil.isEmpty(parentTestId)) { return rootNode; } var node = findTestProxy(parentTestId); if (node == null) { return rootNode; } return node; }
findParentTestProxy
59,204
void (final String proxyId, SMTestProxy testProxy) { getExecutionConsole().getTestsMap().put(proxyId, testProxy); }
registerTestProxy
59,205
boolean () { return GradleConsoleProperties.SHOW_INTERNAL_TEST_NODES.value(getProperties()); }
showInternalTestNodes
59,206
GradleSMTestProxy ( @Nullable String parentTestId, @NotNull String suiteName, @NotNull String className, @Nullable String methodName, @NotNull String displayName ) { var project = getProject(); var isSuite = isSuite(); var parentTestProxy = findParentTestProxy(parentTestId); var eventConverter = new GradleTestEventConv...
createTestProxy
59,207
void (@NotNull ExternalSystemProgressEvent<? extends TestOperationDescriptor> testEvent) { var messageEvent = (ExternalSystemMessageEvent<? extends TestOperationDescriptor>)testEvent; var parentTestId = messageEvent.getParentEventId(); var isStdOut = messageEvent.isStdOut(); var message = StringUtil.notNullize(messageE...
process
59,208
void (@Nullable String parentTestId, @NotNull String message, boolean isStdOut) { var testProxy = findParentTestProxy(parentTestId); var name = testProxy.getName(); var event = new TestOutputEvent(name, message, isStdOut); var destination = isStdOut ? ProcessOutputTypes.STDOUT : ProcessOutputTypes.STDERR; testProxy.add...
doProcess
59,209
void (@NotNull ExternalSystemProgressEvent<? extends TestOperationDescriptor> testEvent) { // TODO not yet implemented }
process
59,210
String () { return value; }
value
59,211
TestEventType (String v) { for (TestEventType c : TestEventType.values()) { if (c.value.equals(v)) { return c; } } return UNKNOWN_EVENT; }
fromValue
59,212
String () { return value; }
value
59,213
TestEventResult (String v) { for (TestEventResult c : TestEventResult.values()) { if (c.value.equals(v)) { return c; } } return UNKNOWN_RESULT; }
fromValue
59,214
TestEventResult (OperationResult result) { if (result instanceof SuccessResult) { return SUCCESS; } else if (result instanceof FailureResult) { return FAILURE; } else if (result instanceof SkippedResult) { return SKIPPED; } else { return UNKNOWN_RESULT; } }
fromOperationResult
59,215
Set<String> () { return buildTasksMap.keySet(); }
getRootPaths
59,216
List<Module> () { return ContainerUtil.concat(modulesToBuild, modulesOfResourcesToBuild, modulesOfFiles); }
getAffectedModules
59,217
void (String rootProjectPath, VersionSpecificInitScript... initScript) { Collection<VersionSpecificInitScript> versionSpecificInitScripts = versionedInitScripts.getModifiable(rootProjectPath); Collections.addAll(versionSpecificInitScripts, initScript); }
addInitScripts
59,218
Collection<VersionSpecificInitScript> (String rootProjectPath) { return versionedInitScripts.get(rootProjectPath); }
getVersionedInitScripts
59,219
Collection<String> (String rootProjectPath) { return initScripts.get(rootProjectPath); }
getInitScripts
59,220
boolean (String rootProjectPath) { return getTasksToExecute(rootProjectPath).iterator().hasNext(); }
containsTasksToExecuteFor
59,221
ExternalSystemTaskExecutionSettings (String rootProjectPath) { ExternalSystemTaskExecutionSettings settings = new ExternalSystemTaskExecutionSettings(); File projectFile = new File(rootProjectPath); final String projectName; if (projectFile.isFile()) { projectName = projectFile.getParentFile().getName(); } else { proje...
build
59,222
Iterable<String> (String rootProjectPath) { return buildTasksMap.get(rootProjectPath); }
getTasksToExecute
59,223
List<Module> (@Nullable Collection<? extends ProjectTask> projectTasks, @NotNull MultiMap<String, String> buildTasksMap, @NotNull MultiMap<String, String> initScripts, @NotNull MultiMap<String, VersionSpecificInitScript> versionedInitScripts) { if (ContainerUtil.isEmpty(projectTasks)) return Collections.emptyList(); Li...
addModulesBuildTasks
59,224
String (@NotNull String taskPrefix, @NotNull String taskSuffix, @Nullable String sourceSetName) { if (Strings.isEmpty(sourceSetName)) sourceSetName = "main"; return new ClassDirectoryBinaryNamingScheme(sourceSetName).getTaskName(taskPrefix, taskSuffix); }
getTaskName
59,225
void (@Nullable Collection<? extends ProjectTask> tasks, @NotNull MultiMap<String, String> buildTasksMap, @NotNull MultiMap<String, VersionSpecificInitScript> versionedInitScripts) { if (ContainerUtil.isEmpty(tasks)) return; for (ProjectTask projectTask : tasks) { if (!(projectTask instanceof ProjectModelBuildTask<?> p...
addArtifactsBuildTasks
59,226
boolean (@NotNull String taskPathPrefix, @NotNull String gradleTask, @NotNull List<String> moduleTasks, @NotNull Collection<String> buildRootTasks) { if (moduleTasks.contains(gradleTask)) { buildRootTasks.add(taskPathPrefix + gradleTask); return true; } return false; }
addIfContains
59,227
void (@NotNull List<Module> affectedModules, @NotNull ModuleBuildTask moduleBuildTask) { Module module = moduleBuildTask.getModule(); if (moduleBuildTask.isIncludeDependentModules()) { OrderEnumerator enumerator = ModuleRootManager.getInstance(module).orderEntries().recursively(); if (!moduleBuildTask.isIncludeRuntimeD...
collectAffectedModules
59,228
String (File outputPathsFile) { String path = FileUtil.toCanonicalPath(outputPathsFile.getAbsolutePath()); return String.format(InitScriptResourceHolder.INIT_SCRIPT_TEMPLATE, path); }
getInitScript
59,229
String (File outputPathsFile) { String path = FileUtil.toCanonicalPath(outputPathsFile.getAbsolutePath()); return String.format(InitScriptResourceHolder.INIT_SCRIPT_TEMPLATE_USING_SERVICE, path); }
getInitScriptUsingService
59,230
void (ProjectTaskContext context, @Nullable File outputPathsFile) { if (outputPathsFile == null || !context.isCollectionOfGeneratedFilesEnabled()) { return; } Collection<GradleImprovedHotswapOutput> outputs = GradleImprovedHotswapOutput.parseOutputFile(outputPathsFile); outputs.stream() .filter(output -> !StringUtil.is...
processInitScriptOutput
59,231
boolean () { return Registry.is("gradle.improved.hotswap.detection", false); }
isEnabled
59,232
String (String path) { try ( InputStream stream = GradleProjectTaskRunner.class.getResourceAsStream(path); Reader reader = new InputStreamReader(stream, StandardCharsets.UTF_8)) { return StreamUtil.readText(reader); } catch (IOException e) { throw new IllegalStateException(String.format("Could not load resource '%s'", ...
loadResource
59,233
Promise<Result> (@NotNull Project project, @NotNull ProjectTaskContext context, ProjectTask @NotNull ... tasks) { AsyncPromise<Result> resultPromise = new AsyncPromise<>(); TasksExecutionSettingsBuilder executionSettingsBuilder = new TasksExecutionSettingsBuilder(project, tasks); Set<String> rootPaths = executionSettin...
run
59,234
void () { handle(true); }
onSuccess
59,235
void () { handle(false); }
onFailure
59,236
void (boolean success) { int successes = success ? successCounter.incrementAndGet() : successCounter.get(); int errors = success ? errorCounter.get() : errorCounter.incrementAndGet(); if (successes + errors == rootPaths.size()) { if (!project.isDisposed()) { try { if (GradleImprovedHotswapDetection.isEnabled()) { Gradl...
handle
59,237
File (@NotNull ProjectTaskContext context) { File outputFile = null; if (context.isCollectionOfGeneratedFilesEnabled()) { try { outputFile = FileUtil.createTempFile("output", ".paths", true); } catch (IOException e) { LOG.warn("Can not create temp file to collect Gradle tasks output paths", e); } } return outputFile; }
createTempOutputPathsFileIfNeeded
59,238
Set<String> (@Nullable File outputPathsFile, @NotNull ProjectTaskContext context, @NotNull TasksExecutionSettingsBuilder executionSettingsBuilder) { Set<String> affectedRoots = null; if (outputPathsFile != null && context.isCollectionOfGeneratedFilesEnabled()) { try { String content = FileUtil.loadFile(outputPathsFile)...
getAffectedOutputRoots
59,239
boolean (@NotNull Project project, @NotNull ProjectTask projectTask, @Nullable ProjectTaskContext context) { if (context != null && context.getRunConfiguration() instanceof JavaScratchConfiguration) { return false; } return canRun(projectTask); }
canRun
59,240
boolean (@NotNull ProjectTask projectTask) { if (projectTask instanceof ModuleBuildTask) { Module module = ((ModuleBuildTask)projectTask).getModule(); if (!GradleProjectSettings.isDelegatedBuildEnabled(module)) return false; return isExternalSystemAwareModule(GradleConstants.SYSTEM_ID, module); } if (projectTask instan...
canRun
59,241
ExecutionEnvironment (@NotNull Project project, @NotNull ExecuteRunConfigurationTask task, @Nullable Executor executor) { for (GradleExecutionEnvironmentProvider environmentProvider : GradleExecutionEnvironmentProvider.EP_NAME.getExtensions()) { if (environmentProvider.isApplicable(task)) { return environmentProvider.c...
createExecutionEnvironment
59,242
boolean () { return true; }
isFileGeneratedEventsSupported
59,243
String () { return root; }
getRoot
59,244
String () { return path; }
getPath
59,245
Collection<GradleImprovedHotswapOutput> (File file) { try { String content = FileUtil.loadFile(file); Iterator<String> lines = Arrays.stream(splitByLines(content, true)) .filter(line -> !line.isBlank()) .iterator(); List<GradleImprovedHotswapOutput> outputs = new ArrayList<>(); while (lines.hasNext()) { String root = l...
parseOutputFile
59,246
String () { return GradleInspectionBundle.message("multiple.repository.urls.fix.name"); }
getFamilyName
59,247
GroovyElementVisitor (@NotNull ProblemsHolder holder, boolean onTheFly) { return new MyVisitor(holder); }
buildGroovyVisitor
59,248
String () { return getProbableBugs(); }
getGroupDisplayName
59,249
void (@NotNull GrClosableBlock closure) { PsiFile file = closure.getContainingFile(); if (file == null || !FileUtilRt.extensionEquals(file.getName(), GradleConstants.EXTENSION)) return; super.visitClosure(closure); GrMethodCall mavenMethodCall = PsiTreeUtil.getParentOfType(closure, GrMethodCall.class); if (mavenMethodC...
visitClosure
59,250
List<GrCallExpression> (@NotNull GrClosableBlock closure) { GrCallExpression[] applicationStatements = PsiTreeUtil.getChildrenOfType(closure, GrCallExpression.class); if (applicationStatements == null) return Collections.emptyList(); List<GrCallExpression> statements = new ArrayList<>(); for (GrCallExpression statement...
findUrlCallExpressions
59,251
void (@NotNull final Project project, @NotNull final Editor editor, @NotNull final PsiFile file) { if (!EditorModificationUtil.checkModificationAllowed(editor)) return; if (!FileModificationService.getInstance().preparePsiElementsForWrite(file)) return; final JBList<PluginDescriptor> list = new JBList<>(myPlugins); lis...
invoke
59,252
boolean () { return false; }
startInWriteAction
59,253
Component (JList<? extends PluginDescriptor> list, PluginDescriptor value, int index, boolean isSelected, boolean cellHasFocus) { Color backgroundColor = isSelected ? list.getSelectionBackground() : list.getBackground(); myNameLabel.setText(value.name()); myNameLabel.setForeground(isSelected ? list.getSelectionForegrou...
getListCellRendererComponent
59,254
CodeInsightActionHandler () { return new AddGradleDslPluginActionHandler(myPlugins); }
getHandler
59,255
boolean (@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { if (file instanceof PsiCompiledElement) return false; if (!GradleFileType.isGradleFile(file)) return false; return !GradleConstants.SETTINGS_FILE_NAME.equals(file.getName()); }
isValidForFile
59,256
PsiElement (PsiManager psiManager, Object object, PsiElement element) { final PsiFile file = element.getContainingFile(); if (file == null || !FileUtilRt.extensionEquals(file.getName(), GradleConstants.EXTENSION)) return null; final String doc = findDoc(element, object); return !StringUtil.isEmpty(doc) ? new GdslNamedP...
getDocumentationElementForLookupItem
59,257
PsiElement (PsiManager psiManager, String link, PsiElement context) { return JavaDocUtil.findReferenceTarget(psiManager, link, context); }
getDocumentationElementForLink
59,258
AnnotationProcessingData (@NotNull Collection<String> path, @NotNull Collection<String> arguments) { return ourInterner.intern(new AnnotationProcessingData(path, arguments)); }
create
59,259
Collection<String> () { return arguments; }
getArguments
59,260
Collection<String> () { return path; }
getPath
59,261
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AnnotationProcessingData data = (AnnotationProcessingData)o; if (!path.equals(data.path)) return false; if (!arguments.equals(data.arguments)) return false; return true; }
equals
59,262
int () { int result = path.hashCode(); result = 31 * result + arguments.hashCode(); return result; }
hashCode
59,263
String () { return outputPath; }
getOutputPath
59,264
boolean () { return testSources; }
isTestSources
59,265
GradleBuildClasspathManager (@NotNull Project project) { return project.getService(GradleBuildClasspathManager.class); }
getInstance
59,266
void () { ExternalSystemManager<?, ?, ?, ?, ?> manager = ExternalSystemApiUtil.getManager(GradleConstants.SYSTEM_ID); assert manager != null; AbstractExternalSystemLocalSettings<?> localSettings = manager.getLocalSettingsProvider().fun(myProject); Map<String/*module path*/, List<VirtualFile> /*module build classpath*/>...
reload
59,267
List<VirtualFile> () { checkRootsValidity(allFilesCache); if (allFilesCache == null) { reload(); } return Objects.requireNonNull(allFilesCache); }
getAllClasspathEntries
59,268
List<VirtualFile> (@NotNull String externalModulePath) { checkRootsValidity(myClasspathMap.get().get(externalModulePath)); List<VirtualFile> virtualFiles = myClasspathMap.get().get(externalModulePath); return virtualFiles == null ? Collections.emptyList() : virtualFiles; }
getModuleClasspathEntries
59,269
void (@Nullable List<VirtualFile> virtualFiles) { if (virtualFiles == null) return; if (!virtualFiles.isEmpty()) { for (VirtualFile file : virtualFiles) { if (!file.isValid()) { reload(); break; } } } }
checkRootsValidity
59,270
int (@NotNull GrArgumentList args) { int argsCount = 0; boolean namedArgProcessed = false; for (GroovyPsiElement arg : args.getAllArguments()) { if (arg instanceof GrNamedArgument) { if (!namedArgProcessed) { namedArgProcessed = true; argsCount++; } } else { argsCount++; } } return argsCount; }
getGrMethodArumentsCount
59,271
GrLightMethodBuilder (@NotNull String name, @Nullable String returnType, @Nullable String closureTypeParameter, @NotNull PsiElement place) { PsiClassType closureType; PsiClass closureClass = JavaPsiFacade.getInstance(place.getProject()).findClass(GroovyCommonClassNames.GROOVY_LANG_CLOSURE, place.getResolveScope()); if ...
createMethodWithClosure
59,272
PsiElement (@NotNull PsiElement element, int level) { PsiElement parent = element; do { parent = parent.getParent(); } while (parent != null && --level > 0); return parent; }
findParent
59,273
boolean (@Nullable String methodName, @Nullable PsiClass aClass) { return methodName != null && aClass != null && aClass.findMethodsByName(methodName, true).length != 0; }
canBeMethodOf
59,274
PsiType (@Nullable final GrExpression expression) { if (expression == null) return null; return RecursionManager.doPreventingRecursion(expression, true, () -> expression.getNominalType()); }
getTypeOf
59,275
boolean (@Nullable PsiElement psiElement) { return (psiElement instanceof GrBinaryExpression && GroovyElementTypes.COMPOSITE_LSHIFT_SIGN.equals(((GrBinaryExpression)psiElement).getOperationTokenType())); }
isLShiftElement
59,276
boolean (@NotNull GrReferenceExpression expression) { final PsiType psiType = GradleResolverUtil.getTypeOf(expression); if (psiType == null) { PsiElement child = expression.getFirstChild(); if (child == null) return false; PsiReference reference = child.getReference(); if (reference instanceof GrReferenceExpression) { ...
isReject
59,277
PsiType (@NotNull GrFunctionalExpression expression, int index) { PsiFile file = expression.getContainingFile(); if (file == null || !FileUtilRt.extensionEquals(file.getName(), GradleConstants.EXTENSION)) return null; PsiType psiType = super.getClosureParameterType(expression, index); if (psiType instanceof PsiWildcard...
getClosureParameterType
59,278
void (@NotNull PsiType qualifierType, @Nullable PsiClass aClass, @NotNull PsiScopeProcessor processor, @NotNull PsiElement place, @NotNull ResolveState state) { if (!UtilKt.isResolvedInGradleScript(aClass)) return; List<String> methodInfo = new ArrayList<>(); for (GrMethodCall current = PsiTreeUtil.getParentOfType(plac...
processDynamicElements
59,279
void (@NotNull PsiElement element, @NotNull AnnotationHolder holder) { if (element instanceof GrReferenceExpression referenceExpression) { PsiElement resolved = referenceExpression.resolve(); if (resolved instanceof OriginInfoAwareElement && GradleNamedDomainCollectionContributor.NAMED_DOMAIN_DECLARATION.equals(((Origi...
annotate
59,280
void (@NotNull AnnotationHolder holder, PsiElement nameElement) { if (nameElement != null) { holder.newSilentAnnotation(HighlightSeverity.INFORMATION).range(nameElement).textAttributes(MAP_KEY).create(); } }
highlightElement
59,281
GradleProjectSettings () { GradleProjectSettings result = new GradleProjectSettings(); String gradleHome = GradleUtil.getLastUsedGradleHome(); if (!StringUtil.isEmpty(gradleHome)) { result.setGradleHome(gradleHome); } return result; }
getInitialProjectSettings
59,282
ExternalSystemSettingsControl<GradleProjectSettings> (@NotNull GradleProjectSettings settings) { return new GradleProjectSettingsControl(settings); }
createProjectSettingsControl
59,283
ExternalSystemSettingsControl<GradleSettings> (@NotNull GradleSettings settings) { return new GradleSystemSettingsControl(settings); }
createSystemSettingsControl
59,284
void (@NotNull String path) { ((GradleProjectSettingsControl)getProjectSettingsControl()).update(path, false); }
onLinkedProjectPathChange
59,285
void (@Nullable Project currentProject) { super.setCurrentProject(currentProject); ((GradleProjectSettingsControl)getProjectSettingsControl()).setCurrentProject(currentProject); }
setCurrentProject
59,286
void (@Nullable Project project, GradleProjectSettings settings, @Nullable WizardContext wizardContext) { project = project == null || project.isDisposed() ? ProjectManager.getInstance().getDefaultProject() : project; ProjectStructureConfigurable structureConfigurable = ProjectStructureConfigurable.getInstance(project)...
resetGradleJdkComboBox
59,287
String () { return PlatformUtils.isIntelliJ() ? PlatformUtils.getPlatformPrefix() : PlatformUtils.IDEA_CE_PREFIX; }
getPlatformPrefix
59,288
GradleSystemSettingsControlBuilder (@NotNull GradleSettings initialSettings) { IdeaGradleSystemSettingsControlBuilder result = new IdeaGradleSystemSettingsControlBuilder(initialSettings); if (initialSettings.getProject().isDefault()) { result.dropStoreExternallyCheckBox(); } else { result.dropDefaultProjectSettings(); ...
getSystemSettingsControlBuilder
59,289
GradleProjectSettingsControlBuilder (@NotNull GradleProjectSettings initialSettings) { return new JavaGradleProjectSettingsControlBuilder(initialSettings) // Hide bundled distribution option for a while .dropUseBundledDistributionButton(); }
getProjectSettingsControlBuilder
59,290
void (@NotNull IdeaProject gradleProject, @NotNull DataNode<ProjectData> ideProject) { populateJavaProjectCompilerSettings(gradleProject, ideProject); populateProjectSdkModel(gradleProject, ideProject); nextResolver.populateProjectExtraModels(gradleProject, ideProject); }
populateProjectExtraModels
59,291
String () { String projectDirPath = resolverCtx.getProjectPath(); // Gradle API doesn't expose gradleProject compile output path yet. return projectDirPath + "/build/classes"; }
getCompileOutputPath
59,292
void (@NotNull IdeaModule gradleModule, @NotNull DataNode<ModuleData> ideModule) { populateJavaModuleCompilerSettings(gradleModule, ideModule); populateBuildScriptClasspathData(gradleModule, ideModule); populateAnnotationProcessorData(gradleModule, ideModule); populateDependenciesGraphData(gradleModule, ideModule); nex...
populateModuleExtraModels
59,293
void (@NotNull IdeaModule gradleModule, @NotNull DataNode<ModuleData> ideModule) { final AnnotationProcessingModel apModel = resolverCtx.getExtraProject(gradleModule, AnnotationProcessingModel.class); if (apModel == null) { return; } if (!resolverCtx.isResolveModulePerSourceSet()) { final AnnotationProcessingData apDat...
populateAnnotationProcessorData
59,294
void (@NotNull DataNode<AnnotationProcessingData> parent, @NotNull AnnotationProcessingModel apModel, @NotNull String sourceSetName) { AnnotationProcessingConfig config = apModel.bySourceSetName(sourceSetName); if (config != null && config.getProcessorOutput() != null) { parent.createChild(AnnotationProcessingData.OUTP...
populateAnnotationProcessorOutput
59,295
void (@NotNull DataNode<AnnotationProcessingData> parent, @NotNull AnnotationProcessingModel apModel) { for (AnnotationProcessingConfig config : apModel.allConfigs().values()) { if (config.getProcessorOutput() != null) { parent.createChild(AnnotationProcessingData.OUTPUT_KEY, new AnnotationProcessingData.AnnotationProc...
populateAnnotationProcessingOutput
59,296
AnnotationProcessingData (@NotNull AnnotationProcessingModel apModel) { final Set<String> mergedAnnotationProcessorPath = new LinkedHashSet<>(); for (AnnotationProcessingConfig config : apModel.allConfigs().values()) { mergedAnnotationProcessorPath.addAll(config.getAnnotationProcessorPath()); } final List<String> apArg...
getMergedAnnotationProcessingData
59,297
AnnotationProcessingData (@NotNull AnnotationProcessingModel apModel, @NotNull String sourceSetName) { AnnotationProcessingConfig config = apModel.bySourceSetName(sourceSetName); if (config == null) { return null; } else { return AnnotationProcessingData.create(config.getAnnotationProcessorPath(), config.getAnnotationP...
getAnnotationProcessingData
59,298
void (@NotNull IdeaModule gradleModule, @NotNull DataNode<ModuleData> ideModule) { final BuildScriptClasspathModel buildScriptClasspathModel = resolverCtx.getExtraProject(gradleModule, BuildScriptClasspathModel.class); final List<BuildScriptClasspathData.ClasspathEntry> classpathEntries; if (buildScriptClasspathModel !...
populateBuildScriptClasspathData
59,299
void (@NotNull IdeaModule gradleModule, @NotNull DataNode<ModuleData> ideModule) { final ProjectDependencies projectDependencies = resolverCtx.getExtraProject(gradleModule, ProjectDependencies.class); if (projectDependencies != null) { ideModule.createChild(ProjectKeys.DEPENDENCIES_GRAPH, projectDependencies); } }
populateDependenciesGraphData