void (@NotNull FileTypeWithDescriptor scheme) { ModalityUiUtil.invokeLaterIfNeeded(ModalityState.nonModal(), () -> { Application app = ApplicationManager.getApplication(); app.runWriteAction(() -> fireBeforeFileTypesChanged()); myPatternsTable.removeAllAssociations(scheme); app.runWriteAction(() -> fireFileTypesChanged(null, scheme.fileType)); }); }