List<ProjectStructureElementUsage> () { final List<ProjectStructureElementUsage> usages = new ArrayList<>(); final ModuleRootModel rootModel = getRootModel(); if (rootModel != null) { for (OrderEntry entry : rootModel.getOrderEntries()) { if (entry instanceof ModuleOrderEntry moduleOrderEntry) { final Module module = moduleOrderEntry.getModule(); if (module != null) { usages.add(new UsageInModuleClasspath(myContext, this, new ModuleProjectStructureElement(myContext, module), moduleOrderEntry.getScope())); } } else if (entry instanceof LibraryOrderEntry libraryOrderEntry) { final Library library = libraryOrderEntry.getLibrary(); if (library != null) { usages.add(new UsageInModuleClasspath(myContext, this, new LibraryProjectStructureElement(myContext, library), libraryOrderEntry.getScope())); } } else if (entry instanceof JdkOrderEntry) { final Sdk jdk = ((JdkOrderEntry)entry).getJdk(); if (jdk != null) { usages.add(new UsageInModuleClasspath(myContext, this, new SdkProjectStructureElement(myContext, jdk), null)); } } } } return usages; }