void () { FileTypeManagerImpl.FileTypeWithDescriptor ftd = myRecognizedFileType.getSelectedFileType(); if (ftd == null) return; FileType fileType = ftd.fileType; FileTypeConfigurableInteractions.fileTypeRemoved.log(); int index = myRecognizedFileType.myFileTypesList.getSelectedIndex(); myTempFileTypes.remove(ftd); if (fileType instanceof UserFileType) { myOriginalToEditedMap.remove(fileType); } List<FileNameMatcher> matchers = myTempPatternsTable.getAssociations(ftd); myTempPatternsTable.removeAllAssociations(ftd); for (FileNameMatcher matcher : matchers) { myTempTemplateDataLanguages.removeAssociation(matcher, null); } updateFileTypeList(); updateExtensionList(); index = Math.min(index, myRecognizedFileType.myFileTypesList.getModel().getSize() - 1); ScrollingUtil.selectItem(myRecognizedFileType.myFileTypesList, index); }