use of com.intellij.openapi.roots.ui.configuration.projectRoot.StructureConfigurableContext in project intellij-community by JetBrains.
the class OrderEntryAppearanceServiceImpl method forLibrary.
@NotNull
@Override
public CellAppearanceEx forLibrary(Project project, @NotNull final Library library, final boolean hasInvalidRoots) {
final StructureConfigurableContext context = ProjectStructureConfigurable.getInstance(project).getContext();
final Icon icon = LibraryPresentationManager.getInstance().getCustomIcon(library, context);
final String name = library.getName();
if (name != null) {
return normalOrRedWaved(name, (icon != null ? icon : PlatformIcons.LIBRARY_ICON), hasInvalidRoots);
}
final String[] files = library.getUrls(OrderRootType.CLASSES);
if (files.length == 0) {
return SimpleTextCellAppearance.invalid(ProjectBundle.message("library.empty.library.item"), PlatformIcons.LIBRARY_ICON);
} else if (files.length == 1) {
return forVirtualFilePointer(new LightFilePointer(files[0]));
}
final String url = StringUtil.trimEnd(files[0], JarFileSystem.JAR_SEPARATOR);
String text = ProjectBundle.message("library.unnamed.text", PathUtil.getFileName(url), files.length - 1);
return SimpleTextCellAppearance.regular(text, PlatformIcons.LIBRARY_ICON);
}
use of com.intellij.openapi.roots.ui.configuration.projectRoot.StructureConfigurableContext in project intellij-community by JetBrains.
the class ModuleJdkConfigurable method clearCaches.
private void clearCaches() {
final Module module = getRootModel().getModule();
final Project project = module.getProject();
final StructureConfigurableContext context = ModuleStructureConfigurable.getInstance(project).getContext();
context.getDaemonAnalyzer().queueUpdate(new ModuleProjectStructureElement(context, module));
}
Aggregations