List of usage examples for com.intellij.openapi.roots.ui.util SimpleTextCellAppearance regular
public static SimpleTextCellAppearance regular(@NotNull final String text, @Nullable final Icon icon)
From source file:com.android.tools.idea.gradle.structure.editors.ModuleDependenciesPanel.java
License:Apache License
@NotNull private static CellAppearanceEx getCellAppearance(@NotNull final ModuleDependenciesTableItem item) { BuildFileStatement entry = item.getEntry(); String data = ""; Icon icon = null;//from w w w . java 2 s. c om if (entry instanceof Dependency) { Dependency dependency = (Dependency) entry; data = dependency.getValueAsString(); //noinspection EnumSwitchStatementWhichMissesCases switch (dependency.type) { case EXTERNAL: icon = AndroidIcons.MavenLogo; break; case FILES: icon = PlatformIcons.LIBRARY_ICON; break; case MODULE: icon = AllIcons.Nodes.Module; break; } } else if (entry != null) { data = entry.toString(); } return SimpleTextCellAppearance.regular(data, icon); }
From source file:org.mustbe.consulo.roots.impl.ModuleOrderEntryTypeProvider.java
License:Apache License
@NotNull @Override public CellAppearanceEx getCellAppearance(@NotNull ModuleOrderEntryImpl orderEntry) { return SimpleTextCellAppearance.regular(orderEntry.getPresentableName(), AllIcons.Nodes.Module); }