List<ProjectStructureElementUsage> () { final Artifact artifact = myArtifactsStructureContext.getArtifactModel().getArtifactByOriginal(myOriginalArtifact); final List<ProjectStructureElementUsage> usages = new ArrayList<>(); final CompositePackagingElement<?> rootElement = myArtifactsStructureContext.getRootElement(artifact); ArtifactUtil.processPackagingElements(rootElement, null, new PackagingElementProcessor<>() { @Override public boolean process(@NotNull PackagingElement<?> packagingElement, @NotNull PackagingElementPath path) { ProjectStructureElement element = getProjectStructureElementFor(packagingElement, ArtifactProjectStructureElement.this.myContext, ArtifactProjectStructureElement.this.myArtifactsStructureContext); if (element != null) { usages.add(createUsage(packagingElement, element, path.getPathStringFrom("/", rootElement))); } return true; } }, myArtifactsStructureContext, false, artifact.getArtifactType()); return usages; }