Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
277,100 | void () { try { ExternalSystemTask task = myTask; if (task != null) { task.cancel(); } } finally { closeInput(); } } | destroyProcessImpl |
277,101 | void () { try { notifyProcessDetached(); } finally { closeInput(); } } | detachProcessImpl |
277,102 | boolean () { return false; } | detachIsDefault |
277,103 | OutputStream () { return myProcessInputWriter; } | getProcessInput |
277,104 | void (int exitCode) { try { super.notifyProcessTerminated(exitCode); } finally { closeInput(); } } | notifyProcessTerminated |
277,105 | void () { var processInputWriter = myProcessInputWriter; var processInputReader = myProcessInputReader; var dataHolder = myDataHolder; myProcessInputWriter = null; myProcessInputReader = null; if (dataHolder != null) { dataHolder.putUserData(ExternalSystemRunConfiguration.RUN_INPUT_KEY, null); } //noinspection deprecation StreamUtil.closeStream(processInputWriter); //noinspection deprecation StreamUtil.closeStream(processInputReader); } | closeInput |
277,106 | void (@NotNull UserDataHolder dataHolder) { var leakedStream = dataHolder.getUserData(ExternalSystemRunConfiguration.RUN_INPUT_KEY); dataHolder.putUserData(ExternalSystemRunConfiguration.RUN_INPUT_KEY, null); if (leakedStream != null) { LOG.warn("Unexpected stream found, closing it..."); } //noinspection deprecation StreamUtil.closeStream(leakedStream); } | closeLeakedStream |
277,107 | void () { try { detachProcessImpl(); } finally { myTask = null; myDataHolder = null; } } | dispose |
277,108 | RunConfiguration (@NotNull Project project) { return doCreateConfiguration(myExternalSystemId, project, this, ""); } | createTemplateConfiguration |
277,109 | String () { return getConfigurationFactoryId(); } | getId |
277,110 | boolean () { return AbstractExternalSystemTaskConfigurationType.this.isEditableInDumbMode(); } | isEditableInDumbMode |
277,111 | boolean () { return false; } | isEditableInDumbMode |
277,112 | ProjectSystemId () { return myExternalSystemId; } | getExternalSystemId |
277,113 | ConfigurationFactory () { return myFactories[0]; } | getFactory |
277,114 | ExternalSystemRunConfiguration (@NotNull ProjectSystemId externalSystemId, @NotNull Project project, @NotNull ConfigurationFactory factory, @NotNull String name) { return new ExternalSystemRunConfiguration(externalSystemId, project, factory, name); } | doCreateConfiguration |
277,115 | String () { return myExternalSystemId.getReadableName(); } | getDisplayName |
277,116 | String () { return ExternalSystemBundle.message("run.configuration.description", myExternalSystemId.getReadableName()); } | getConfigurationTypeDescription |
277,117 | Icon () { return myIcon.getValue(); } | getIcon |
277,118 | String () { return myExternalSystemId.getReadableName() + "RunConfiguration"; } | getId |
277,119 | ConfigurationFactory[] () { return myFactories; } | getConfigurationFactories |
277,120 | String () { return AbstractExternalSystemTaskConfigurationType.generateName(getProject(), mySettings); } | suggestedName |
277,121 | boolean () { return isReattachDebugProcess; } | isReattachDebugProcess |
277,122 | void (boolean reattachDebugProcess) { isReattachDebugProcess = reattachDebugProcess; } | setReattachDebugProcess |
277,123 | boolean () { return isDebugServerProcess; } | isDebugServerProcess |
277,124 | void (boolean debugServerProcess) { isDebugServerProcess = debugServerProcess; putUserData(DEBUG_SERVER_PROCESS_KEY, debugServerProcess); } | setDebugServerProcess |
277,125 | ExternalSystemRunConfiguration () { ConfigurationFactory configurationFactory = getFactory(); if (configurationFactory == null) { return null; } final Element element = new Element("toClone"); try { writeExternal(element); RunConfiguration clone = configurationFactory.createTemplateConfiguration(getProject()); ExternalSystemRunConfiguration configuration = (ExternalSystemRunConfiguration)clone; configuration.setName(getName()); configuration.readExternal(element); configuration.initializeSettings(); return configuration; } catch (InvalidDataException | WriteExternalException e) { LOG.error(e); return null; } } | clone |
277,126 | void () { if (Strings.isEmptyOrSpaces(mySettings.getExternalProjectPath())) { String path = getRootProjectPath(); if (path != null) { mySettings.setExternalProjectPath(path); } } } | initializeSettings |
277,127 | boolean (@NotNull Accessor accessor, @NotNull Object bean) { // only these fields due to backward compatibility return switch (accessor.getName()) { case "passParentEnvs" -> !mySettings.isPassParentEnvs(); case "env" -> !mySettings.getEnv().isEmpty(); default -> true; }; } | accepts |
277,128 | boolean (@NotNull Element element, @NotNull String name, @NotNull Consumer<Boolean> consumer) { var childElement = element.getChild(name); if (childElement == null) { return false; } var value = Boolean.parseBoolean(childElement.getText()); consumer.accept(value); return true; } | readExternalBoolean |
277,129 | void (@NotNull Element element, @NotNull String name, boolean value) { var childElement = new Element(name); childElement.setText(String.valueOf(value)); element.addContent(childElement); } | writeExternalBoolean |
277,130 | ExternalSystemTaskExecutionSettings () { return mySettings; } | getSettings |
277,131 | SettingsEditor<ExternalSystemRunConfiguration> () { return new ExternalSystemRunConfigurationFragmentedEditor(this); } | getConfigurationEditor |
277,132 | GlobalSearchScope () { GlobalSearchScope scope = null; ExternalSystemManager<?, ?, ?, ?, ?> manager = ExternalSystemApiUtil.getManager(mySettings.getExternalSystemId()); if (manager != null) { scope = manager.getSearchScope(getProject(), mySettings); } if (scope == null) { VirtualFile file = VfsUtil.findFileByIoFile(new File(mySettings.getExternalProjectPath()), false); if (file != null) { Module module = ProjectFileIndex.getInstance(getProject()).getModuleForFile(file, false); if (module != null) { scope = ExecutionSearchScopes.executionScope(Collections.singleton(module)); } } } return scope; } | getSearchScope |
277,133 | void (@Nullable ExecutionConsole consoleView, String text, boolean isGreeting) { int limit = 100; if (text.length() < limit) { return; } final ConsoleViewImpl consoleViewImpl; if (consoleView instanceof ConsoleViewImpl) { consoleViewImpl = (ConsoleViewImpl)consoleView; } else if (consoleView instanceof DuplexConsoleView duplexConsoleView) { if (duplexConsoleView.getPrimaryConsoleView() instanceof ConsoleViewImpl) { consoleViewImpl = (ConsoleViewImpl)duplexConsoleView.getPrimaryConsoleView(); } else if (duplexConsoleView.getSecondaryConsoleView() instanceof ConsoleViewImpl) { consoleViewImpl = (ConsoleViewImpl)duplexConsoleView.getSecondaryConsoleView(); } else { consoleViewImpl = null; } } else { consoleViewImpl = null; } if (consoleViewImpl != null) { UIUtil.invokeLaterIfNeeded(() -> { consoleViewImpl.performWhenNoDeferredOutput(() -> { if (!ApplicationManager.getApplication().isDispatchThread()) return; Document document = consoleViewImpl.getEditor().getDocument(); int line = isGreeting ? 0 : document.getLineCount() - 2; if (CharArrayUtil.regionMatches(document.getCharsSequence(), document.getLineStartOffset(line), text)) { final FoldingModel foldingModel = consoleViewImpl.getEditor().getFoldingModel(); foldingModel.runBatchFoldingOperation(() -> { FoldRegion region = foldingModel.addFoldRegion(document.getLineStartOffset(line), document.getLineEndOffset(line) + 1, StringUtil.trimLog(text, limit)); if (region != null) { region.setExpanded(false); } }); } }); }); } } | foldGreetingOrFarewell |
277,134 | void (AdditionalTabComponentManager manager, ProcessHandler startedProcess) { RunProfile runProfile = ExecutionManagerImpl.getDelegatedRunProfile(this); if (runProfile instanceof RunConfigurationBase<?>) { ((RunConfigurationBase<?>)runProfile).createAdditionalTabComponents(manager, startedProcess); } } | createAdditionalTabComponents |
277,135 | void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); ExecutionEnvironment environment = getEnvironment(event); if (environment != null) { presentation.setText(ExecutionBundle.messagePointer("rerun.configuration.action.name", StringUtil.escapeMnemonics(environment.getRunProfile().getName()))); Icon icon = ExecutionManagerImpl.isProcessRunning(getDescriptor(event)) ? AllIcons.Actions.Restart : myProgressListener instanceof BuildViewManager ? AllIcons.Actions.Compile : environment.getExecutor().getIcon(); presentation.setIcon(icon); presentation.setEnabled(isEnabled(event)); return; } presentation.setEnabled(false); } | update |
277,136 | RunContentDescriptor (AnActionEvent event) { return myContentDescriptor != null ? myContentDescriptor : super.getDescriptor(event); } | getDescriptor |
277,137 | ExecutionEnvironment (@NotNull AnActionEvent event) { return myEnvironment; } | getEnvironment |
277,138 | void (@NotNull CompletionResultSet result) { List<LookupElement> cachedElements = myCachedElements; final String projectPath = myProjectPathAccessor.getText(); if (cachedElements == null || !StringUtil.equals(myCachedWorkingDir, projectPath)) { final ExternalProjectSettings linkedProjectSettings = ExternalSystemApiUtil.getSettings(myProject, mySystemId).getLinkedProjectSettings(projectPath); if (linkedProjectSettings == null) return; final ExternalProjectInfo projectData = ProjectDataManager.getInstance().getExternalProjectData(myProject, mySystemId, linkedProjectSettings.getExternalProjectPath()); if (projectData == null || projectData.getExternalProjectStructure() == null) return; cachedElements = new ArrayList<>(getVariants(projectData.getExternalProjectStructure(), projectPath)); myCachedElements = cachedElements; myCachedWorkingDir = projectPath; } result.addAllElements(cachedElements); } | addArgumentVariants |
277,139 | List<LookupElement> (@NotNull final DataNode<ProjectData> projectDataNode, @NotNull final String modulePath) { final DataNode<ModuleData> moduleDataNode = findModuleDataNode(projectDataNode, modulePath); if (moduleDataNode == null) { return Collections.emptyList(); } final Collection<DataNode<TaskData>> tasks = ExternalSystemApiUtil.getChildren(moduleDataNode, ProjectKeys.TASK); List<LookupElement> elements = new ArrayList<>(tasks.size()); for (DataNode<TaskData> taskDataNode : tasks) { elements.add(LookupElementBuilder.create(taskDataNode.getData().getName()).withIcon(ExternalSystemIcons.Task)); } return elements; } | getVariants |
277,140 | DataNode<ModuleData> (@NotNull final DataNode<ProjectData> projectDataNode, @NotNull final String projectPath) { final DataNode<?> node = ExternalSystemApiUtil.findFirstRecursively(projectDataNode, node1 -> node1.getKey().equals(ProjectKeys.MODULE) && node1.getData() instanceof ModuleData && ((ModuleData)node1 .getData()).getLinkedExternalProjectPath().equals(projectPath)); //noinspection unchecked return (DataNode<ModuleData>)node; } | findModuleDataNode |
277,141 | ExternalTaskExecutionInfo () { return myTaskInfo; } | getTaskInfo |
277,142 | ExternalSystemTaskLocation (@NotNull Project project, @NotNull ProjectSystemId systemId, @Nullable String projectPath, @NotNull ExternalTaskExecutionInfo taskInfo) { if (projectPath != null) { final VirtualFile file = VfsUtil.findFileByIoFile(new File(projectPath), false); if (file != null) { final PsiDirectory psiFile = PsiManager.getInstance(project).findDirectory(file); if (psiFile != null) { return new ExternalSystemTaskLocation(project, psiFile, taskInfo); } } } String name = systemId.getReadableName() + projectPath + StringUtil.join(taskInfo.getSettings().getTaskNames(), " "); // We create a dummy text file instead of re-using external system file in order to avoid clashing with other configuration producers. // For example gradle files are enhanced groovy scripts but we don't want to run them via regular IJ groovy script runners. // Gradle tooling api should be used for running gradle tasks instead. IJ execution sub-system operates on Location objects // which encapsulate PsiElement and groovy runners are automatically applied if that PsiElement IS-A GroovyFile. PsiFile psiFile = PsiFileFactory.getInstance(project).createFileFromText(name, PlainTextFileType.INSTANCE, ""); return new ExternalSystemTaskLocation(project, psiFile, taskInfo); } | create |
277,143 | boolean (@NotNull ConfigurationFromContext self, @NotNull ConfigurationFromContext other) { return true; } | shouldReplace |
277,144 | boolean (@NotNull ExternalSystemRunConfiguration configuration, @NotNull ConfigurationContext context, @NotNull Ref<PsiElement> sourceElement) { Project project = getProjectFromContext(context); if (project == null) return false; ExternalSystemTaskExecutionSettings contextTaskExecutionSettings = getTaskSettingsFromContext(context); if (contextTaskExecutionSettings == null) return false; ExternalSystemTaskExecutionSettings taskExecutionSettings = configuration.getSettings(); if (!contextTaskExecutionSettings.getExternalSystemId().equals(taskExecutionSettings.getExternalSystemId())) { return false; } taskExecutionSettings.setExternalProjectPath(contextTaskExecutionSettings.getExternalProjectPath()); taskExecutionSettings.setTaskNames(contextTaskExecutionSettings.getTaskNames()); configuration.setName(AbstractExternalSystemTaskConfigurationType.generateName(project, taskExecutionSettings)); return true; } | setupConfigurationFromContext |
277,145 | boolean (@NotNull ExternalSystemRunConfiguration configuration, @NotNull ConfigurationContext context) { Project project = getProjectFromContext(context); if (project == null) return false; ExternalSystemTaskExecutionSettings contextTaskExecutionSettings = getTaskSettingsFromContext(context); if (contextTaskExecutionSettings == null) return false; ExternalSystemTaskExecutionSettings taskExecutionSettings = configuration.getSettings(); if (!contextTaskExecutionSettings.getExternalSystemId().equals(taskExecutionSettings.getExternalSystemId())) { return false; } if (!StringUtil.equals(contextTaskExecutionSettings.getExternalProjectPath(), taskExecutionSettings.getExternalProjectPath())) { return false; } if (!contextTaskExecutionSettings.getTaskNames().equals(taskExecutionSettings.getTaskNames())) return false; return true; } | isConfigurationFromContext |
277,146 | ExternalSystemTaskExecutionSettings (ConfigurationContext context) { final Location<?> contextLocation = context.getLocation(); if (!(contextLocation instanceof ExternalSystemTaskLocation)) { return null; } return ((ExternalSystemTaskLocation)contextLocation).getTaskInfo().getSettings(); } | getTaskSettingsFromContext |
277,147 | Project (ConfigurationContext context) { final Location<?> contextLocation = context.getLocation(); if (!(contextLocation instanceof ExternalSystemTaskLocation)) { return null; } return contextLocation.getProject(); } | getProjectFromContext |
277,148 | ProjectSystemId () { return ProjectSystemId.IDE; } | getExternalSystemId |
277,149 | ExecutionConsole (@NotNull Project project, @NotNull ExternalSystemTask task, @Nullable ExecutionEnvironment env, @Nullable ProcessHandler processHandler) { ConsoleView executionConsole = TextConsoleBuilderFactory.getInstance().createBuilder(project).getConsole(); executionConsole.attachToProcess(processHandler); return executionConsole; } | attachExecutionConsole |
277,150 | void (@NotNull ExecutionConsole executionConsole, @NotNull ProcessHandler processHandler, @NotNull String text, @NotNull Key processOutputType) { processHandler.notifyTextAvailable(text, processOutputType); } | onOutput |
277,151 | boolean (@NotNull ExternalSystemTask task) { return true; } | isApplicableFor |
277,152 | AnAction[] (@NotNull ExecutionConsole consoleView) { return AnAction.EMPTY_ARRAY; } | getRestartActions |
277,153 | ExternalSystemJdkProvider () { return ApplicationManager.getApplication().getService(ExternalSystemJdkProvider.class); } | getInstance |
277,154 | ExternalSystemTaskExecutionSettings () { return myTaskExecutionSettings; } | getTaskExecutionSettings |
277,155 | void (@NotNull Element element) { super.writeExternal(element); element.setAttribute("tasks", StringUtil.join(myTaskExecutionSettings.getTaskNames(), " ")); if (myTaskExecutionSettings.getExternalProjectPath() != null) { element.setAttribute("externalProjectPath", myTaskExecutionSettings.getExternalProjectPath()); } if (myTaskExecutionSettings.getVmOptions() != null) element.setAttribute("vmOptions", myTaskExecutionSettings.getVmOptions()); if (myTaskExecutionSettings.getScriptParameters() != null) { element.setAttribute("scriptParameters", myTaskExecutionSettings.getScriptParameters()); } } | writeExternal |
277,156 | void (@NotNull Element element) { super.readExternal(element); myTaskExecutionSettings.setTaskNames(StringUtil.split(StringUtil.notNullize(element.getAttributeValue("tasks")), " ")); myTaskExecutionSettings.setExternalProjectPath(element.getAttributeValue("externalProjectPath")); myTaskExecutionSettings.setVmOptions(element.getAttributeValue("vmOptions")); myTaskExecutionSettings.setScriptParameters(element.getAttributeValue("scriptParameters")); } | readExternal |
277,157 | boolean (Object o) { if (this == o) return true; if (!(o instanceof ExternalSystemBeforeRunTask task)) return false; if (!super.equals(o)) return false; if (!myTaskExecutionSettings.equals(task.myTaskExecutionSettings)) return false; return true; } | equals |
277,158 | int () { int result = super.hashCode(); result = 31 * result + myTaskExecutionSettings.hashCode(); return result; } | hashCode |
277,159 | BeforeRunTask () { return new ExternalSystemBeforeRunTask(this); } | clone |
277,160 | Sdk (@Nullable Project project) { if (project != null) { Sdk res = ProjectRootManager.getInstance(project).getProjectSdk(); if (res != null) return res; Module[] modules = ModuleManager.getInstance(project).getModules(); for (Module module : modules) { Sdk sdk = ModuleRootManager.getInstance(module).getSdk(); if (sdk != null && sdk.getSdkType() instanceof JavaSdkType) return sdk; } } // Workaround for projects without project Jdk SdkType jdkType = getJavaSdk(); return ProjectJdkTable.getInstance() .getSdksOfType(jdkType).stream() .filter(it -> isValidJdk(it)) .max(jdkType.versionComparator()) .orElseGet(ExternalSystemJdkUtil::getInternalJdk); } | getProjectJdk |
277,161 | Sdk () { String javaHome = getJavaHome(); if (StringUtil.isEmptyOrSpaces(javaHome)) throw new UndefinedJavaHomeException(); if (!isValidJdk(javaHome)) throw new InvalidJavaHomeException(javaHome); return ExternalSystemJdkProvider.getInstance().createJdk(null, javaHome); } | getJavaHomeJdk |
277,162 | Sdk (@NotNull String jdkName) { Sdk jdk = ProjectJdkTable.getInstance().findJdk(jdkName); if (jdk == null) return null; String homePath = jdk.getHomePath(); if (!isValidJdk(jdk)) throw new InvalidSdkException(homePath); return jdk; } | getJdk |
277,163 | Sdk (@NotNull Project project, SdkType javaSdkType) { Sdk projectSdk = ProjectRootManager.getInstance(project).getProjectSdk(); Stream<Sdk> projectSdks = Stream.concat(Stream.of(projectSdk), Stream.of(ModuleManager.getInstance(project).getModules()).map(module -> ModuleRootManager .getInstance(module).getSdk())); return projectSdks .filter(sdk -> sdk != null && sdk.getSdkType() == javaSdkType && isValidJdk(sdk)) .findFirst().orElse(null); } | findProjectJDK |
277,164 | Sdk (Sdk projectSdk) { if (projectSdk != null && projectSdk.getSdkType() instanceof DependentSdkType && projectSdk.getSdkType() instanceof JavaSdkType sdkType) { String sdkBinPath = sdkType.getBinPath(projectSdk); if (sdkBinPath == null) { return null; } final String jdkPath = FileUtil.toSystemIndependentName(new File(sdkBinPath).getParent()); return ContainerUtil.find(ProjectJdkTable.getInstance().getAllJdks(), sdk -> { final String homePath = sdk.getHomePath(); return homePath != null && FileUtil.toSystemIndependentName(homePath).equals(jdkPath); }); } else { return null; } } | findReferencedJdk |
277,165 | Sdk (Project project) { Sdk projectSdk = ProjectRootManager.getInstance(project).getProjectSdk(); return findReferencedJdk(projectSdk); } | findReferencedJdk |
277,166 | Sdk (@NotNull Sdk sdk) { Sdk parentSdk = findReferencedJdk(sdk); if (parentSdk == null) return sdk; return parentSdk; } | resolveDependentJdk |
277,167 | Collection<String> () { return getJavaSdkType().suggestHomePaths(); } | suggestJdkHomePaths |
277,168 | SdkType () { return getJavaSdk(); } | getJavaSdkType |
277,169 | boolean (@Nullable Sdk jdk) { if (jdk == null) return false; if (!(jdk.getSdkType() instanceof JavaSdkType)) return false; if (SdkDownloadTracker.getInstance().isDownloading(jdk)) return true; return isValidJdk(jdk.getHomePath()); } | isValidJdk |
277,170 | boolean (@Nullable String homePath) { if (StringUtil.isEmptyOrSpaces(homePath)) { return false; } try { return JdkUtil.checkForJdk(homePath) && JdkUtil.checkForJre(homePath); } catch (InvalidPathException exception) { return false; } } | isValidJdk |
277,171 | Sdk (@NotNull String homePath) { ExternalSystemJdkProvider jdkProvider = ExternalSystemJdkProvider.getInstance(); List<Sdk> sdks = Arrays.asList(ProjectJdkTable.getInstance().getAllJdks()); String name = SdkConfigurationUtil.createUniqueSdkName(jdkProvider.getJavaSdkType(), homePath, sdks); Sdk jdk = jdkProvider.createJdk(name, homePath); SdkConfigurationUtil.addSdk(jdk); return jdk; } | addJdk |
277,172 | SdkType () { return ExternalSystemJdkProvider.getInstance().getJavaSdkType(); } | getJavaSdk |
277,173 | Sdk () { return ExternalSystemJdkProvider.getInstance().getInternalJdk(); } | getInternalJdk |
277,174 | boolean (@Nullable String javaHome) { JdkVersionDetector.JdkVersionInfo jdkVersionInfo = javaHome == null ? null : JdkVersionDetector.getInstance().detectJdkVersionInfo(javaHome); return jdkVersionInfo != null && jdkVersionInfo.version.isAtLeast(9); } | isJdk9orLater |
277,175 | String (@NotNull String currentTextPrefix) { ParametersListLexer lexer = new ParametersListLexer(currentTextPrefix); while (lexer.nextToken()) { if (lexer.getTokenEnd() == currentTextPrefix.length()) { return lexer.getCurrentToken(); } } return ""; } | getPrefix |
277,176 | LookupElement (@NotNull Option option, @NotNull String text) { LookupElementBuilder res = LookupElementBuilder.create(text); if (option.getDescription() != null) { return TailTypeDecorator.withTail(res.withTypeText(option.getDescription(), true), TailTypes.insertSpaceType()); } return res; } | createLookupElement |
277,177 | void (@NotNull String text, int offset, @NotNull String prefix, @NotNull CompletionResultSet result) { ParametersListLexer lexer = new ParametersListLexer(text); int argCount = 0; while (lexer.nextToken()) { if (offset < lexer.getTokenStart()) { break; } if (offset <= lexer.getTokenEnd()) { if (argCount == 0) { if (prefix.startsWith("--")) { for (Option option : myOptions.getOptions()) { if (option.getLongOpt() != null) { result.addElement(createLookupElement(option, "--" + option.getLongOpt())); } } } else if (prefix.startsWith("-")) { for (Option option : myOptions.getOptions()) { if (option.getOpt() != null) { result.addElement(createLookupElement(option, "-" + option.getOpt())); } } } else { addArgumentVariants(result); } } return; } if (argCount > 0) { argCount--; } else { String token = lexer.getCurrentToken(); if (token.startsWith("-")) { Option option = myOptions.getOption(token); if (option != null) { int optionArgCount = option.getArgs(); if (optionArgCount == Option.UNLIMITED_VALUES) { argCount = Integer.MAX_VALUE; } else if (optionArgCount != Option.UNINITIALIZED) { argCount = optionArgCount; } } } } } if (argCount > 0) { return; } addArgumentVariants(result); } | addCompletionVariants |
277,178 | int (ProjectCoordinate object) { if (object == null) { return 0; } String groupId = object.getGroupId(); String artifactId = object.getArtifactId(); String version = object.getVersion(); int result1 = (groupId != null ? groupId.hashCode() : 0); result1 = 31 * result1 + (artifactId != null ? artifactId.hashCode() : 0); result1 = 31 * result1 + (version != null ? version.hashCode() : 0); return result1; } | hashCode |
277,179 | boolean (ProjectCoordinate o1, ProjectCoordinate o2) { if (o1 == o2) { return true; } if (o1 == null || o2 == null) { return false; } if (o1.getGroupId() != null ? !o1.getGroupId().equals(o2.getGroupId()) : o2.getGroupId() != null) return false; if (o1.getArtifactId() != null ? !o1.getArtifactId().equals(o2.getArtifactId()) : o2.getArtifactId() != null) return false; if (o1.getVersion() != null ? !o1.getVersion().equals(o2.getVersion()) : o2.getVersion() != null) return false; return true; } | equals |
277,180 | void () { Set<String> existingModules = new HashSet<>(); myModulesSupplier.get().stream().map(Module::getName).forEach(existingModules::add); myState.names = new HashMap<>(); myNamesMap.forEach((module, lib) -> { if (existingModules.contains(module)) { myState.names.put(module, lib); } }); myState.substitutions = new HashMap<>(); for (Map.Entry<String, Collection<String>> entry : mySubstitutions.entrySet()) { if (!existingModules.contains(entry.getKey())) continue; Collection<String> value = entry.getValue(); if (value != null && !value.isEmpty()) { myState.substitutions.put(entry.getKey(), new TreeSet<>(value)); } } } | commit |
277,181 | void (String ownerModuleName, String moduleName, String libraryName, DependencyScope scope) { myNamesMap.put(moduleName, libraryName); mySubstitutions.putValue(ownerModuleName, moduleName + '_' + scope.getDisplayName()); } | addSubstitution |
277,182 | void (String ownerModuleName, String moduleName, String libraryName, DependencyScope scope) { mySubstitutions.remove(ownerModuleName, moduleName + '_' + scope.getDisplayName()); Collection<String> substitutions = mySubstitutions.values(); for (DependencyScope dependencyScope : DependencyScope.values()) { if (substitutions.contains(moduleName + '_' + dependencyScope.getDisplayName())) { return; } } myNamesMap.remove(moduleName, libraryName); } | removeSubstitution |
277,183 | boolean (String moduleOwner, String substitutionModule, DependencyScope scope) { return mySubstitutions.get(moduleOwner).contains(substitutionModule + '_' + scope.getDisplayName()); } | isSubstitution |
277,184 | boolean (String libraryName) { return myNamesMap.containsValue(libraryName); } | isSubstituted |
277,185 | String (String moduleName) { return myNamesMap.get(moduleName); } | getSubstitutedLibrary |
277,186 | String (@NotNull ProjectCoordinate id) { if (StringUtil.isEmpty(id.getArtifactId())) return null; String result = myModuleMappingById.get(id); return result == null && id.getVersion() != null ? myModuleMappingById.get(new ProjectId(id.getGroupId(), id.getArtifactId(), null)) : result; } | findModule |
277,187 | void (@NotNull ProjectCoordinate id, @NotNull Module module) { myModuleMappingById.put(id, module.getName()); myModuleMappingById.put(new ProjectId(id.getGroupId(), id.getArtifactId(), null), module.getName()); } | register |
277,188 | void (@NotNull Module module) { Arrays.stream(ExternalProjectsWorkspaceImpl.EP_NAME.getExtensions()) .map(contributor -> contributor.findProjectId(module)) .filter(Objects::nonNull) .findFirst() .ifPresent(id -> register(id, module)); } | register |
277,189 | Module (@NotNull final String filePath, final String moduleTypeId) { Module module = getModifiableModuleModel().newModule(filePath, moduleTypeId); final String moduleName = FileUtilRt.getNameWithoutExtension(new File(filePath).getName()); if (!module.getName().equals(moduleName)) { try { getModifiableModuleModel().renameModule(module, moduleName); } catch (ModuleWithNameAlreadyExists exists) { LOG.warn(exists); } } // set module type id explicitly otherwise it can not be set if there is an existing module (with the same filePath) and w/o 'type' attribute module.setModuleType(moduleTypeId); return module; } | newModule |
277,190 | Module (@NotNull ModuleData moduleData) { String imlName = null; for (String candidate: suggestModuleNameCandidates(moduleData)) { Module module = findIdeModule(candidate); if (module == null) { imlName = candidate; break; } } assert imlName != null : "Too many duplicated module names"; String filePath = ExternalSystemApiUtil.toCanonicalPath(moduleData.getModuleFileDirectoryPath() + "/" + imlName + ModuleFileType.DOT_DEFAULT_EXTENSION); return newModule(filePath, moduleData.getModuleTypeId()); } | newModule |
277,191 | Module (@NotNull String ideModuleName) { Module module = getModifiableModuleModel().findModuleByName(ideModuleName); return module == null ? getModifiableModuleModel().getModuleToBeRenamed(ideModuleName) : module; } | findIdeModule |
277,192 | Library (@NotNull LibraryData libraryData) { final LibraryTable.ModifiableModel libraryTable = getModifiableProjectLibrariesModel(); for (Library ideLibrary: libraryTable.getLibraries()) { if (ExternalSystemApiUtil.isRelated(ideLibrary, libraryData)) return ideLibrary; } return null; } | findIdeLibrary |
277,193 | ModifiableModuleModel () { if (myModifiableModuleModel == null) { myModifiableModuleModel = doGetModifiableModuleModel(); } return myModifiableModuleModel; } | getModifiableModuleModel |
277,194 | ModifiableRootModel (Module module) { return (ModifiableRootModel)getRootModel(module); } | getModifiableRootModel |
277,195 | ModuleRootModel (Module module) { return myModifiableRootModels.computeIfAbsent(module, k -> doGetModifiableRootModel(module)); } | getRootModel |
277,196 | ModifiableFacetModel (Module module) { return myModifiableFacetModels.computeIfAbsent(module, k -> doGetModifiableFacetModel(module)); } | getModifiableFacetModel |
277,197 | Library (String name) { return getModifiableProjectLibrariesModel().getLibraryByName(name); } | getLibraryByName |
277,198 | Library (String name) { return getModifiableProjectLibrariesModel().createLibrary(name); } | createLibrary |
277,199 | Library (String name, @Nullable ProjectModelExternalSource externalSource) { return getModifiableProjectLibrariesModel().createLibrary(name, null, externalSource); } | createLibrary |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.