void (ItemPresentation presentation) { if (presentation instanceof PresentationData) { setBackground(((PresentationData)presentation).getBackground()); } setIcon(presentation.getIcon(false)); setPresentableText(presentation.getPresentableText()); setLocationString(presentation.getLocationString()); if (presentation instanceof ColoredItemPresentation) { setAttributesKey(((ColoredItemPresentation)presentation).getTextAttributesKey()); } setSeparatorAbove(presentation instanceof ItemPresentationWithSeparator); if (presentation instanceof LocationPresentation) { myLocationPrefix = ((LocationPresentation)presentation).getLocationPrefix(); myLocationSuffix = ((LocationPresentation)presentation).getLocationSuffix(); } }