Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
277,300 | void (Map<String, State> externalSystemsState) { } | setExternalSystemsState |
277,301 | void (Map<String, TaskActivationState> externalSystemsTaskActivation) { } | setExternalSystemsTaskActivation |
277,302 | ExternalProjectsViewState () { return projectsViewState; } | getProjectsViewState |
277,303 | void (ExternalProjectsViewState projectsViewState) { this.projectsViewState = projectsViewState; } | setProjectsViewState |
277,304 | ProjectDataManagerImpl () { return (ProjectDataManagerImpl)ProjectDataManager.getInstance(); } | getInstance |
277,305 | void ( @NotNull Project project, @Nullable String projectPath, @NotNull List<? extends Runnable> tasks ) { var topic = project.getMessageBus() .syncPublisher(ProjectDataImportListener.TOPIC); topic.onFinalTasksStarted(projectPath); try { ContainerUtil.reverse(tasks).forEach(Runnable::run); } catch (Exception e) { LOG.warn(e); } finally { topic.onFinalTasksFinished(projectPath); } } | runFinalTasks |
277,306 | String (@NotNull Key<?> key) { StringBuilder buffer = new StringBuilder(); String s = key.toString(); for (int i = 0; i < s.length(); i++) { char currChar = s.charAt(i); if (Character.isUpperCase(currChar)) { if (i != 0) { buffer.append(' '); } buffer.append(StringUtil.toLowerCase(currChar)); } else { buffer.append(currChar); } } return buffer.toString(); } | getReadableText |
277,307 | void (@Nullable DataNode startNode) { if (startNode == null || startNode.isReady()) { return; } DeduplicateVisitorsSupplier supplier = new DeduplicateVisitorsSupplier(); ((DataNode<?>)startNode).visit(dataNode -> { if (dataNode.validateData()) { dataNode.visitData(supplier.getVisitor(dataNode.getKey())); } }); } | ensureTheDataIsReadyToUse |
277,308 | void (@NotNull Project project, @NotNull ExternalProjectInfo externalProjectInfo) { if (!project.isDisposed()) { ExternalProjectsManagerImpl.getInstance(project).updateExternalProjectData(externalProjectInfo); } } | updateExternalProjectData |
277,309 | ExternalProjectInfo (@NotNull Project project, @NotNull ProjectSystemId projectSystemId, @NotNull String externalProjectPath) { return !project.isDisposed() ? ExternalProjectsDataStorage.getInstance(project).get(projectSystemId, externalProjectPath) : null; } | getExternalProjectData |
277,310 | Collection<ExternalProjectInfo> (@NotNull Project project, @NotNull ProjectSystemId projectSystemId) { if (!project.isDisposed()) { return ExternalProjectsDataStorage.getInstance(project).list(projectSystemId); } else { return ContainerUtil.emptyList(); } } | getExternalProjectsData |
277,311 | IdeModifiableModelsProvider (@NotNull Project project) { return new IdeModifiableModelsProviderImpl(project); } | createModifiableModelsProvider |
277,312 | void (@NotNull Collection<? extends DataNode<?>> nodes) { for (DataNode<?> node : nodes) { ensureTheDataIsReadyToUse(node); } } | ensureTheDataIsReadyToUse |
277,313 | void (@NotNull final IdeModifiableModelsProvider modelsProvider, @NotNull Project project, boolean synchronous, @NotNull final String commitDesc, @Nullable Long activityId) { ExternalSystemApiUtil.executeProjectChangeAction(synchronous, new DisposeAwareProjectChange(project) { @Override public void execute() { syncMetrics.getOrStartSpan(Phase.WORKSPACE_MODEL_APPLY.name(), ExternalSystemSyncDiagnostic.gradleSyncSpanName); if (activityId != null) { ExternalSystemSyncActionsCollector.logPhaseStarted(project, activityId, Phase.WORKSPACE_MODEL_APPLY); } final long startTime = System.currentTimeMillis(); modelsProvider.commit(); final long timeInMs = System.currentTimeMillis() - startTime; if (activityId != null) { syncMetrics.endSpan(Phase.WORKSPACE_MODEL_APPLY.name()); ExternalSystemSyncActionsCollector.logPhaseFinished(project, activityId, Phase.WORKSPACE_MODEL_APPLY, timeInMs); } LOG.debug(String.format("%s committed in %d ms", commitDesc, timeInMs)); } }); } | commit |
277,314 | void () { syncMetrics.getOrStartSpan(Phase.WORKSPACE_MODEL_APPLY.name(), ExternalSystemSyncDiagnostic.gradleSyncSpanName); if (activityId != null) { ExternalSystemSyncActionsCollector.logPhaseStarted(project, activityId, Phase.WORKSPACE_MODEL_APPLY); } final long startTime = System.currentTimeMillis(); modelsProvider.commit(); final long timeInMs = System.currentTimeMillis() - startTime; if (activityId != null) { syncMetrics.endSpan(Phase.WORKSPACE_MODEL_APPLY.name()); ExternalSystemSyncActionsCollector.logPhaseFinished(project, activityId, Phase.WORKSPACE_MODEL_APPLY, timeInMs); } LOG.debug(String.format("%s committed in %d ms", commitDesc, timeInMs)); } | execute |
277,315 | void (@NotNull final IdeModifiableModelsProvider modelsProvider, @NotNull Project project, boolean synchronous) { ExternalSystemApiUtil.executeProjectChangeAction(synchronous, new DisposeAwareProjectChange(project) { @Override public void execute() { modelsProvider.dispose(); } }); } | dispose |
277,316 | void () { modelsProvider.dispose(); } | execute |
277,317 | void (final @NotNull Collection<? extends DataNode<E>> toImport, @Nullable ProjectData projectData, @NotNull final Project project, @NotNull IdeModifiableModelsProvider modelsProvider) { if (toImport.isEmpty()) { return; } final Collection<DataNode<E>> toCreate = filterExistingModules(toImport, modelsProvider); if (!toCreate.isEmpty()) { createModules(toCreate, modelsProvider); } for (DataNode<E> node : toImport) { Module module = node.getUserData(MODULE_KEY); if (module != null) { ProjectCoordinate publication = node.getData().getPublication(); if (publication != null) { modelsProvider.registerModulePublication(module, publication); } String productionModuleId = node.getData().getProductionModuleId(); modelsProvider.setTestModuleProperties(module, productionModuleId); setModuleOptions(module, node); ModifiableRootModel modifiableRootModel = modelsProvider.getModifiableRootModel(module); syncPaths(module, modifiableRootModel, node.getData()); EP_NAME.forEachExtensionSafe(extension -> extension.importModule(modelsProvider, module, node.getData())); importModuleSdk(modifiableRootModel, node.getData()); } } for (DataNode<E> node : toImport) { Module module = node.getUserData(MODULE_KEY); if (module != null) { final String[] groupPath; groupPath = node.getData().getIdeModuleGroup(); final ModifiableModuleModel modifiableModel = modelsProvider.getModifiableModuleModel(); modifiableModel.setModuleGroupPath(module, groupPath); } } } | importData |
277,318 | Module (@NotNull DataNode<E> module, @NotNull IdeModifiableModelsProvider modelsProvider) { ModuleData data = module.getData(); return modelsProvider.newModule(data); } | createModule |
277,319 | void (@NotNull Collection<? extends DataNode<E>> toCreate, @NotNull IdeModifiableModelsProvider modelsProvider) { for (DataNode<E> module : toCreate) { Module created = createModule(module, modelsProvider); module.putUserData(MODULE_KEY, created); // Ensure that the dependencies are clear (used to be not clear when manually removing the module and importing it via external system) final ModifiableRootModel modifiableRootModel = modelsProvider.getModifiableRootModel(created); RootPolicy<Object> visitor = new RootPolicy<>() { @Override public Object visitLibraryOrderEntry(@NotNull LibraryOrderEntry libraryOrderEntry, Object value) { modifiableRootModel.removeOrderEntry(libraryOrderEntry); return value; } @Override public Object visitModuleOrderEntry(@NotNull ModuleOrderEntry moduleOrderEntry, Object value) { modifiableRootModel.removeOrderEntry(moduleOrderEntry); return value; } }; for (OrderEntry orderEntry : modifiableRootModel.getOrderEntries()) { orderEntry.accept(visitor, null); } } } | createModules |
277,320 | Object (@NotNull LibraryOrderEntry libraryOrderEntry, Object value) { modifiableRootModel.removeOrderEntry(libraryOrderEntry); return value; } | visitLibraryOrderEntry |
277,321 | Object (@NotNull ModuleOrderEntry moduleOrderEntry, Object value) { modifiableRootModel.removeOrderEntry(moduleOrderEntry); return value; } | visitModuleOrderEntry |
277,322 | Collection<DataNode<E>> (@NotNull Collection<? extends DataNode<E>> modules, @NotNull IdeModifiableModelsProvider modelsProvider) { Collection<DataNode<E>> result = new ArrayList<>(); for (DataNode<E> node : modules) { ModuleData moduleData = node.getData(); Module module = modelsProvider.findIdeModule(moduleData); if (module == null) { UnloadedModuleDescription unloadedModuleDescription = modelsProvider.getUnloadedModuleDescription(moduleData); if (unloadedModuleDescription == null) { result.add(node); } markExistedModulesWithSameRoot(node, modelsProvider); } else { node.putUserData(MODULE_KEY, module); } } return result; } | filterExistingModules |
277,323 | void (DataNode<E> node, IdeModifiableModelsProvider modelsProvider) { ModuleData moduleData = node.getData(); ProjectSystemId projectSystemId = moduleData.getOwner(); Arrays.stream(modelsProvider.getModules()) .filter(ideModule -> isModulePointsSameRoot(moduleData, ideModule)) .filter(module -> !ExternalSystemApiUtil.isExternalSystemAwareModule(projectSystemId, module)) .forEach(module -> { ExternalSystemModulePropertyManager.getInstance(module) .setExternalOptions(projectSystemId, moduleData, node.getData(ProjectKeys.PROJECT)); }); } | markExistedModulesWithSameRoot |
277,324 | boolean (ModuleData moduleData, Module ideModule) { for (VirtualFile root: ModuleRootManager.getInstance(ideModule).getContentRoots()) { if (VfsUtilCore.pathEqualsTo(root, moduleData.getLinkedExternalProjectPath())) { return true; } } return false; } | isModulePointsSameRoot |
277,325 | void (@NotNull Module module, @NotNull ModifiableRootModel modifiableModel, @NotNull ModuleData data) { CompilerModuleExtension extension = modifiableModel.getModuleExtension(CompilerModuleExtension.class); if (extension == null) { LOG.debug(String.format("No compiler extension is found for '%s', compiler output path will not be synced.", module.getName())); return; } String compileOutputPath = data.getCompileOutputPath(ExternalSystemSourceType.SOURCE); extension.setCompilerOutputPath(compileOutputPath != null ? VfsUtilCore.pathToUrl(compileOutputPath) : null); String testCompileOutputPath = data.getCompileOutputPath(ExternalSystemSourceType.TEST); extension.setCompilerOutputPathForTests(testCompileOutputPath != null ? VfsUtilCore.pathToUrl(testCompileOutputPath) : null); extension.inheritCompilerOutputPath(data.isInheritProjectCompileOutputPath()); } | syncPaths |
277,326 | void (Computable<? extends Collection<? extends Module>> toRemoveComputable, final @NotNull Collection<? extends DataNode<E>> toIgnore, @NotNull final ProjectData projectData, @NotNull final Project project, @NotNull final IdeModifiableModelsProvider modelsProvider) { final Collection<? extends Module> toRemove = toRemoveComputable.compute(); final List<Module> modules = new SmartList<>(toRemove); for (DataNode<E> moduleDataNode : toIgnore) { final Module module = modelsProvider.findIdeModule(moduleDataNode.getData()); ContainerUtil.addIfNotNull(modules, module); } if (modules.isEmpty()) { return; } ContainerUtil.removeDuplicates(modules); for (Module module : modules) { if (module.isDisposed()) continue; unlinkModuleFromExternalSystem(module); } ExternalSystemApiUtil.executeOnEdt(true, () -> { AtomicInteger counter = project.getUserData(ORPHAN_MODULE_HANDLERS_COUNTER); if (counter == null) { counter = new AtomicInteger(); project.putUserData(ORPHAN_MODULE_HANDLERS_COUNTER, counter); } counter.incrementAndGet(); Set<Path> orphanModules = project.getUserData(ORPHAN_MODULE_FILES); if (orphanModules == null) { orphanModules = new LinkedHashSet<>(); project.putUserData(ORPHAN_MODULE_FILES, orphanModules); } LocalHistoryAction historyAction = LocalHistory.getInstance().startAction(ExternalSystemBundle.message("local.history.remove.orphan.modules")); try { String rootProjectPathKey = String.valueOf(projectData.getLinkedExternalProjectPath().hashCode()); Path unlinkedModulesDir = ExternalProjectsDataStorage.getProjectConfigurationDir(project).resolve("orphanModules").resolve(rootProjectPathKey); if (!FileUtil.createDirectory(unlinkedModulesDir.toFile())) { LOG.warn("Unable to create " + unlinkedModulesDir); return; } AbstractExternalSystemLocalSettings<?> localSettings = ExternalSystemApiUtil.getLocalSettings(project, projectData.getOwner()); SyncType syncType = localSettings.getProjectSyncType().get(projectData.getLinkedExternalProjectPath()); for (Module module : modules) { if (module.isDisposed()) continue; String path = module.getModuleFilePath(); if (!ApplicationManager.getApplication().isHeadlessEnvironment() && syncType == SyncType.RE_IMPORT) { try { // we need to save module configuration before dispose, to get the up-to-date content of the unlinked module iml StoreUtil.saveSettings(module); VirtualFile moduleFile = module.getModuleFile(); if (moduleFile != null) { Path orphanModulePath = unlinkedModulesDir.resolve(String.valueOf(path.hashCode())); FileUtil.writeToFile(orphanModulePath.toFile(), moduleFile.contentsToByteArray()); Path orphanModuleOriginPath = unlinkedModulesDir.resolve(path.hashCode() + ".path"); FileUtil.writeToFile(orphanModuleOriginPath.toFile(), path); orphanModules.add(orphanModulePath); } } catch (Exception e) { LOG.warn(e); } } modelsProvider.getModifiableModuleModel().disposeModule(module); ModuleBuilder.deleteModuleFile(path); } } finally { historyAction.finish(); } }); } | removeData |
277,327 | void (@NotNull Collection<DataNode<E>> imported, @Nullable ProjectData projectData, @NotNull Project project, @NotNull IdeModelsProvider modelsProvider) { Set<Path> orphanModules = project.getUserData(ORPHAN_MODULE_FILES); if (orphanModules == null || orphanModules.isEmpty()) { return; } AtomicInteger counter = project.getUserData(ORPHAN_MODULE_HANDLERS_COUNTER); if (counter == null) { return; } if (counter.decrementAndGet() == 0) { project.putUserData(ORPHAN_MODULE_FILES, null); project.putUserData(ORPHAN_MODULE_HANDLERS_COUNTER, null); StringBuilder modulesToRestoreText = new StringBuilder(); List<Pair<String, Path>> modulesToRestore = new ArrayList<>(); for (Path modulePath : orphanModules) { try { String path = FileUtil.loadFile(modulePath.resolveSibling(modulePath.getFileName() + ".path").toFile()); modulesToRestoreText.append(FileUtilRt.getNameWithoutExtension(new File(path).getName())).append("\n"); modulesToRestore.add(Pair.create(path, modulePath)); } catch (IOException e) { LOG.warn(e); } } String buildSystem = projectData != null ? projectData.getOwner().getReadableName() : "build system"; String content = ExternalSystemBundle.message("orphan.modules.text", buildSystem, StringUtil.shortenTextWithEllipsis(modulesToRestoreText.toString(), 50, 0)); Notification cleanUpNotification = ORPHAN_MODULE_NOTIFICATION_GROUP.createNotification(content, NotificationType.INFORMATION) .setListener((notification, event) -> { if (event.getEventType() != HyperlinkEvent.EventType.ACTIVATED) return; if (showRemovedOrphanModules(modulesToRestore, project)) { notification.expire(); } }) .whenExpired(() -> { List<File> filesToRemove = ContainerUtil.map(orphanModules, Path::toFile); List<File> toRemove2 = ContainerUtil.map(orphanModules, path -> path.resolveSibling(path.getFileName() + ".path").toFile()); FileUtil.asyncDelete(ContainerUtil.concat(filesToRemove, toRemove2)); }); Disposer.register(project, cleanUpNotification::expire); cleanUpNotification.notify(project); } } | onSuccessImport |
277,328 | void (Project project) { project.putUserData(ORPHAN_MODULE_FILES, null); project.putUserData(ORPHAN_MODULE_HANDLERS_COUNTER, null); } | onFailureImport |
277,329 | boolean (@NotNull final List<? extends Pair<String, Path>> orphanModules, @NotNull final Project project) { final CheckBoxList<Pair<String, Path>> orphanModulesList = new CheckBoxList<>(); DialogWrapper dialog = new DialogWrapper(project) { { setTitle(ExternalSystemBundle.message("orphan.modules.dialog.title")); init(); } @Override protected JComponent createCenterPanel() { orphanModulesList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); orphanModulesList.setItems(orphanModules, module -> FileUtilRt.getNameWithoutExtension(new File(module.getFirst()).getName())); //NON-NLS orphanModulesList.setBorder(JBUI.Borders.empty(5)); JScrollPane myModulesScrollPane = ScrollPaneFactory.createScrollPane(orphanModulesList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); myModulesScrollPane.setBorder(new MatteBorder(0, 0, 1, 0, JBColor.border())); myModulesScrollPane.setMaximumSize(new Dimension(-1, 300)); JPanel content = new JPanel(new BorderLayout()); content.add(myModulesScrollPane, BorderLayout.CENTER); return content; } @NotNull @Override protected JComponent createNorthPanel() { GridBagConstraints gbConstraints = new GridBagConstraints(); JPanel panel = new JPanel(new GridBagLayout()); gbConstraints.insets = JBUI.insets(4, 0, 10, 8); panel.add(new JLabel(ExternalSystemBundle.message("orphan.modules.dialog.text")), gbConstraints); return panel; } }; if (dialog.showAndGet()) { ExternalSystemApiUtil.doWriteAction(() -> { for (int i = 0; i < orphanModules.size(); i++) { Pair<String, Path> pair = orphanModules.get(i); String originalPath = pair.first; Path savedPath = pair.second; if (orphanModulesList.isItemSelected(i) && savedPath.toFile().isFile()) { try { File file = new File(originalPath); FileUtil.copy(savedPath.toFile(), file); ModuleManager.getInstance(project).loadModule(file.toPath()); } catch (IOException | ModuleWithNameAlreadyExists e) { LOG.warn(e); } } } }); return true; } return false; } | showRemovedOrphanModules |
277,330 | JComponent () { orphanModulesList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); orphanModulesList.setItems(orphanModules, module -> FileUtilRt.getNameWithoutExtension(new File(module.getFirst()).getName())); //NON-NLS orphanModulesList.setBorder(JBUI.Borders.empty(5)); JScrollPane myModulesScrollPane = ScrollPaneFactory.createScrollPane(orphanModulesList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); myModulesScrollPane.setBorder(new MatteBorder(0, 0, 1, 0, JBColor.border())); myModulesScrollPane.setMaximumSize(new Dimension(-1, 300)); JPanel content = new JPanel(new BorderLayout()); content.add(myModulesScrollPane, BorderLayout.CENTER); return content; } | createCenterPanel |
277,331 | JComponent () { GridBagConstraints gbConstraints = new GridBagConstraints(); JPanel panel = new JPanel(new GridBagLayout()); gbConstraints.insets = JBUI.insets(4, 0, 10, 8); panel.add(new JLabel(ExternalSystemBundle.message("orphan.modules.dialog.text")), gbConstraints); return panel; } | createNorthPanel |
277,332 | void (@NotNull Module module) { ExternalSystemModulePropertyManager.getInstance(module).unlinkExternalOptions(); } | unlinkModuleFromExternalSystem |
277,333 | void (Module module, DataNode<E> moduleDataNode) { ModuleData moduleData = moduleDataNode.getData(); module.putUserData(MODULE_DATA_KEY, moduleData); ExternalSystemModulePropertyManager.getInstance(module) .setExternalOptions(moduleData.getOwner(), moduleData, moduleDataNode.getData(ProjectKeys.PROJECT)); } | setModuleOptions |
277,334 | void (@NotNull Collection<? extends DataNode<E>> toImport, @Nullable ProjectData projectData, @NotNull Project project, @NotNull IdeModifiableModelsProvider modelsProvider) { for (DataNode<E> moduleDataNode : toImport) { final Module module = moduleDataNode.getUserData(MODULE_KEY); if (module == null) continue; final Map<OrderEntry, OrderAware> orderAwareMap = moduleDataNode.getUserData(ORDERED_DATA_MAP_KEY); if (orderAwareMap != null) { rearrangeOrderEntries(orderAwareMap, modelsProvider.getModifiableRootModel(module)); } moduleDataNode.putUserData(MODULE_KEY, null); moduleDataNode.putUserData(ORDERED_DATA_MAP_KEY, null); } for (Module module : modelsProvider.getModules()) { module.putUserData(MODULE_DATA_KEY, null); } } | postProcess |
277,335 | void (@NotNull Map<OrderEntry, OrderAware> orderEntryDataMap, @NotNull ModifiableRootModel modifiableRootModel) { final OrderEntry[] orderEntries = modifiableRootModel.getOrderEntries(); final int length = orderEntries.length; final OrderEntry[] newOrder = new OrderEntry[length]; final PriorityQueue<Pair<OrderEntry, OrderAware>> priorityQueue = new PriorityQueue<>( 11, (o1, o2) -> { int order1 = o1.second.getOrder(); int order2 = o2.second.getOrder(); if (order1 != order2) { return order1 < order2 ? -1 : 1; } return o1.second.toString().compareTo(o2.second.toString()); }); final List<OrderEntry> noOrderAwareItems = new ArrayList<>(); for (int i = 0; i < length; i++) { OrderEntry orderEntry = orderEntries[i]; final OrderAware orderAware = orderEntryDataMap.get(orderEntry); if (orderAware == null) { noOrderAwareItems.add(orderEntry); } else { priorityQueue.add(Pair.create(orderEntry, orderAware)); } } for (int i = 0; i < noOrderAwareItems.size(); i++) { newOrder[i] = noOrderAwareItems.get(i); } int index = noOrderAwareItems.size(); Pair<OrderEntry, OrderAware> pair; while ((pair = priorityQueue.poll()) != null) { newOrder[index] = pair.first; index++; } if (LOG.isDebugEnabled()) { boolean changed = !Arrays.equals(orderEntries, newOrder); LOG.debug(String.format("rearrange status (%s): %s", modifiableRootModel.getModule(), changed ? "modified" : "not modified")); } modifiableRootModel.rearrangeOrderEntries(newOrder); } | rearrangeOrderEntries |
277,336 | void (@NotNull ModifiableRootModel modifiableRootModel, E data) { if (!data.isSetSdkName()) return; if (modifiableRootModel.getSdk() != null) return; String skdName = data.getSdkName(); if (skdName == null) return; ProjectJdkTable projectJdkTable = ProjectJdkTable.getInstance(); Sdk sdk = projectJdkTable.findJdk(skdName); if (sdk == null) return; Project project = modifiableRootModel.getProject(); ProjectRootManager projectRootManager = ProjectRootManager.getInstance(project); Sdk projectSdk = projectRootManager.getProjectSdk(); if (sdk.equals(projectSdk)) { modifiableRootModel.inheritSdk(); } else { modifiableRootModel.setSdk(sdk); } } | importModuleSdk |
277,337 | Key<ModuleDependencyData> () { return ProjectKeys.MODULE_DEPENDENCY; } | getTargetDataKey |
277,338 | Class<ModuleOrderEntry> () { return ModuleOrderEntry.class; } | getOrderEntryType |
277,339 | String (@NotNull IdeModifiableModelsProvider modelsProvider, @NotNull ModuleOrderEntry orderEntry) { String moduleName = orderEntry.getModuleName(); final Module orderEntryModule = orderEntry.getModule(); if (orderEntryModule != null) { moduleName = modelsProvider.getModifiableModuleModel().getActualName(orderEntryModule); } return moduleName; } | getOrderEntryName |
277,340 | void (@NotNull Collection<? extends ExportableOrderEntry> toRemove, @NotNull Module module, @NotNull IdeModifiableModelsProvider modelsProvider) { // do not remove 'invalid' module dependencies on unloaded modules List<? extends ExportableOrderEntry> filteredList = ContainerUtil.filter(toRemove, o -> { if (o instanceof ModuleOrderEntry) { String moduleName = ((ModuleOrderEntry)o).getModuleName(); return ModuleManager.getInstance(module.getProject()).getUnloadedModuleDescription(moduleName) == null; } return true; }); super.removeData(filteredList, module, modelsProvider); } | removeData |
277,341 | KeymapGroup (Condition<? super AnAction> condition, final Project project) { KeymapGroup result = KeymapGroupFactory.getInstance().createGroup( ExternalSystemBundle.message("external.system.keymap.group"), AllIcons.Nodes.ConfigFolder); AnAction[] externalSystemActions = ActionsTreeUtil.getActions("ExternalSystem.Actions"); for (AnAction action : externalSystemActions) { ActionsTreeUtil.addAction(result, action, condition); } if (project == null) return result; MultiMap<ProjectSystemId, String> projectToActionsMapping = MultiMap.create(); for (ExternalSystemManager<?, ?, ?, ?, ?> manager : ExternalSystemApiUtil.getAllManagers()) { projectToActionsMapping.putValues(manager.getSystemId(), ContainerUtil.emptyList()); } ActionManager actionManager = ActionManager.getInstance(); if (actionManager != null) { for (String eachId : actionManager.getActionIdList(getActionPrefix(project, null))) { AnAction eachAction = actionManager.getAction(eachId); if (!(eachAction instanceof MyExternalSystemAction taskAction)) continue; if (condition != null && !condition.value(actionManager.getActionOrStub(eachId))) continue; projectToActionsMapping.putValue(taskAction.getSystemId(), eachId); } } Map<ProjectSystemId, KeymapGroup> keymapGroupMap = new HashMap<>(); for (ProjectSystemId systemId : projectToActionsMapping.keySet()) { if (!keymapGroupMap.containsKey(systemId)) { final Icon projectIcon = ExternalSystemUiUtil.getUiAware(systemId).getProjectIcon(); KeymapGroup group = KeymapGroupFactory.getInstance().createGroup(systemId.getReadableName(), projectIcon); keymapGroupMap.put(systemId, group); } } for (Map.Entry<ProjectSystemId, Collection<String>> each : projectToActionsMapping.entrySet()) { Collection<String> tasks = each.getValue(); final ProjectSystemId systemId = each.getKey(); final KeymapGroup systemGroup = keymapGroupMap.get(systemId); if (systemGroup == null) continue; for (String actionId : tasks) { systemGroup.addActionId(actionId); } if (systemGroup instanceof Group) { Icon icon = AllIcons.General.Add; ((Group)systemGroup).addHyperlink(new Hyperlink(icon, ExternalSystemBundle.message("link.label.choose.task.to.assign.shortcut")) { @Override public void onClick(MouseEvent e) { SelectExternalTaskDialog dialog = new SelectExternalTaskDialog(systemId, project); if (dialog.showAndGet() && dialog.getResult() != null) { TaskData taskData = dialog.getResult().second; String ownerModuleName = dialog.getResult().first; ExternalSystemTaskAction externalSystemAction = (ExternalSystemTaskAction)getOrRegisterAction(project, ownerModuleName, taskData); ApplicationManager.getApplication().getMessageBus().syncPublisher(KeymapListener.CHANGE_TOPIC).processCurrentKeymapChanged(); Settings allSettings = Settings.KEY.getData(DataManager.getInstance().getDataContext(e.getComponent())); KeymapPanel keymapPanel = allSettings != null ? allSettings.find(KeymapPanel.class) : null; if (keymapPanel != null) { // clear actions filter keymapPanel.showOption(""); keymapPanel.selectAction(externalSystemAction.myId); } } } }); } } for (KeymapGroup keymapGroup : keymapGroupMap.values()) { if (isGroupFiltered(condition, keymapGroup)) { result.addGroup(keymapGroup); } } for (ActionsProvider extension : ActionsProvider.EP_NAME.getExtensionList()) { KeymapGroup keymapGroup = extension.createGroup(condition, project); if (isGroupFiltered(condition, keymapGroup)) { result.addGroup(keymapGroup); } } return result; } | createGroup |
277,342 | void (MouseEvent e) { SelectExternalTaskDialog dialog = new SelectExternalTaskDialog(systemId, project); if (dialog.showAndGet() && dialog.getResult() != null) { TaskData taskData = dialog.getResult().second; String ownerModuleName = dialog.getResult().first; ExternalSystemTaskAction externalSystemAction = (ExternalSystemTaskAction)getOrRegisterAction(project, ownerModuleName, taskData); ApplicationManager.getApplication().getMessageBus().syncPublisher(KeymapListener.CHANGE_TOPIC).processCurrentKeymapChanged(); Settings allSettings = Settings.KEY.getData(DataManager.getInstance().getDataContext(e.getComponent())); KeymapPanel keymapPanel = allSettings != null ? allSettings.find(KeymapPanel.class) : null; if (keymapPanel != null) { // clear actions filter keymapPanel.showOption(""); keymapPanel.selectAction(externalSystemAction.myId); } } } | onClick |
277,343 | void (Project project, @NotNull Collection<? extends DataNode<TaskData>> taskData) { clearActions(project, taskData); createActions(project, taskData); } | updateActions |
277,344 | ExternalSystemAction (Project project, String group, TaskData taskData) { ExternalSystemTaskAction action = new ExternalSystemTaskAction(project, group, taskData); ActionManager manager = ActionManager.getInstance(); AnAction anAction = manager.getAction(action.getId()); if (anAction instanceof ExternalSystemTaskAction && action.equals(anAction)) { return (ExternalSystemAction)anAction; } manager.replaceAction(action.getId(), action); return action; } | getOrRegisterAction |
277,345 | boolean (Condition<? super AnAction> condition, KeymapGroup keymapGroup) { final EmptyAction emptyAction = new EmptyAction(); if (condition != null && !condition.value(emptyAction) && keymapGroup instanceof Group group) { return group.getSize() > 1 || condition.value(new EmptyAction(group.getName(), null, null)); } return true; } | isGroupFiltered |
277,346 | void (Project project, Collection<? extends DataNode<TaskData>> taskNodes) { ActionManager actionManager = ActionManager.getInstance(); final ExternalSystemShortcutsManager shortcutsManager = ExternalProjectsManagerImpl.getInstance(project).getShortcutsManager(); if (actionManager != null) { for (DataNode<TaskData> each : taskNodes) { final DataNode<ModuleData> moduleData = ExternalSystemApiUtil.findParent(each, ProjectKeys.MODULE); if (moduleData == null || moduleData.isIgnored()) continue; TaskData taskData = each.getData(); ExternalSystemTaskAction eachAction = new ExternalSystemTaskAction(project, moduleData.getData().getInternalName(), taskData); if (shortcutsManager.hasShortcuts(taskData.getLinkedExternalProjectPath(), taskData.getName())) { actionManager.replaceAction(eachAction.getId(), eachAction); } else { actionManager.unregisterAction(eachAction.getId()); } } } } | createActions |
277,347 | void (@NotNull ExternalSystemShortcutsManager externalSystemShortcutsManager) { ActionManager manager = ActionManager.getInstance(); if (manager != null) { for (String each : manager.getActionIdList(getActionPrefix(externalSystemShortcutsManager, null))) { manager.unregisterAction(each); } } } | clearActions |
277,348 | void (Project project, Collection<? extends DataNode<TaskData>> taskData) { ActionManager actionManager = ActionManager.getInstance(); if (actionManager != null) { Set<String> externalProjectPaths = new HashSet<>(); for (DataNode<TaskData> node : taskData) { externalProjectPaths.add(node.getData().getLinkedExternalProjectPath()); } for (String externalProjectPath : externalProjectPaths) { for (String eachAction : actionManager.getActionIdList(getActionPrefix(project, externalProjectPath))) { AnAction action = actionManager.getAction(eachAction); if (!(action instanceof ExternalSystemRunConfigurationAction)) { actionManager.unregisterAction(eachAction); } } } } } | clearActions |
277,349 | String (@NotNull Project project, @Nullable String path) { ExternalSystemShortcutsManager externalSystemShortcutsManager = ExternalProjectsManagerImpl.getInstance(project).getShortcutsManager(); return getActionPrefix(externalSystemShortcutsManager, path); } | getActionPrefix |
277,350 | String (@NotNull ExternalSystemShortcutsManager externalSystemShortcutsManager, @Nullable String path) { return externalSystemShortcutsManager.getActionId(path, null); } | getActionPrefix |
277,351 | void (Project project, ProjectSystemId systemId) { final AbstractExternalSystemTaskConfigurationType configurationType = ExternalSystemUtil.findConfigurationType(systemId); if (configurationType == null) return; ActionManager actionManager = ActionManager.getInstance(); for (String eachAction : actionManager.getActionIdList(getActionPrefix(project, null))) { AnAction action = actionManager.getAction(eachAction); if (action instanceof ExternalSystemRunConfigurationAction) { actionManager.unregisterAction(eachAction); } } Set<RunnerAndConfigurationSettings> settings = new HashSet<>( RunManager.getInstance(project).getConfigurationSettingsList(configurationType)); final ExternalSystemShortcutsManager shortcutsManager = ExternalProjectsManagerImpl.getInstance(project).getShortcutsManager(); for (RunnerAndConfigurationSettings configurationSettings : settings) { ExternalSystemRunConfigurationAction runConfigurationAction = new ExternalSystemRunConfigurationAction(project, configurationSettings); String id = runConfigurationAction.getId(); if (shortcutsManager.hasShortcuts(id)) { actionManager.replaceAction(id, runConfigurationAction); } else { actionManager.unregisterAction(id); } } } | updateRunConfigurationActions |
277,352 | ExternalSystemAction (Project project, RunnerAndConfigurationSettings configurationSettings) { ActionManager manager = ActionManager.getInstance(); ExternalSystemRunConfigurationAction runConfigurationAction = new ExternalSystemRunConfigurationAction(project, configurationSettings); String id = runConfigurationAction.getId(); manager.replaceAction(id, runConfigurationAction); return runConfigurationAction; } | getOrRegisterAction |
277,353 | boolean (@NotNull AnActionEvent e) { return hasProject(e); } | isEnabled |
277,354 | void (@NotNull AnActionEvent e) { final ExternalTaskExecutionInfo taskExecutionInfo = ExternalSystemActionUtil.buildTaskInfo(myTaskData); ExternalSystemUtil.runTask( taskExecutionInfo.getSettings(), taskExecutionInfo.getExecutorId(), getProject(e), myTaskData.getOwner(), null, ProgressExecutionMode.NO_PROGRESS_ASYNC); } | actionPerformed |
277,355 | TaskData () { return myTaskData; } | getTaskData |
277,356 | String () { return myTaskData.toString(); } | toString |
277,357 | String () { return myGroup; } | getGroup |
277,358 | ProjectSystemId () { return myTaskData.getOwner(); } | getSystemId |
277,359 | String () { return myId; } | getId |
277,360 | boolean (Object o) { if (this == o) return true; if (!(o instanceof ExternalSystemTaskAction action)) return false; if (myId != null ? !myId.equals(action.myId) : action.myId != null) return false; if (myGroup != null ? !myGroup.equals(action.myGroup) : action.myGroup != null) return false; if (!myTaskData.equals(action.myTaskData)) return false; return true; } | equals |
277,361 | int () { int result = myId != null ? myId.hashCode() : 0; result = 31 * result + (myGroup != null ? myGroup.hashCode() : 0); result = 31 * result + myTaskData.hashCode(); return result; } | hashCode |
277,362 | boolean (@NotNull AnActionEvent e) { return hasProject(e); } | isEnabled |
277,363 | void (@NotNull AnActionEvent e) { ProgramRunnerUtil.executeConfiguration(myConfigurationSettings, DefaultRunExecutor.getRunExecutorInstance()); } | actionPerformed |
277,364 | String () { return myConfigurationSettings.toString(); } | toString |
277,365 | String () { return myGroup; } | getGroup |
277,366 | ProjectSystemId () { return systemId; } | getSystemId |
277,367 | String () { return myId; } | getId |
277,368 | void (@NotNull Collection<? extends DataNode<E>> toImport, @Nullable ProjectData projectData, @NotNull Project project, @NotNull IdeModifiableModelsProvider modelsProvider) { if (toImport.isEmpty()) { return; } MultiMap<DataNode<ModuleData>, DataNode<E>> byModule = ExternalSystemApiUtil.groupBy(toImport, ModuleData.class); for (Map.Entry<DataNode<ModuleData>, Collection<DataNode<E>>> entry : byModule.entrySet()) { final DataNode<ModuleData> moduleDataNode = entry.getKey(); Module module = modelsProvider.findIdeModule(moduleDataNode.getData()); if (module == null) { LOG.warn(String.format( "Can't import dependencies %s. Reason: target module (%s) is not found at the ide and can't be imported", entry.getValue(), moduleDataNode )); continue; } final Map<OrderEntry, OrderAware> moduleDependenciesOrder = importData(entry.getValue(), module, modelsProvider); final Map<OrderEntry, OrderAware> orderEntryDataMap = moduleDataNode.getUserData(AbstractModuleDataService.ORDERED_DATA_MAP_KEY); if(orderEntryDataMap != null) { orderEntryDataMap.putAll(moduleDependenciesOrder); } else { moduleDataNode.putUserData(AbstractModuleDataService.ORDERED_DATA_MAP_KEY, moduleDependenciesOrder); } } } | importData |
277,369 | Computable<Collection<I>> (final @NotNull Collection<? extends DataNode<E>> toImport, @NotNull final ProjectData projectData, @NotNull final Project project, @NotNull final IdeModifiableModelsProvider modelsProvider) { return () -> { MultiMap<String /*module name*/, String /*dep name*/> byModuleName = MultiMap.create(); for (DataNode<E> node : toImport) { final E data = node.getData(); Module ownerModule = modelsProvider.findIdeModule(data.getOwnerModule()); if (ownerModule == null && modelsProvider.getUnloadedModuleDescription(data.getOwnerModule()) != null) { continue; } assert ownerModule != null; String depName; if(data instanceof ModuleDependencyData) { Module targetModule = modelsProvider.findIdeModule(((ModuleDependencyData)data).getTarget()); if (targetModule == null && modelsProvider.getUnloadedModuleDescription(((ModuleDependencyData)data).getTarget()) != null) { continue; } assert targetModule != null; depName = targetModule.getName(); } else { depName = getInternalName(data); } byModuleName.putValue(ownerModule.getName(), depName); } final ModifiableModuleModel modifiableModuleModel = modelsProvider.getModifiableModuleModel(); List<I> orphanEntries = new SmartList<>(); for (Module module : modelsProvider.getModules(projectData)) { for (OrderEntry entry : modelsProvider.getOrderEntries(module)) { // do not remove recently created library w/o name if (entry instanceof LibraryOrderEntry && ((LibraryOrderEntry)entry).getLibraryName() == null && ((LibraryOrderEntry)entry).getRootUrls(OrderRootType.CLASSES).length == 0) { continue; } if (getOrderEntryType().isInstance(entry)) { final String moduleName = modifiableModuleModel.getActualName(entry.getOwnerModule()); //noinspection unchecked if (!byModuleName.get(moduleName).contains(getOrderEntryName(modelsProvider, (I)entry))) { //noinspection unchecked orphanEntries.add((I)entry); } } } } return orphanEntries; }; } | computeOrphanData |
277,370 | String (@NotNull IdeModifiableModelsProvider modelsProvider, @NotNull I orderEntry) { return orderEntry.getPresentableName(); } | getOrderEntryName |
277,371 | void (Computable<? extends Collection<? extends I>> toRemoveComputable, @NotNull Collection<? extends DataNode<E>> toIgnore, @NotNull ProjectData projectData, @NotNull Project project, @NotNull IdeModifiableModelsProvider modelsProvider) { Map<Module, Collection<ExportableOrderEntry>> byModule = groupByModule(toRemoveComputable.compute()); for (Map.Entry<Module, Collection<ExportableOrderEntry>> entry : byModule.entrySet()) { removeData(entry.getValue(), entry.getKey(), modelsProvider); } } | removeData |
277,372 | void (@NotNull Collection<? extends ExportableOrderEntry> toRemove, @NotNull Module module, @NotNull IdeModifiableModelsProvider modelsProvider) { if (toRemove.isEmpty()) { return; } final ModifiableRootModel modifiableRootModel = modelsProvider.getModifiableRootModel(module); for (final ExportableOrderEntry dependency : toRemove) { modifiableRootModel.removeOrderEntry(dependency); } } | removeData |
277,373 | String (final AbstractDependencyData<?> data) { if (data instanceof LibraryDependencyData) { final String name = data.getInternalName(); if (StringUtil.isNotEmpty(name)) { return name; } else { Set<String> paths = ((LibraryDependencyData)data).getTarget().getPaths(LibraryPathType.BINARY); if (!paths.isEmpty()) { String url = paths.iterator().next(); return PathUtil.toPresentableUrl(url); } else { return ProjectModelBundle.message("empty.library.title"); } } } return data.getInternalName(); } | getInternalName |
277,374 | void (@NotNull IdeaPluginDescriptor pluginDescriptor, boolean isUpdate) { Set<ProjectSystemId> availableES = new HashSet<>(); for (ExternalSystemManager<?, ?, ?, ?, ?> manager : ExternalSystemManager.EP_NAME.getExtensionList()) { ProjectSystemId id = manager.getSystemId(); availableES.add(id); } Iterator<ExternalProjectsView> iterator = myProjectsViews.iterator(); while (iterator.hasNext()) { ExternalProjectsView view = iterator.next(); if (!availableES.contains(view.getSystemId())) { iterator.remove(); } if (view instanceof Disposable) { Disposer.dispose((Disposable)view); } } } | pluginUnloaded |
277,375 | ExternalProjectsManagerImpl (@NotNull Project project) { return (ExternalProjectsManagerImpl)ExternalProjectsManager.getInstance(project); } | getInstance |
277,376 | void (boolean value) { ExternalStorageConfigurationManager externalStorageConfigurationManager = ExternalStorageConfigurationManager.getInstance(myProject); if (externalStorageConfigurationManager.isEnabled() == value) return; externalStorageConfigurationManager.setEnabled(value); // force re-save try { for (Module module : ModuleManager.getInstance(myProject).getModules()) { if (!module.isDisposed()) { ExternalSystemModulePropertyManager.getInstance(module).swapStore(); } } } catch (Exception e) { LOG.warn(e); } } | setStoreExternally |
277,377 | Project () { return myProject; } | getProject |
277,378 | ExternalSystemShortcutsManager () { return myShortcutsManager; } | getShortcutsManager |
277,379 | ExternalSystemTaskActivator () { return myTaskActivator; } | getTaskActivator |
277,380 | ExternalSystemProjectsWatcher () { return myWatcher; } | getExternalProjectsWatcher |
277,381 | void (@NotNull ExternalProjectsView externalProjectsView) { assert getExternalProjectsView(externalProjectsView.getSystemId()) == null; myProjectsViews.add(externalProjectsView); if (externalProjectsView instanceof ExternalProjectsViewImpl view) { view.loadState(myState.getExternalSystemsState().get(externalProjectsView.getSystemId().getId()).getProjectsViewState()); view.init(); } } | registerView |
277,382 | void () { ProgressManager.checkCanceled(); if (isInitializationStarted.getAndSet(true)) { return; } // load external projects data ExternalProjectsDataStorage.getInstance(myProject).load(); myRunManagerListener.attach(); // init shortcuts manager myShortcutsManager.init(); for (ExternalSystemManager<?, ?, ?, ?, ?> systemManager : ExternalSystemManager.EP_NAME.getIterable()) { Collection<ExternalProjectInfo> externalProjects = ExternalProjectsDataStorage.getInstance(myProject).list(systemManager.getSystemId()); for (ExternalProjectInfo externalProject : externalProjects) { if (externalProject.getExternalProjectStructure() == null) { continue; } Collection<DataNode<TaskData>> taskData = ExternalSystemApiUtil.findAllRecursively(externalProject.getExternalProjectStructure(), TASK); myShortcutsManager.scheduleKeymapUpdate(taskData); } if (!externalProjects.isEmpty()) { myShortcutsManager.scheduleRunConfigurationKeymapUpdate(systemManager.getSystemId()); } } // init task activation info myTaskActivator.init(); synchronized (isInitializationFinished) { isInitializationFinished.set(true); invokeLater(() -> { myPostInitializationActivities.run(); myPostInitializationActivities.clear(); }); ApplicationManager.getApplication().executeOnPooledThread(() -> { myPostInitializationBGActivities.run(); myPostInitializationBGActivities.clear(); }); } } | init |
277,383 | void (final @NotNull String externalProjectPath, final @NotNull ImportSpec importSpec) { ExternalSystemUtil.refreshProject(externalProjectPath, importSpec); } | refreshProject |
277,384 | void (@NotNull Runnable runnable) { if (isDisposed.get()) return; synchronized (isInitializationFinished) { if (isInitializationFinished.get()) { invokeLater(runnable); } else { myPostInitializationActivities.add(runnable); } } } | runWhenInitialized |
277,385 | void (@NotNull Runnable runnable) { if (isDisposed.get()) return; synchronized (isInitializationFinished) { if (isInitializationFinished.get()) { ApplicationManager.getApplication().executeOnPooledThread(runnable); } else { myPostInitializationBGActivities.add(runnable); } } } | runWhenInitializedInBackground |
277,386 | void (@NotNull Runnable runnable) { ApplicationManager.getApplication().invokeLater(runnable, o -> myProject.isDisposed() || isDisposed.get()); } | invokeLater |
277,387 | void (ExternalProjectInfo externalProject) { // update external projects data ExternalProjectsDataStorage.getInstance(myProject).update(externalProject); // update shortcuts manager if (externalProject.getExternalProjectStructure() != null) { final ProjectData projectData = externalProject.getExternalProjectStructure().getData(); ExternalSystemUtil.scheduleExternalViewStructureUpdate(myProject, projectData.getOwner()); Collection<DataNode<TaskData>> taskData = ExternalSystemApiUtil.findAllRecursively(externalProject.getExternalProjectStructure(), TASK); myShortcutsManager.scheduleKeymapUpdate(taskData); myShortcutsManager.scheduleRunConfigurationKeymapUpdate(projectData.getOwner()); } } | updateExternalProjectData |
277,388 | void (@NotNull ProjectSystemId projectSystemId, @NotNull String linkedProjectPath) { ExternalProjectsDataStorage.getInstance(myProject).remove(projectSystemId, linkedProjectPath); ExternalSystemUtil.scheduleExternalViewStructureUpdate(myProject, projectSystemId); } | forgetExternalProjectData |
277,389 | ExternalProjectsState () { for (ExternalProjectsView externalProjectsView : myProjectsViews) { if (externalProjectsView instanceof ExternalProjectsViewImpl) { final ExternalProjectsViewState externalProjectsViewState = ((ExternalProjectsViewImpl)externalProjectsView).getState(); final ExternalProjectsState.State state = myState.getExternalSystemsState().get(externalProjectsView.getSystemId().getId()); assert state != null; state.setProjectsViewState(externalProjectsViewState); } } return myState; } | getState |
277,390 | ExternalProjectsStateProvider () { return new ExternalProjectsStateProvider() { @Override public List<TasksActivation> getAllTasksActivation() { List<TasksActivation> result = new SmartList<>(); Map<String, ProjectSystemId> systemIds = ExternalSystemApiUtil.getAllManagers().stream() .collect(Collectors.toMap(o -> o.getSystemId().getId(), o -> o.getSystemId())); for (Map.Entry<String, ExternalProjectsState.State> systemState : myState.getExternalSystemsState().entrySet()) { ProjectSystemId systemId = systemIds.get(systemState.getKey()); if (systemId == null) continue; for (Map.Entry<String, TaskActivationState> activationStateEntry : systemState.getValue().getExternalSystemsTaskActivation() .entrySet()) { result.add(new TasksActivation(systemId, activationStateEntry.getKey(), activationStateEntry.getValue())); } } return result; } @Override public TaskActivationState getTasksActivation(@NotNull ProjectSystemId systemId, @NotNull String projectPath) { return myState.getExternalSystemsState().get(systemId.getId()).getExternalSystemsTaskActivation().get(projectPath); } @Override public Map<String, TaskActivationState> getProjectsTasksActivationMap(final @NotNull ProjectSystemId systemId) { return myState.getExternalSystemsState().get(systemId.getId()).getExternalSystemsTaskActivation(); } }; } | getStateProvider |
277,391 | List<TasksActivation> () { List<TasksActivation> result = new SmartList<>(); Map<String, ProjectSystemId> systemIds = ExternalSystemApiUtil.getAllManagers().stream() .collect(Collectors.toMap(o -> o.getSystemId().getId(), o -> o.getSystemId())); for (Map.Entry<String, ExternalProjectsState.State> systemState : myState.getExternalSystemsState().entrySet()) { ProjectSystemId systemId = systemIds.get(systemState.getKey()); if (systemId == null) continue; for (Map.Entry<String, TaskActivationState> activationStateEntry : systemState.getValue().getExternalSystemsTaskActivation() .entrySet()) { result.add(new TasksActivation(systemId, activationStateEntry.getKey(), activationStateEntry.getValue())); } } return result; } | getAllTasksActivation |
277,392 | TaskActivationState (@NotNull ProjectSystemId systemId, @NotNull String projectPath) { return myState.getExternalSystemsState().get(systemId.getId()).getExternalSystemsTaskActivation().get(projectPath); } | getTasksActivation |
277,393 | boolean (@NotNull ProjectSystemId systemId, @NotNull String projectPath) { final ExternalProjectInfo projectInfo = ExternalSystemUtil.getExternalProjectInfo(myProject, systemId, projectPath); if (projectInfo == null) return true; return ExternalProjectsDataStorage.getInstance(myProject).isIgnored(projectInfo.getExternalProjectPath(), projectPath, MODULE); } | isIgnored |
277,394 | void (@NotNull DataNode<?> dataNode, boolean isIgnored) { ExternalProjectsDataStorage.getInstance(myProject).setIgnored(dataNode, isIgnored); ExternalSystemKeymapExtension.updateActions(myProject, ExternalSystemApiUtil.findAllRecursively(dataNode, TASK)); } | setIgnored |
277,395 | void (@NotNull ExternalProjectsState state) { myState = state; // migrate to new if (myState.storeExternally) { myState.storeExternally = false; ExternalStorageConfigurationManager.getInstance(myProject).setEnabled(true); } } | loadState |
277,396 | void () { if (isDisposed.getAndSet(true)) return; myPostInitializationActivities.clear(); myPostInitializationBGActivities.clear(); myProjectsViews.clear(); myRunManagerListener.detach(); } | dispose |
277,397 | Key<LibraryDependencyData> () { return ProjectKeys.LIBRARY_DEPENDENCY; } | getTargetDataKey |
277,398 | Class<LibraryOrderEntry> () { return LibraryOrderEntry.class; } | getOrderEntryType |
277,399 | void (@NotNull IdeModifiableModelsProvider modelsProvider, @NotNull Set<LibraryDependencyData> toImport, @NotNull Map<OrderEntry, OrderAware> orderEntryDataMap, @NotNull ModifiableRootModel moduleRootModel, @NotNull LibraryTable moduleLibraryTable, @NotNull Module module) { for (final LibraryDependencyData dependencyData : toImport) { final LibraryData libraryData = dependencyData.getTarget(); final String libraryName = libraryData.getInternalName(); switch (dependencyData.getLevel()) { case MODULE -> { final Library moduleLib; if (libraryName.isEmpty()) { moduleLib = moduleLibraryTable.createLibrary(); } else { moduleLib = moduleLibraryTable.createLibrary(libraryName); } final LibraryOrderEntry existingLibraryDependency = syncExistingLibraryDependency(modelsProvider, dependencyData, moduleLib, moduleRootModel, module); orderEntryDataMap.put(existingLibraryDependency, dependencyData); } case PROJECT -> { final Library projectLib = modelsProvider.getLibraryByName(libraryName); if (projectLib == null) { final LibraryOrderEntry existingProjectLibraryDependency = syncExistingLibraryDependency( modelsProvider, dependencyData, moduleLibraryTable.createLibrary(libraryName), moduleRootModel, module); orderEntryDataMap.put(existingProjectLibraryDependency, dependencyData); break; } LibraryOrderEntry orderEntry = moduleRootModel.addLibraryEntry(projectLib); setLibraryScope(orderEntry, projectLib, module, dependencyData); ModuleOrderEntry substitutionEntry = modelsProvider.trySubstitute(module, orderEntry, libraryData); if (substitutionEntry != null) { orderEntryDataMap.put(substitutionEntry, dependencyData); } else { orderEntryDataMap.put(orderEntry, dependencyData); } } } } } | importMissing |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.