Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
21,400
void (ProjectNode node, ProjectsGroupNode newParentNode) { ProjectsGroupNode oldParentNode = node.getGroup(); if (oldParentNode == null || !oldParentNode.equals(newParentNode)) { if (oldParentNode != null) { oldParentNode.remove(node); } newParentNode.add(node); } else { newParentNode.sortProjects(); } }
reconnectNode
21,401
void () { myRoot.updateProfiles(); }
updateProfiles
21,402
void (List<MavenProject> projects) { for (MavenProject each : projects) { ProjectNode node = findNodeFor(each); if (node == null) continue; node.updateIgnored(); } }
updateIgnored
21,403
void (@NotNull TreeVisitor visitor) { ((AsyncTreeModel)myTree.getModel()).accept(visitor); }
accept
21,404
void () { for (ProjectNode each : myProjectToNodeMapping.values()) { each.updateGoals(); } }
updateGoals
21,405
void () { for (ProjectNode each : myProjectToNodeMapping.values()) { each.updateRunConfigurations(); } }
updateRunConfigurations
21,406
void (MavenProject project) { ProjectNode node = findNodeFor(project); if (node != null) select(node); }
select
21,407
void (SimpleNode node) { myModel.select(node, myTree, treePath -> {}); }
select
21,408
ProjectNode (MavenProject project) { return myProjectToNodeMapping.get(project); }
findNodeFor
21,409
boolean () { if (getDisplayMode() == MavenStructureDisplayMode.SHOW_GOALS) { return false; } return getProjectsNavigator().getShowBasicPhasesOnly(); }
showOnlyBasicPhases
21,410
List<SimpleNode> (SimpleTree tree) { List<SimpleNode> nodes = new ArrayList<>(); TreePath[] treePaths = tree.getSelectionPaths(); if (treePaths != null) { for (TreePath treePath : treePaths) { nodes.add(tree.getNodeFor(treePath)); } } return nodes; }
getSelectedNodes
21,411
void () { File localRepository = getProjectsManager().getLocalRepository(); List<PluginNode> pluginInfos = new ArrayList<>(); Iterator<MavenPlugin> iterator = myPlugins.iterator(); while(!isUnloading && iterator.hasNext()){ MavenPlugin next = iterator.next(); var pluginInfo = MavenArtifactUtil.readPluginInfo(localRepository, next.getMavenId()); var pluginNode = new PluginNode(MavenProjectsStructure.this, myParentNode, next, pluginInfo); pluginInfos.add(pluginNode); } updateNodesInEDT(pluginInfos); }
run
21,412
void (List<PluginNode> pluginNodes) { ApplicationManager.getApplication().invokeLater(() -> { myParentNode.getPluginNodes().clear(); if(isUnloading) return; myParentNode.getPluginNodes().addAll(pluginNodes); myParentNode.sort(myParentNode.getPluginNodes()); myParentNode.childrenChanged(); }); }
updateNodesInEDT
21,413
List<ProjectNode> () { return myProjectNodes; }
getProjectNodesInTests
21,414
void (ProjectNode projectNode) { projectNode.setParent(this); insertSorted(myProjectNodes, projectNode); childrenChanged(); }
add
21,415
void (ProjectNode projectNode) { projectNode.setParent(null); myProjectNodes.remove(projectNode); childrenChanged(); }
remove
21,416
void () { sort(myProjectNodes); childrenChanged(); }
sortProjects
21,417
int (String o1, String o2) { return getStandardGoalOrder(o1) - getStandardGoalOrder(o2); }
compare
21,418
int (String goal) { if (standardGoalOrder == null) { standardGoalOrder = new HashMap<>(); int i = 0; for (String aGoal : MavenConstants.PHASES) { standardGoalOrder.put(aGoal, i++); } } Integer order = standardGoalOrder.get(goal); return order != null ? order.intValue() : standardGoalOrder.size(); }
getStandardGoalOrder
21,419
void (final Component comp, final int x, final int y) { final String id = getMenuId(MavenProjectsStructure.getSelectedNodes(myTree, MavenSimpleNode.class)); if (id != null) { final ActionGroup actionGroup = (ActionGroup)actionManager.getAction(id); if (actionGroup != null) { actionManager.createActionPopupMenu(TOOL_WINDOW_PLACE_ID, actionGroup).getComponent().show(comp, x, y); } } }
invokePopup
21,420
String (Collection<? extends MavenSimpleNode> nodes) { String id = null; for (MavenSimpleNode node : nodes) { String menuId = node.getMenuId(); if (menuId == null) { return null; } if (id == null) { id = menuId; } else if (!id.equals(menuId)) { return null; } } return id; }
getMenuId
21,421
Object (@NotNull @NonNls String dataId) { if (PlatformCoreDataKeys.BGT_DATA_PROVIDER.is(dataId)) { @NotNull List<MavenSimpleNode> selectedNodes = MavenProjectsStructure.getSelectedNodes(myTree, MavenSimpleNode.class); return (DataProvider)slowId -> getSlowData(slowId, selectedNodes); } if (PlatformCoreDataKeys.HELP_ID.is(dataId)) return "reference.toolWindows.mavenProjects"; if (CommonDataKeys.PROJECT.is(dataId)) return myProject; if (MavenDataKeys.MAVEN_PROJECTS_TREE.is(dataId)) { return myTree; } return super.getData(dataId); }
getData
21,422
VirtualFile (@NotNull List<MavenSimpleNode> selectedNodes) { for (MavenSimpleNode each : selectedNodes) { VirtualFile file = each.getVirtualFile(); if (file != null && file.isValid()) return file; } var projectNode = getContextProjectNode(selectedNodes); if (projectNode == null) return null; VirtualFile file = projectNode.getMavenProject().getFile(); if (!file.isValid()) return null; return file; }
extractVirtualFile
21,423
Object (@NotNull List<MavenSimpleNode> selectedNodes) { final List<VirtualFile> files = new ArrayList<>(); for (MavenSimpleNode each : selectedNodes) { VirtualFile file = each.getVirtualFile(); if (file != null && file.isValid()) files.add(file); } return files.isEmpty() ? null : VfsUtilCore.toVirtualFileArray(files); }
extractVirtualFiles
21,424
Object (@NotNull List<MavenSimpleNode> selectedNodes) { final List<Navigatable> navigatables = new ArrayList<>(); for (MavenSimpleNode each : selectedNodes) { Navigatable navigatable = each.getNavigatable(); if (navigatable != null) navigatables.add(navigatable); } return navigatables.isEmpty() ? null : navigatables.toArray(Navigatable.EMPTY_NAVIGATABLE_ARRAY); }
extractNavigatables
21,425
Object (@NotNull List<MavenSimpleNode> selectedNodes) { VirtualFile file = extractVirtualFile(selectedNodes); if (file == null) return null; List<String> goals = extractGoals(false, selectedNodes); if (goals == null) return null; PsiFile psiFile = PsiManager.getInstance(myProject).findFile(file); return psiFile == null ? null : new MavenGoalLocation(myProject, psiFile, goals); }
extractLocation
21,426
RunnerAndConfigurationSettings (@NotNull List<MavenSimpleNode> selectedNodes) { @Nullable MavenSimpleNode node = selectedNodes.isEmpty() ? null : selectedNodes.get(0); if (!(node instanceof RunConfigurationNode)) return null; return ((RunConfigurationNode)node).getSettings(); }
extractRunSettings
21,427
List<String> (boolean qualifiedGoals, @NotNull List<MavenSimpleNode> selectedNodes) { List<ProjectNode> projectNodes = filterNodesByClass(selectedNodes, ProjectNode.class); final ProjectNode projectNode = projectNodes.size() == 1 ? projectNodes.get(0) : null; if (projectNode != null) { MavenProject project = projectNode.getMavenProject(); String goal = project.getDefaultGoal(); if (!StringUtil.isEmptyOrSpaces(goal)) { // Maven uses StringTokenizer to split defaultGoal. See DefaultLifecycleTaskSegmentCalculator#calculateTaskSegments() return ContainerUtil.newArrayList(StringUtil.tokenize(new StringTokenizer(goal))); } } else { List<MavenGoalNode> goalNodes = filterNodesByClass(selectedNodes, MavenGoalNode.class); if (getCommonProjectNode(goalNodes) == null) { return null; } final List<String> goals = new ArrayList<>(); for (MavenGoalNode node : goalNodes) { goals.add(qualifiedGoals ? node.getGoal() : node.getName()); } goals.sort(myGoalOrderComparator); return goals; } return null; }
extractGoals
21,428
MavenProjectNode (Collection<? extends MavenSimpleNode> nodes) { MavenProjectNode parent = null; for (MavenSimpleNode node : nodes) { var nextParent = node.findParentProjectNode(); if (parent == null) { parent = nextParent; } else if (parent != nextParent) { return null; } } return parent; }
getCommonProjectNode
21,429
MavenRepositoryInfo (@NotNull List<MavenSimpleNode> selectedNodes) { List<RepositoryNode> repositoryNodes = filterNodesByClass(selectedNodes, RepositoryNode.class); if (repositoryNodes == null || repositoryNodes.isEmpty()) { return null; } RepositoryNode repositoryNode = repositoryNodes.get(0); return new MavenRepositoryInfo(repositoryNode.getId(), repositoryNode.getUrl(), repositoryNode.isLocal() ? IndexKind.LOCAL : IndexKind.REMOTE); }
extractRepositoryInfo
21,430
Set<MavenArtifact> (@NotNull List<MavenSimpleNode> selectedNodes) { Set<MavenArtifact> result = new HashSet<>(); List<ProjectNode> projectNodes = filterNodesByClass(selectedNodes, ProjectNode.class); if (!projectNodes.isEmpty()) { for (ProjectNode each : projectNodes) { result.addAll(each.getMavenProject().getDependencies()); } return result; } List<BaseDependenciesNode> baseDependenciesNodes = filterNodesByClass(selectedNodes, BaseDependenciesNode.class); for (BaseDependenciesNode each : baseDependenciesNodes) { if (each instanceof DependenciesNode) { result.addAll(each.getMavenProject().getDependencies()); } else { result.add(((DependencyNode)each).getArtifact()); } } return result; }
extractDependencies
21,431
boolean (final TransferSupport support) { //todo new maven importing if (canImport(support)) { List<VirtualFile> pomFiles = new ArrayList<>(); final List<File> fileList = FileCopyPasteUtil.getFileList(support.getTransferable()); if (fileList == null) return false; MavenProjectsManager manager = MavenProjectsManager.getInstance(myProject); for (File file : fileList) { VirtualFile virtualFile = VfsUtil.findFileByIoFile(file, true); if (file.isFile() && virtualFile != null && MavenActionUtil.isMavenProjectFile(virtualFile) && !manager.isManagedFile(virtualFile)) { pomFiles.add(virtualFile); } } if (pomFiles.isEmpty()) { return false; } manager.addManagedFilesOrUnignore(pomFiles); return true; } return false; }
importData
21,432
boolean (final TransferSupport support) { return FileCopyPasteUtil.isFileListFlavorAvailable(support.getDataFlavors()); }
canImport
21,433
MavenProject () { return myMavenProject; }
getMavenProject
21,434
boolean () { var childrenUpdate = myChildrenUpdate.get(); if (null != childrenUpdate) { return !childrenUpdate.children.isEmpty(); } return !myChildren.isEmpty(); }
isVisible
21,435
boolean (MavenArtifactNode mavenArtifactNode) { if (mavenArtifactNode.getArtifact().isFileUnresolved()) { return true; } for (var dependency : mavenArtifactNode.getDependencies()) { if (hasUnresolvedFile(dependency)) { return true; } } return false; }
hasUnresolvedFile
21,436
record (List<MavenArtifactNode> children, MavenProject mavenProject) { }
ChildrenUpdate
21,437
void (List<MavenArtifactNode> children, MavenProject mavenProject) { myChildrenUpdate.set(new ChildrenUpdate(children, mavenProject)); childrenChanged(); }
updateChildren
21,438
void (ChildrenUpdate childrenUpdate) { List<MavenArtifactNode> children = childrenUpdate.children(); MavenProject mavenProject = childrenUpdate.mavenProject(); List<DependencyNode> newNodes = null; int validChildCount = 0; for (MavenArtifactNode each : children) { if (each.getState() != MavenArtifactState.ADDED && each.getState() != MavenArtifactState.CONFLICT && each.getState() != MavenArtifactState.DUPLICATE) { continue; } if (newNodes == null) { if (validChildCount < myChildren.size()) { DependencyNode currentValidNode = myChildren.get(validChildCount); if (currentValidNode.getArtifact().equals(each.getArtifact()) && currentValidNode.isUnresolved() == each.getArtifact().isFileUnresolved()) { if (each.getState() == MavenArtifactState.ADDED) { currentValidNode.updateChildren(each.getDependencies(), mavenProject); } validChildCount++; continue; } } newNodes = new ArrayList<>(children.size()); newNodes.addAll(myChildren.subList(0, validChildCount)); } DependencyNode newNode = findOrCreateNodeFor(each, mavenProject, validChildCount); newNodes.add(newNode); if (each.getState() == MavenArtifactState.ADDED) { newNode.updateChildren(each.getDependencies(), mavenProject); } newNode.updateDependency(); } if (newNodes == null) { if (validChildCount == myChildren.size()) { return; // All nodes are valid, child did not changed. } assert validChildCount < myChildren.size(); newNodes = new ArrayList<>(myChildren.subList(0, validChildCount)); } myChildren.clear(); myChildren.addAll(newNodes); childrenChanged(); }
doUpdateChildren
21,439
DependencyNode (MavenArtifactNode artifact, MavenProject mavenProject, int from) { for (int i = from; i < myChildren.size(); i++) { DependencyNode node = myChildren.get(i); if (node.getArtifact().equals(artifact.getArtifact()) && node.isUnresolved() == artifact.getArtifact().isFileUnresolved()) { return node; } } return new DependencyNode(myMavenProjectsStructure, this, artifact, mavenProject, artifact.getArtifact().isFileUnresolved()); }
findOrCreateNodeFor
21,440
String () { return message("view.node.profiles"); }
getName
21,441
void () { Collection<Pair<String, MavenProfileKind>> profiles = myMavenProjectsStructure.getProjectsManager().getProfilesWithStates(); List<ProfileNode> newNodes = new ArrayList<>(profiles.size()); for (Pair<String, MavenProfileKind> each : profiles) { ProfileNode node = findOrCreateNodeFor(each.first); node.setState(each.second); newNodes.add(node); } myProfileNodes.clear(); myProfileNodes.addAll(newNodes); sort(myProfileNodes); childrenChanged(); }
updateProfiles
21,442
ProfileNode (String profileName) { for (ProfileNode each : myProfileNodes) { if (each.getProfileName().equals(profileName)) return each; } return new ProfileNode(myMavenProjectsStructure, this, profileName); }
findOrCreateNodeFor
21,443
MavenArtifact () { return myArtifact; }
getArtifact
21,444
boolean () { return myUnresolved; }
isUnresolved
21,445
String () { return myArtifact.getDisplayStringForLibraryName(); }
getName
21,446
String () { final StringBuilder myToolTip = new StringBuilder(); String scope = myArtifactNode.getOriginalScope(); if (StringUtil.isNotEmpty(scope) && !MavenConstants.SCOPE_COMPILE.equals(scope)) { myToolTip.append(scope).append(" "); } if (myArtifactNode.getState() == MavenArtifactState.CONFLICT) { myToolTip.append("omitted for conflict"); if (myArtifactNode.getRelatedArtifact() != null) { myToolTip.append(" with ").append(myArtifactNode.getRelatedArtifact().getVersion()); } } if (myArtifactNode.getState() == MavenArtifactState.DUPLICATE) { myToolTip.append("omitted for duplicate"); } return myToolTip.toString().trim(); }
getToolTip
21,447
void (@NotNull PresentationData presentation) { setNameAndTooltip(presentation, getName(), null, getToolTip()); }
doUpdate
21,448
void (@NotNull PresentationData presentation, String name, @Nullable String tooltip, SimpleTextAttributes attributes) { final SimpleTextAttributes mergedAttributes; if (myArtifactNode.getState() == MavenArtifactState.CONFLICT || myArtifactNode.getState() == MavenArtifactState.DUPLICATE) { mergedAttributes = SimpleTextAttributes.merge(attributes, SimpleTextAttributes.GRAYED_ATTRIBUTES); } else { mergedAttributes = attributes; } super.setNameAndTooltip(presentation, name, tooltip, mergedAttributes); }
setNameAndTooltip
21,449
Navigatable () { final MavenArtifactNode parent = myArtifactNode.getParent(); final VirtualFile file; if (parent == null) { file = getMavenProject().getFile(); } else { final MavenId id = parent.getArtifact().getMavenId(); final MavenProject pr = MavenProjectsManager.getInstance(myProject).findProject(id); file = pr == null ? MavenNavigationUtil.getArtifactFile(getProject(), id) : pr.getFile(); } return file == null ? null : MavenNavigationUtil.createNavigatableForDependency(getProject(), file, getArtifact()); }
getNavigatable
21,450
boolean () { // show regardless absence of children return getDisplayKind() != MavenProjectsStructure.DisplayKind.NEVER; }
isVisible
21,451
Navigatable () { PluginNode pluginNode = (PluginNode)getParent(); MavenDomPluginModel pluginModel = MavenPluginDomUtil.getMavenPluginModel(myProject, pluginNode.getPlugin().getGroupId(), pluginNode.getPlugin().getArtifactId(), pluginNode.getPlugin().getVersion()); if (pluginModel == null) return null; for (MavenDomMojo mojo : pluginModel.getMojos().getMojos()) { final XmlElement xmlElement = mojo.getGoal().getXmlElement(); if (xmlElement instanceof Navigatable && Objects.equals(myUnqualifiedGoal, mojo.getGoal().getStringValue())) { return new NavigatableAdapter() { @Override public void navigate(boolean requestFocus) { ((Navigatable)xmlElement).navigate(requestFocus); } }; } } return null; }
getNavigatable
21,452
void (boolean requestFocus) { ((Navigatable)xmlElement).navigate(requestFocus); }
navigate
21,453
String () { return message("view.node.lifecycle"); }
getName
21,454
void () { childrenChanged(); }
updateGoalsList
21,455
MavenPlugin () { return myPlugin; }
getPlugin
21,456
String () { return myPluginInfo == null ? myPlugin.getDisplayString() : myPluginInfo.getGoalPrefix(); }
getName
21,457
void (@NotNull PresentationData presentation) { setNameAndTooltip(presentation, getName(), null, myPluginInfo != null ? myPlugin.getDisplayString() : null); }
doUpdate
21,458
void (@Nullable MavenPluginInfo newPluginInfo) { boolean hadPluginInfo = myPluginInfo != null; myPluginInfo = newPluginInfo; boolean hasPluginInfo = myPluginInfo != null; setErrorLevel(myPluginInfo == null ? MavenProjectsStructure.ErrorLevel.ERROR : MavenProjectsStructure.ErrorLevel.NONE); if (hadPluginInfo == hasPluginInfo) return; myGoalNodes.clear(); if (myPluginInfo != null) { for (MavenPluginInfo.Mojo mojo : myPluginInfo.getMojos()) { myGoalNodes.add(new PluginGoalNode(myMavenProjectsStructure, this, mojo.getQualifiedGoal(), mojo.getGoal(), mojo.getDisplayName())); } } sort(myGoalNodes); myMavenProjectsStructure.updateFrom(this); childrenChanged(); }
updatePlugin
21,459
boolean () { // show regardless absence of children return super.isVisible() || getDisplayKind() != MavenProjectsStructure.DisplayKind.NEVER; }
isVisible
21,460
String () { return myProfileName; }
getName
21,461
String () { return myProfileName; }
getProfileName
21,462
MavenProfileKind () { return myState; }
getState
21,463
String () { return "Maven.ToggleProfile"; }
getActionId
21,464
Navigatable () { if (myProject == null) return null; final List<MavenDomProfile> profiles = new ArrayList<>(); // search in "Per User Maven Settings" - %USER_HOME%/.m2/settings.xml // and in "Global Maven Settings" - %M2_HOME%/conf/settings.xml for (VirtualFile virtualFile : myMavenProjectsStructure.getProjectsManager().getGeneralSettings().getEffectiveSettingsFiles()) { if (virtualFile != null) { final MavenDomSettingsModel model = MavenDomUtil.getMavenDomModel(myProject, virtualFile, MavenDomSettingsModel.class); if (model != null) { addProfiles(profiles, model.getProfiles().getProfiles()); } } } for (MavenProject mavenProject : myMavenProjectsStructure.getProjectsManager().getProjects()) { // search in "Profile descriptors" - located in project basedir (profiles.xml) final VirtualFile mavenProjectFile = mavenProject.getFile(); final VirtualFile profilesXmlFile = MavenUtil.findProfilesXmlFile(mavenProjectFile); if (profilesXmlFile != null) { final MavenDomProfiles profilesModel = MavenDomUtil.getMavenDomProfilesModel(myProject, profilesXmlFile); if (profilesModel != null) { addProfiles(profiles, profilesModel.getProfiles()); } } // search in "Per Project" - Defined in the POM itself (pom.xml) final MavenDomProjectModel projectModel = MavenDomUtil.getMavenDomProjectModel(myProject, mavenProjectFile); if (projectModel != null) { addProfiles(profiles, projectModel.getProfiles().getProfiles()); } } return getNavigatable(profiles); }
getNavigatable
21,465
Navigatable (@NotNull final List<MavenDomProfile> profiles) { if (profiles.size() > 1) { return new NavigatableAdapter() { @Override public void navigate(final boolean requestFocus) { JBPopupFactory.getInstance() .createPopupChooserBuilder(profiles) .setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { Component result = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); MavenDomProfile mavenDomProfile = (MavenDomProfile)value; XmlElement xmlElement = mavenDomProfile.getXmlElement(); if (xmlElement != null) { String url = getPresentableUrl(xmlElement); setText(url); } return result; } }) .setTitle(message("maven.notification.choose.file.to.open")) .setItemChosenCallback((value) -> { final Navigatable navigatable = getNavigatable(value); if (navigatable != null) navigatable.navigate(requestFocus); }).createPopup().showInFocusCenter(); } }; } else { return getNavigatable(ContainerUtil.getFirstItem(profiles)); } }
getNavigatable
21,466
void (final boolean requestFocus) { JBPopupFactory.getInstance() .createPopupChooserBuilder(profiles) .setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { Component result = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); MavenDomProfile mavenDomProfile = (MavenDomProfile)value; XmlElement xmlElement = mavenDomProfile.getXmlElement(); if (xmlElement != null) { String url = getPresentableUrl(xmlElement); setText(url); } return result; } }) .setTitle(message("maven.notification.choose.file.to.open")) .setItemChosenCallback((value) -> { final Navigatable navigatable = getNavigatable(value); if (navigatable != null) navigatable.navigate(requestFocus); }).createPopup().showInFocusCenter(); }
navigate
21,467
Component (JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { Component result = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); MavenDomProfile mavenDomProfile = (MavenDomProfile)value; XmlElement xmlElement = mavenDomProfile.getXmlElement(); if (xmlElement != null) { String url = getPresentableUrl(xmlElement); setText(url); } return result; }
getListCellRendererComponent
21,468
String (XmlElement xmlElement) { return ReadAction.nonBlocking(() -> xmlElement.getContainingFile().getVirtualFile().getPresentableUrl()).executeSynchronously(); }
getPresentableUrl
21,469
Navigatable (@Nullable final MavenDomProfile profile) { if (profile == null) return null; XmlElement xmlElement = profile.getId().getXmlElement(); return xmlElement instanceof Navigatable ? (Navigatable)xmlElement : null; }
getNavigatable
21,470
void (@NotNull List<MavenDomProfile> result, @Nullable List<MavenDomProfile> profilesToAdd) { if (profilesToAdd == null) return; for (MavenDomProfile profile : profilesToAdd) { if (StringUtil.equals(profile.getId().getValue(), myProfileName)) { result.add(profile); } } }
addProfiles
21,471
String () { return message("view.node.dependencies"); }
getName
21,472
void () { updateChildren(myMavenProject.getDependencyTree(), myMavenProject); }
updateDependencies
21,473
MavenNodeType () { return MavenNodeType.GOAL; }
getType
21,474
MavenProject () { return myMavenProject; }
getMavenProject
21,475
String () { return myMavenProject.getPath(); }
getProjectPath
21,476
String () { return myGoal; }
getGoal
21,477
String () { return myDisplayName; }
getName
21,478
void (@NotNull PresentationData presentation) { String s1 = StringUtil.nullize(myMavenProjectsStructure.getShortcutsManager().getDescription(myMavenProject, myGoal)); String s2 = StringUtil.nullize(myMavenProjectsStructure.getTasksManager().getDescription(myMavenProject, myGoal)); String hint; if (s1 == null) { hint = s2; } else if (s2 == null) { hint = s1; } else { hint = s1 + ", " + s2; } setNameAndTooltip(presentation, getName(), null, hint); }
doUpdate
21,479
SimpleTextAttributes () { SimpleTextAttributes original = super.getPlainAttributes(); int style = original.getStyle(); Color color = original.getFgColor(); boolean custom = false; if ("test".equals(myGoal) && MavenRunner.getInstance(myProject).getSettings().isSkipTests()) { color = SimpleTextAttributes.GRAYED_ATTRIBUTES.getFgColor(); style |= SimpleTextAttributes.STYLE_STRIKEOUT; custom = true; } if (myGoal.equals(myMavenProject.getDefaultGoal())) { style |= SimpleTextAttributes.STYLE_BOLD; custom = true; } if (custom) return original.derive(style, color, null, null); return original; }
getPlainAttributes
21,480
String () { return "Maven.RunBuild"; }
getActionId
21,481
String () { return "Maven.BuildMenu"; }
getMenuId
21,482
boolean () { if (myMavenProjectsStructure.showOnlyBasicPhases() && !MavenConstants.BASIC_PHASES.contains(getGoal())) return false; return super.isVisible(); }
isVisible
21,483
String () { return myId; }
getName
21,484
String () { return null; }
getMenuId
21,485
Navigatable () { return null; }
getNavigatable
21,486
void (@NotNull PresentationData presentation) { setNameAndTooltip(presentation, myId, null, myLocal ? getPresentablePath(myUrl) : myUrl); }
doUpdate
21,487
boolean () { if (getDisplayKind() == MavenProjectsStructure.DisplayKind.ALWAYS) return true; for (SimpleNode each : getChildren()) { if (((MavenSimpleNode)each).isVisible()) return true; } return false; }
isVisible
21,488
void (List<? extends MavenSimpleNode> list) { list.sort(NODE_COMPARATOR); }
sort
21,489
String () { return message("view.node.run.configurations"); }
getName
21,490
void (MavenProject mavenProject) { final var childChanged = new Ref<>(false); Set<RunnerAndConfigurationSettings> settings = new HashSet<>( RunManager.getInstance(myProject).getConfigurationSettingsList(MavenRunConfigurationType.getInstance())); myChildren.forEach(node -> { if (settings.remove(node.getSettings())) { node.updateRunConfiguration(); } else { myChildren.remove(node); childChanged.set(true); } }); int oldSize = myChildren.size(); for (RunnerAndConfigurationSettings cfg : settings) { MavenRunConfiguration mavenRunConfiguration = (MavenRunConfiguration)cfg.getConfiguration(); if (VfsUtilCore.pathEqualsTo(mavenProject.getDirectoryFile(), mavenRunConfiguration.getRunnerParameters().getWorkingDirPath())) { myChildren.add(new RunConfigurationNode(myMavenProjectsStructure, this, cfg)); } } if (oldSize != myChildren.size()) { childChanged.set(true); sort(myChildren); } if (childChanged.get()) { childrenChanged(); } }
updateRunConfigurations
21,491
MavenId () { return myParentId; }
getParentId
21,492
String () { return myParentRelativePath; }
getParentRelativePath
21,493
RESULT_TYPE (@NotNull MavenGeneralSettings generalSettings, @NotNull VirtualFile projectFile, @Nullable MavenParentDesc parentDesc) { VirtualFile superPom = MavenUtil.getEffectiveSuperPomWithNoRespectToWrapper(myProject); if (superPom == null || projectFile.equals(superPom)) return null; RESULT_TYPE result = null; if (parentDesc == null) { return processSuperParent(superPom); } VirtualFile parentFile = findManagedFile(parentDesc.getParentId()); if (parentFile != null) { result = processManagedParent(parentFile); } if (result == null && Strings.isEmpty(parentDesc.getParentRelativePath())) { result = findInLocalRepository(generalSettings, parentDesc); if (result == null) { parentDesc = new MavenParentDesc(parentDesc.getParentId(), DEFAULT_RELATIVE_PATH); } } if (result == null && projectFile.getParent() != null) { parentFile = projectFile.getParent().findFileByRelativePath(parentDesc.getParentRelativePath()); if (parentFile != null && parentFile.isDirectory()) { parentFile = parentFile.findFileByRelativePath(MavenConstants.POM_XML); } if (parentFile != null) { result = processRelativeParent(parentFile); } } if (result == null) { result = findInLocalRepository(generalSettings, parentDesc); } return result; }
process
21,494
RESULT_TYPE (@NotNull MavenGeneralSettings generalSettings, @NotNull MavenParentDesc parentDesc) { RESULT_TYPE result = null; VirtualFile parentFile; Path parentIoFile = MavenArtifactUtil.getArtifactFile(generalSettings.getEffectiveLocalRepository(), parentDesc.getParentId(), "pom"); parentFile = LocalFileSystem.getInstance().findFileByNioFile(parentIoFile); if (parentFile != null) { result = processRepositoryParent(parentFile); } return result; }
findInLocalRepository
21,495
RESULT_TYPE (VirtualFile parentFile) { return doProcessParent(parentFile); }
processManagedParent
21,496
RESULT_TYPE (VirtualFile parentFile) { return doProcessParent(parentFile); }
processRelativeParent
21,497
RESULT_TYPE (VirtualFile parentFile) { return doProcessParent(parentFile); }
processRepositoryParent
21,498
RESULT_TYPE (VirtualFile parentFile) { return doProcessParent(parentFile); }
processSuperParent
21,499
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; return myMavenProject == ((MavenProjectsProcessorBasicTask)o).myMavenProject; }
equals