use of com.android.tools.idea.gradle.structure.model.android.PsAndroidDependency in project android by JetBrains.
the class DependencyGraphPanel method updateDetails.
private void updateDetails(@Nullable AbstractDependencyNode<? extends PsAndroidDependency> selectedNode) {
PsAndroidDependency selected = null;
String configurationName = null;
if (selectedNode != null) {
selected = selectedNode.getFirstModel();
AbstractDependencyNode<? extends PsAndroidDependency> topDependencyNode = findTopDependencyNode(selectedNode);
configurationName = topDependencyNode.getFirstModel().getJoinedConfigurationNames();
}
super.updateDetails(selected, configurationName);
}
use of com.android.tools.idea.gradle.structure.model.android.PsAndroidDependency in project android by JetBrains.
the class DependencyGraphPanel method updateIssues.
private void updateIssues(@NotNull List<AbstractDependencyNode<? extends PsAndroidDependency>> selection) {
List<PsIssue> issues = Lists.newArrayList();
for (AbstractDependencyNode<? extends PsAndroidDependency> node : selection) {
for (PsAndroidDependency dependency : node.getModels()) {
issues.addAll(myContext.getAnalyzerDaemon().getIssues().findIssues(dependency, null));
}
}
displayIssues(issues);
}
use of com.android.tools.idea.gradle.structure.model.android.PsAndroidDependency in project android by JetBrains.
the class ResolvedDependenciesTreeBuilder method onAllNodesExpanded.
@Override
protected void onAllNodesExpanded() {
getReady(this).doWhenDone(() -> {
PsAndroidDependency selection = myDependencySelectionSource.getSelection();
myDependencySelectionDestination.setSelection(selection);
});
}
use of com.android.tools.idea.gradle.structure.model.android.PsAndroidDependency in project android by JetBrains.
the class DependencyNodeComparator method compare.
@Override
public int compare(AbstractDependencyNode n1, AbstractDependencyNode n2) {
PsAndroidDependency d1 = (PsAndroidDependency) n1.getFirstModel();
PsAndroidDependency d2 = (PsAndroidDependency) n2.getFirstModel();
return PsDependencyComparator.INSTANCE.compare(d1, d2);
}
use of com.android.tools.idea.gradle.structure.model.android.PsAndroidDependency in project android by JetBrains.
the class ResolvedDependenciesPanel method getSelection.
@Override
@Nullable
public PsAndroidDependency getSelection() {
AbstractPsModelNode selection = getSelectionIfSingle();
if (selection instanceof AbstractDependencyNode) {
AbstractDependencyNode node = (AbstractDependencyNode) selection;
List<?> models = node.getModels();
if (!models.isEmpty()) {
return (PsAndroidDependency) models.get(0);
}
}
return null;
}
Aggregations