PsiType () { if (myComponent instanceof JLabel) { return myType; } PsiTypeItem selItem = (PsiTypeItem)((JComboBox<?>)myComponent).getSelectedItem(); return selItem == null ? null : selItem.getType(); }