private static CellAppearanceEx getCellAppearance( final ClasspathTableItem<?> item, final StructureConfigurableContext context, final boolean selected) { final OrderEntryAppearanceService service = OrderEntryAppearanceService.getInstance(); final OrderEntry entry = item.getEntry(); assert entry != null : item; return service.forOrderEntry(context.getProject(), entry, selected); }
static CellAppearanceEx getCellAppearance( final ClasspathTableItem<?> item, final StructureConfigurableContext context, final boolean selected) { final OrderEntryAppearanceService service = OrderEntryAppearanceService.getInstance(); if (item instanceof InvalidJdkItem) { return service.forJdk(null, false, selected, true); } else { final OrderEntry entry = item.getEntry(); assert entry != null : item; return service.forOrderEntry(context.getProject(), entry, selected); } }
@Override public void doCustomize(JList list, Object value, int index, boolean selected, boolean hasFocus) { if (value == null || value instanceof Sdk) { OrderEntryAppearanceService.getInstance() .forJdk((Sdk) value, false, selected, true) .customize(this); } else { final String str = value.toString(); if (str != null) { append( str, selected ? SimpleTextAttributes.SELECTED_SIMPLE_CELL_ATTRIBUTES : SimpleTextAttributes.SIMPLE_CELL_ATTRIBUTES); } } }