@SuppressWarnings("AssignmentToStaticFieldFromInstanceMethod")
  @ApiStatus.Internal
  public void unregisterLanguage(@NotNull PluginDescriptor pluginDescriptor) {
    IElementType.unregisterElementTypes(this, pluginDescriptor);
    Application application = ApplicationManager.getApplication();
    ReferenceProvidersRegistry referenceProvidersRegistry = application == null ? null : application.getServiceIfCreated(ReferenceProvidersRegistry.class);
    if (referenceProvidersRegistry != null) {
      referenceProvidersRegistry.unloadProvidersFor(this);
    }

    synchronized (staticLock) {
      registeredLanguages = without(registeredLanguages, getClass());
      registeredIds = without(registeredIds, getID());
      for (String mimeType : getMimeTypes()) {
        registeredMimeTypes = without(registeredMimeTypes, mimeType);
      }
    }

    Language baseLanguage = getBaseLanguage();
    if (baseLanguage != null) {
      baseLanguage.unregisterDialect(this);
    }
  }
@SuppressWarnings("AssignmentToStaticFieldFromInstanceMethod")
  @ApiStatus.Internal
  public void unregisterLanguage(@NotNull PluginDescriptor pluginDescriptor)