<commit_before>import Component from './Component'

export default class CustomSurface extends Component {

  constructor(...args) {
    super(...args)

    this._name = this._getCustomResourceId()
    this._surfaceId = this._createSurfaceId()
  }

  getChildContext() {
    return {
      surface: this,
      parentSurfaceId: this.getId()
      // HACK: clearing isolatedNodeComponent so that we can easily know
      // if this surface is within an isolated node
      // isolatedNodeComponent: null
    }
  }


  didMount() {
    const surfaceManager = this.context.editorSession.surfaceManager
    surfaceManager.registerSurface(this)
  }

  dispose() {
    const surfaceManager = this.context.editorSession.surfaceManager
    surfaceManager.unregisterSurface(this)
  }

  rerenderDOMSelection() {
    // nothing by default
  }

  get name() {
    return this._name
  }

  getId() {
    return this._surfaceId
  }

  getContainer() {
    return undefined<commit_msg>Added CustomSurface.getSurface()<commit_after>import Component from './Component'

export default class CustomSurface extends Component {

  constructor(...args) {
    super(...args)

    this._name = this._getCustomResourceId()
    this._surfaceId = this._createSurfaceId()
  }

  getChildContext() {
    return {
      surface: this,
      parentSurfaceId: this.getId()
      // HACK: clearing isolatedNodeComponent so that we can easily know
      // if this surface is within an isolated node
      // isolatedNodeComponent: null
    }
  }


  didMount() {
    const surfaceManager = this.context.editorSession.surfaceManager
    surfaceManager.registerSurface(this)
  }

  dispose() {
    const surfaceManager = this.context.editorSession.surfaceManager
    surfaceManager.unregisterSurface(this)
  }

  rerenderDOMSelection() {
    // nothing by default
  }

  get name() {
    return this._name
  }

  getId() {
    return this._surfaceId
  }

  getSurfaceId() {
    return this.getId()
  }

  getContainer() {
    return undefined
{'fraction_non_alphanumeric': 0.09556993529118965, 'fraction_numerical': 0.0, 'mean_word_length': 2.972332015810277, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6051252', 'n_tokens_mistral': 573, 'n_tokens_neox': 552, 'n_words': 133}