Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
58,900 | void () { dirtyOutputRoots.clear(); generatedFiles.clear(); } | clearOutputs |
58,901 | String (@NotNull String path) { String basePath = PathUtil.toSystemIndependentName(getProjectPath()); String filePath = PathUtil.toSystemIndependentName(path); return FileUtil.getRelativePath(basePath, filePath, '/'); } | relativePath |
58,902 | void (String[] args) { run(() -> System.out.println("Hello Home!")); } | main |
58,903 | void (Runnable runnable) { runnable.run(); } | run |
58,904 | boolean () { return true; } | useDirectoryBasedStorageFormat |
58,905 | void (String[] args) { System.out.println("Class-Path: " + System.getProperty("java.class.path")); System.out.println("Passed arguments: " + Arrays.toString(args)); } | main |
58,906 | void (String[] args) { System.out.println("Hello expected world"); } | main |
58,907 | void (String[] args) { System.out.println("Hello expected world"); } | main |
58,908 | void (RunnerAndConfigurationSettings configurationSettings, String... checks) { String output = runAppAndGetOutput(configurationSettings); for (String check : checks) { assertTrue(String.format("App output should contain substring: %s, but was:\n%s", check, output), output.contains(check)); } } | assertAppRunOutput |
58,909 | String (RunnerAndConfigurationSettings configurationSettings) { final Semaphore done = new Semaphore(); done.down(); ExternalSystemProgressNotificationManager notificationManager = ApplicationManager.getApplication().getService(ExternalSystemProgressNotificationManager.class); StringBuilder out = new StringBuilder(); E... | runAppAndGetOutput |
58,910 | void (@NotNull ExternalSystemTaskId id, String workingDir) { if (myId != null) { throw new IllegalStateException("This test listener is not supposed to listen to more than 1 task"); } myId = id; } | onStart |
58,911 | void (@NotNull ExternalSystemTaskId id, @NotNull String text, boolean stdOut) { if (!id.equals(myId)) { return; } if (StringUtil.isEmptyOrSpaces(text)) return; (stdOut ? System.out : System.err).print(text); out.append(text); } | onTaskOutput |
58,912 | void (@NotNull ExternalSystemTaskId id) { if (!id.equals(myId)) { return; } done.up(); } | onEnd |
58,913 | Collection<Object[]> () { return Arrays.asList(new Object[][]{{BASE_GRADLE_VERSION}}); } | data |
58,914 | void (Map<String, ExternalProject> projectMap, String projectId, String... sourceSetModulesIds) { ExternalProject externalProject = projectMap.get(projectId); assertEquals(projectId, externalProject.getId()); List<String> actualSourceSetModulesIds = ContainerUtil.map( externalProject.getSourceSets().values(), sourceSet... | assertExternalProjectIds |
58,915 | void (String moduleName, String expectedId) { assertEquals(expectedId, ExternalSystemApiUtil.getExternalProjectId(getModule(moduleName))); } | assertExternalProjectId |
58,916 | void (@NotNull String errorMessage, @Nullable String errorDetails) { if (failTestOnImportFailure) { super.handleImportFailure(errorMessage, errorDetails); } } | handleImportFailure |
58,917 | Collection<Object[]> () { return Arrays.asList(new Object[][]{{BASE_GRADLE_VERSION}}); } | data |
58,918 | Collection<Object[]> () { return Arrays.asList(new Object[][]{{BASE_GRADLE_VERSION}}); } | data |
58,919 | void (List<String> roots, PathAssembler.LocalDistribution distribution) { super.collectAllowedRoots(roots, distribution); File gradleUserHomeDir = new BuildLayoutParameters().getGradleUserHomeDir(); File generatedGradleJarsDir = new File(gradleUserHomeDir, "caches/" + gradleVersion + "/generated-gradle-jars"); roots.ad... | collectAllowedRoots |
58,920 | void () { doTest("testApplyPlugin.gradle", "java"); } | testApplyPlugin |
58,921 | void () { myFixture.configureByFile("testApplyPluginInsideClosure.gradle"); doTest("testApplyPluginInsideClosure.gradle", "java"); } | testApplyPluginInsideClosure |
58,922 | void (String file, String pluginName) { AddGradleDslPluginAction.TEST_THREAD_LOCAL.set(pluginName); WriteCommandAction.runWriteCommandAction(getProject(), () -> CodeInsightTestUtil.doActionTest(new AddGradleDslPluginAction(), file, myFixture)); } | doTest |
58,923 | String () { return "/plugins/gradle/testData"; } | getBasePath |
58,924 | String () { return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + getBasePath(); } | getTestDataPath |
58,925 | SMTRunnerConsoleProperties (Project project, Executor executor, RunConfiguration runConfiguration) { if (runConfiguration instanceof ExternalSystemRunConfiguration) { return new GradleConsoleProperties((ExternalSystemRunConfiguration)runConfiguration, executor); } return null; } | createTestConsoleProperties |
58,926 | FrameworkTypeEx () { return new FrameworkTypeEx(ID) { @NotNull @Override public FrameworkSupportInModuleProvider createProvider() { return GradleGroovyFrameworkSupportProvider.this; } @NotNull @Override public String getPresentableName() { //noinspection HardCodedStringLiteral return "Groovy";//NON-NLS } @NotNull @Over... | getFrameworkType |
58,927 | FrameworkSupportInModuleProvider () { return GradleGroovyFrameworkSupportProvider.this; } | createProvider |
58,928 | String () { //noinspection HardCodedStringLiteral return "Groovy";//NON-NLS } | getPresentableName |
58,929 | Icon () { return JetgroovyIcons.Groovy.Groovy_16x16; } | getIcon |
58,930 | void (@NotNull ProjectId projectId, @NotNull Module module, @NotNull ModifiableRootModel rootModel, @NotNull ModifiableModelsProvider modifiableModelsProvider, @NotNull BuildScriptDataBuilder buildScriptData) { buildScriptData .withGroovyPlugin(GradleBuildScriptBuilderUtil.getGroovyVersion()) .withJUnit(); } | addSupport |
58,931 | FrameworkTypeEx () { return new FrameworkTypeEx(ID) { @NotNull @Override public FrameworkSupportInModuleProvider createProvider() { return GradleJavaFrameworkSupportProvider.this; } @NotNull @Override public String getPresentableName() { //noinspection HardCodedStringLiteral return "Java"; //NON-NLS } @NotNull @Overrid... | getFrameworkType |
58,932 | FrameworkSupportInModuleProvider () { return GradleJavaFrameworkSupportProvider.this; } | createProvider |
58,933 | String () { //noinspection HardCodedStringLiteral return "Java"; //NON-NLS } | getPresentableName |
58,934 | Icon () { return AllIcons.Nodes.Module; } | getIcon |
58,935 | void (@NotNull ProjectId projectId, @NotNull Module module, @NotNull ModifiableRootModel rootModel, @NotNull ModifiableModelsProvider modifiableModelsProvider, @NotNull BuildScriptDataBuilder buildScriptData) { buildScriptData .withJavaPlugin() .withJUnit(); } | addSupport |
58,936 | FrameworkTypeEx () { return new FrameworkTypeEx(ID) { @NotNull @Override public FrameworkSupportInModuleProvider createProvider() { return KotlinDslGradleJavaFrameworkSupportProvider.this; } @NotNull @Override public String getPresentableName() { //noinspection HardCodedStringLiteral return "Java"; //NON-NLS } @NotNull... | getFrameworkType |
58,937 | FrameworkSupportInModuleProvider () { return KotlinDslGradleJavaFrameworkSupportProvider.this; } | createProvider |
58,938 | String () { //noinspection HardCodedStringLiteral return "Java"; //NON-NLS } | getPresentableName |
58,939 | Icon () { return AllIcons.Nodes.Module; } | getIcon |
58,940 | void (@NotNull ProjectId projectId, @NotNull Module module, @NotNull ModifiableRootModel rootModel, @NotNull ModifiableModelsProvider modifiableModelsProvider, @NotNull BuildScriptDataBuilder buildScriptData) { buildScriptData .addPluginDefinitionInPluginsGroup("java") .addRepositoriesDefinition("mavenCentral()") .addO... | addSupport |
58,941 | FrameworkTypeEx () { return new FrameworkTypeEx(ID) { @NotNull @Override public FrameworkSupportInModuleProvider createProvider() { return KotlinDslGradleGroovyFrameworkSupportProvider.this; } @NotNull @Override public String getPresentableName() { //noinspection HardCodedStringLiteral return "Groovy"; //NON-NLS } @Not... | getFrameworkType |
58,942 | FrameworkSupportInModuleProvider () { return KotlinDslGradleGroovyFrameworkSupportProvider.this; } | createProvider |
58,943 | String () { //noinspection HardCodedStringLiteral return "Groovy"; //NON-NLS } | getPresentableName |
58,944 | Icon () { return JetgroovyIcons.Groovy.Groovy_16x16; } | getIcon |
58,945 | void (@NotNull ProjectId projectId, @NotNull Module module, @NotNull ModifiableRootModel rootModel, @NotNull ModifiableModelsProvider modifiableModelsProvider, @NotNull BuildScriptDataBuilder buildScriptData) { buildScriptData .addPluginDefinitionInPluginsGroup("groovy") .addRepositoriesDefinition("mavenCentral()") .ad... | addSupport |
58,946 | void (@NotNull ProjectId projectId, @NotNull Module module, @NotNull ModifiableRootModel rootModel, @NotNull ModifiableModelsProvider modifiableModelsProvider, @NotNull BuildScriptDataBuilder buildScriptData) { } | addSupport |
58,947 | JComponent () { return null; } | createComponent |
58,948 | FrameworkSupportInModuleConfigurable (@NotNull FrameworkSupportModel model) { return new FrameworkSupportInModuleConfigurable() { @Nullable @Override public JComponent createComponent() { return GradleFrameworkSupportProvider.this.createComponent(); } @Override public void addSupport(@NotNull Module module, @NotNull Mo... | createConfigurable |
58,949 | JComponent () { return GradleFrameworkSupportProvider.this.createComponent(); } | createComponent |
58,950 | void (@NotNull Module module, @NotNull ModifiableRootModel rootModel, @NotNull ModifiableModelsProvider modifiableModelsProvider) { final BuildScriptDataBuilder buildScriptData = getBuildScriptData(module); if (buildScriptData != null) { ModuleBuilder builder = model.getModuleBuilder(); ProjectId projectId = builder in... | addSupport |
58,951 | boolean (@NotNull ModuleType moduleType) { return false; } | isEnabledForModuleType |
58,952 | String () { return GradleBundle.message("gradle.action.download.sources"); } | getName |
58,953 | String () { return GradleBundle.message("gradle.action.download.sources.busy.text"); } | getBusyText |
58,954 | ActionCallback (@NotNull List<? extends LibraryOrderEntry> orderEntriesContainingFile) { Map<LibraryOrderEntry, Module> gradleModules = getGradleModules(orderEntries); if (gradleModules.isEmpty()) { return ActionCallback.REJECTED; } Map.Entry<LibraryOrderEntry, Module> next = gradleModules.entrySet().iterator().next();... | perform |
58,955 | ActionCallback (@NotNull PsiFile psiFile, @NotNull String sourceArtifactNotation, @NotNull String artifactCoordinates, @NotNull String externalProjectPath) { final String sourcesLocationFilePath; final File sourcesLocationFile; try { sourcesLocationFile = new File(FileUtil.createTempDirectory("sources", "loc"), "path.t... | downloadSources |
58,956 | void () { File sourceJar; try { Path downloadedArtifactPath = Path.of(FileUtil.loadFile(sourcesLocationFile)); if (!isValidJar(downloadedArtifactPath)) { GradleLog.LOG.warn("Incorrect file header: " + downloadedArtifactPath + ". Unable to process downloaded file as a JAR file"); FileUtil.delete(sourcesLocationFile); re... | onSuccess |
58,957 | void () { resultWrapper.setRejected(); String title = GradleBundle.message("gradle.notifications.sources.download.failed.title"); String message = GradleBundle.message("gradle.notifications.sources.download.failed.content", artifactCoordinates); NotificationData notification = new NotificationData(title, message, Notif... | onFailure |
58,958 | void (@NotNull File sourcesJar, @NotNull List<? extends LibraryOrderEntry> orderEntries) { ApplicationManager.getApplication() .invokeLater(() -> { final Set<Library> libraries = new HashSet<>(); for (LibraryOrderEntry orderEntry : orderEntries) { ContainerUtil.addIfNotNull(libraries, orderEntry.getLibrary()); } attach... | attachSources |
58,959 | String (@NotNull String artifactCoordinates, @NotNull Predicate<String> artifactIdChecker) { String groupNameVersionCoordinates; String[] split = artifactCoordinates.split(":"); if (split.length == 4) { // group:name:packaging:classifier || name:packaging:classifier:version || group:name:classifier:version || group:nam... | getSourcesArtifactNotation |
58,960 | UserDataHolderBase (@NotNull String sourceArtifactNotation, @NotNull String taskName, @NotNull String sourcesLocationFilePath ) { UserDataHolderBase userData = new UserDataHolderBase(); VersionSpecificInitScript legacyInitScript = new LazyVersionSpecificInitScript( () -> GradleInitScriptUtil.loadLegacyDownloadSourcesIn... | prepareUserData |
58,961 | boolean (@NotNull Path path) { try (InputStream is = Files.newInputStream(path, StandardOpenOption.READ, LinkOption.NOFOLLOW_LINKS)) { byte[] head = is.readNBytes(2); if (head.length < 2) { return false; } return head[0] == 0x50 && head[1] == 0x4b; } catch (IOException e) { return false; } } | isValidJar |
58,962 | Collection<Path> (@NotNull Project project) { if (!GradleSettings.getInstance(project).getLinkedProjectsSettings().isEmpty()) { var envVar = System.getenv("GRADLE_USER_HOME"); var gradleDir = envVar != null ? Path.of(envVar) : Path.of(System.getProperty("user.home"), ".gradle"); if (Files.isDirectory(gradleDir)) { retu... | getPaths |
58,963 | List<String> () { List<String> result = new ArrayList<>(); if (!GradleSettings.getInstance(myProject).getLinkedProjectsSettings().isEmpty()) { addGradleClassPath(result); addOtherClassPath(result); } return result; } | getClassPath |
58,964 | void (@NotNull final List<String> classpath) { if (myGradleClasspath == null) { myGradleClasspath = new ArrayList<>(); String gradleToolingApiJarPath = PathUtil.getJarPathForClass(ProjectConnection.class); if (!StringUtil.isEmpty(gradleToolingApiJarPath)) { myGradleClasspath.add(gradleToolingApiJarPath); } String gradl... | addGradleClassPath |
58,965 | void (@NotNull final List<String> classpath) { classpath.add(locateAntLibraries()); classpath.add(PathUtil.getJarPathForClass(GroovyObject.class)); classpath.add(PathUtil.getJarPathForClass(Gson.class)); classpath.add(PathUtil.getJarPathForClass(org.slf4j.Logger.class)); } | addOtherClassPath |
58,966 | String () { var gradleJar = PathManager.getJarForClass(GradleConstants.class); if (gradleJar != null) { Path pathToAnt = gradleJar.resolveSibling("ant").resolve("ant.jar"); if (pathToAnt.toFile().isFile()) { return pathToAnt.toString(); } if (Files.isDirectory(gradleJar)) { // Code runs from IDEA run configuration (cod... | locateAntLibraries |
58,967 | Promise<Object> (@NotNull PlaybackContext context) { ActionCallback actionCallback = new ActionCallbackProfilerStopper(); runWhenGradleImportAndIndexingFinished(context, actionCallback); return Promises.toPromise(actionCallback); } | _execute |
58,968 | void (@NotNull PlaybackContext context, @NotNull ActionCallback callback) { Project project = context.getProject(); ExternalSystemProjectTrackerSettings projectTrackerSettings = ExternalSystemProjectTrackerSettings.getInstance(project); ExternalSystemProjectTrackerSettings.AutoReloadType currentAutoReloadType = project... | runWhenGradleImportAndIndexingFinished |
58,969 | void (@NotNull Project project, @NotNull PlaybackContext context, @NotNull AsyncPromise<Void> promise, @NotNull GradleSettings gradleSettings, @NotNull ActionCallback callback) { Collection<GradleProjectSettings> projectsSettings = gradleSettings.getLinkedProjectsSettings(); List<String> projectsPaths = ContainerUtil.m... | doGradleSync |
58,970 | void (@Nullable DataNode<ProjectData> externalProject) { assert externalProject != null; context.message("Gradle resolve finished for: " + externalProject.getData().getLinkedExternalProjectPath(), getLine()); SimpleMessageBusConnection connection = project.getMessageBus().simpleConnect(); connection.subscribe(ProjectDa... | onSuccess |
58,971 | void (String projectPath) { _onImportFinished(projectPath); } | onFinalTasksFinished |
58,972 | void (String projectPath, @NotNull Throwable failure) { _onImportFinished(projectPath); } | onImportFailed |
58,973 | void (String projectPath) { if (!projectsPaths.contains(projectPath)) return; connection.disconnect(); if (gradleProjectsToRefreshCount.decrementAndGet() == 0) { ApplicationManager.getApplication().invokeLater(() -> promise.setResult(null)); } } | _onImportFinished |
58,974 | void (@NotNull String errorMessage, @Nullable String errorDetails) { context.error("Gradle resolve failed for: " + settings.getExternalProjectPath() + ":" + errorMessage + ":" + errorDetails, getLine()); synchronized (projectsWithResolveErrors) { if (projectsWithResolveErrors.length() != 0) { projectsWithResolveErrors.... | onFailure |
58,975 | Promise<Void> (@NotNull Project project, @NotNull PlaybackContext context, @NotNull GradleSettings gradleSettings) { if (gradleSettings.getLinkedProjectsSettings().isEmpty()) { VirtualFile projectDir = ProjectUtil.guessProjectDir(project); assert projectDir != null; VirtualFile[] children = projectDir.getChildren(); bo... | linkGradleProjectIfNeeded |
58,976 | Promise<Object> (@NotNull PlaybackContext context) { String[] args = extractCommandArgument(PREFIX).split(" "); Project project = context.getProject(); Collection<GradleProjectSettings> settings = ExternalSystemApiUtil.getSettings(project, GradleConstants.SYSTEM_ID).getLinkedProjectsSettings(); String taskName = args[0... | _execute |
58,977 | void (@NotNull Project project, @NotNull TaskData taskData, @NotNull ActionCallback actionCallback) { final ExternalTaskExecutionInfo taskExecutionInfo = ExternalSystemActionUtil.buildTaskInfo(taskData); TaskCallback callback = new TaskCallback() { @Override public void onSuccess() { actionCallback.setDone(); } @Overri... | runTask |
58,978 | void () { actionCallback.setDone(); } | onSuccess |
58,979 | void () { actionCallback.setRejected(); } | onFailure |
58,980 | boolean (Module module) { if (isExternalSystemAwareModule(GradleConstants.SYSTEM_ID, module)) { String projectPath = getExternalProjectPath(module); for (VirtualFile root : ModuleRootManager.getInstance(module).getContentRoots()) { if (projectPath != null && !FileUtil.isAncestor(projectPath, root.getPath(), true)) { re... | showUnderModuleGroup |
58,981 | GradleProjectViewModuleNode (@NotNull Project project, @NotNull ProjectViewModuleNode moduleNode, ViewSettings settings) { Module module = moduleNode.getValue(); final String moduleShortName = getGradleModuleShortName(module); if (moduleShortName == null) return null; return new GradleProjectViewModuleNode(project, mod... | getGradleModuleNode |
58,982 | GradleModuleDirectoryNode (@NotNull Project project, @NotNull PsiDirectoryNode directoryNode, ViewSettings settings) { PsiDirectory psiDirectory = directoryNode.getValue(); if (psiDirectory == null) return null; final VirtualFile virtualFile = psiDirectory.getVirtualFile(); if (!ProjectRootsUtil.isModuleContentRoot(vir... | getGradleModuleNode |
58,983 | String (Module module) { if (!isExternalSystemAwareModule(GradleConstants.SYSTEM_ID, module)) return null; String moduleShortName; if (isSourceSetModule(module)) { return GradleProjectResolverUtil.getSourceSetName(module); } else { moduleShortName = getExternalProjectId(module); } boolean isRootModule = StringUtil.equa... | getGradleModuleShortName |
58,984 | boolean (Module module) { return GradleConstants.GRADLE_SOURCE_SET_MODULE_TYPE_KEY.equals(getExternalModuleType(module)); } | isSourceSetModule |
58,985 | boolean () { return !(appendModuleName || isSourceSetModule) || canRealModuleNameBeHidden(); } | shouldShowModuleName |
58,986 | void (@NotNull PresentationData data) { super.updateImpl(data); if (appendModuleName) { if (!canRealModuleNameBeHidden()) { data.addText("[" + myModuleShortName + "]", REGULAR_BOLD_ATTRIBUTES); } } else if (isSourceSetModule) { List<ColoredFragment> fragments = data.getColoredText(); if (fragments.size() == 1) { Colore... | updateImpl |
58,987 | void (@NotNull PresentationData presentation) { super.update(presentation); presentation.setPresentableText(myModuleShortName); presentation.addText(myModuleShortName, REGULAR_BOLD_ATTRIBUTES); } | update |
58,988 | boolean () { return false; } | showModuleNameInBold |
58,989 | void (@NotNull Project project, @NotNull Module module) { myModulesConfigurationHash.remove(module.getName()); } | moduleRemoved |
58,990 | void (@NotNull Project project, @NotNull List<? extends Module> modules, @NotNull Function<? super Module, String> oldNameProvider) { for (Module module : modules) { moduleRemoved(project, module); } } | modulesRenamed |
58,991 | void (final @NotNull CompileContext context) { if (shouldBeBuiltByExternalSystem(myProject)) return; if (!hasGradleModules(context)) return; final BuildManager buildManager = BuildManager.getInstance(); final File projectSystemDir = buildManager.getProjectSystemDirectory(myProject); final File gradleConfigFile = new Fi... | generateBuildConfiguration |
58,992 | GradleProjectConfiguration (@NotNull File gradleConfigFile) { final GradleProjectConfiguration projectConfig = new GradleProjectConfiguration(); if (gradleConfigFile.exists()) { try { XmlSerializer.deserializeInto(projectConfig, JDOMUtil.load(gradleConfigFile)); // filter orphan modules final Set<String> actualModules ... | loadLastConfiguration |
58,993 | String (PathMapper pathMapper, String outputPath) { return pathMapper != null ? pathMapper.convertToRemote(outputPath) : outputPath; } | toRemote |
58,994 | boolean (@NotNull Project project) { // skip resource compilation by IDE for Android projects // TODO [vlad] this check should be replaced when an option to make any gradle project with gradle be introduced. ProjectType projectType = ProjectTypeService.getProjectType(project); if (projectType != null && "Android".equal... | shouldBeBuiltByExternalSystem |
58,995 | boolean (@NotNull Module module) { for (Facet<?> facet : FacetManager.getInstance(module).getAllFacets()) { if (ArrayUtil.contains(facet.getName(), "Android", "Android-Gradle", "Java-Gradle")) return true; } return false; } | shouldBeBuiltByExternalSystem |
58,996 | boolean (@NotNull CompileContext context) { for (Module module : context.getCompileScope().getAffectedModules()) { if (ExternalSystemApiUtil.isExternalSystemAwareModule(GradleConstants.SYSTEM_ID, module)) return true; } return false; } | hasGradleModules |
58,997 | void (@NotNull List<ResourceRootConfiguration> container, final @Nullable ExternalSourceDirectorySet directorySet, final @Nullable ExternalSourceDirectorySet sourcesDirectorySet, @Nullable PathMapper pathMapper) { if (directorySet == null) return; for (File file : directorySet.getSrcDirs()) { final String dir = file.ge... | addResources |
58,998 | List<VirtualFile> () { return GradleBuildClasspathManager.getInstance(myProject).getAllClasspathEntries(); } | calcClassRoots |
58,999 | PackageDirectoryCache (@Nullable GlobalSearchScope scope) { if (scope instanceof ExternalModuleBuildGlobalSearchScope) { GradleBuildClasspathManager buildClasspathManager = GradleBuildClasspathManager.getInstance(myProject); Map<String, PackageDirectoryCache> classFinderCache = buildClasspathManager.getClassFinderCache... | getCache |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.