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