protected synchronized void unregisterLayer(@NotNull IElementType tokenType) {
    LayerDescriptor layer = myTokensToLayer.remove(tokenType);
    if (layer != null) {
      getMappingSegments().myLayerBuffers.remove(layer);
      getSegments().removeAll();
    }
  }
protected synchronized void unregisterLayer(@NotNull IElementType tokenType)