Search in sources :

Example 1 with PsIssueCollection

use of com.android.tools.idea.gradle.structure.model.PsIssueCollection in project android by JetBrains.

the class NodeHyperlinkSupport method findIssues.

@NotNull
private List<PsIssue> findIssues(@NotNull AbstractPsModelNode<? extends PsModel> modelNode, @Nullable Comparator<PsIssue> comparator) {
    List<PsIssue> issues = Lists.newArrayList();
    PsIssueCollection issueCollection = myContext.getAnalyzerDaemon().getIssues();
    for (PsModel model : modelNode.getModels()) {
        issues.addAll(issueCollection.findIssues(model, null));
    }
    if (comparator != null && issues.size() > 1) {
        Collections.sort(issues, comparator);
    }
    return issues;
}
Also used : PsModel(com.android.tools.idea.gradle.structure.model.PsModel) PsIssueCollection(com.android.tools.idea.gradle.structure.model.PsIssueCollection) PsIssue(com.android.tools.idea.gradle.structure.model.PsIssue) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

PsIssue (com.android.tools.idea.gradle.structure.model.PsIssue)1 PsIssueCollection (com.android.tools.idea.gradle.structure.model.PsIssueCollection)1 PsModel (com.android.tools.idea.gradle.structure.model.PsModel)1 NotNull (org.jetbrains.annotations.NotNull)1