Object () { PsiViewerSourceWrapper wrapper = (PsiViewerSourceWrapper)myFileTypeComboBox.getSelectedItem(); if (wrapper != null) { return wrapper.myFileType != null ? wrapper.myFileType : wrapper.myExtension; } return null; }