<commit_before>class ContentDisplayController extends KDController
  constructor:(options)->
    super options
    @displays = {}
    @attachListeners()
    @lastShownViewDataId = null
    @lastShownViewConstructorName = null

  attachListeners:->
    @registerListener
      KDEventTypes  : "ContentDisplayWantsToBeShown"
      listener      : @
      callback      : (pubInst,view)=>
        @showContentDisplay view

    @registerListener
      KDEventTypes  : "ContentDisplayWantsToBeHidden"
      listener      : @
      callback      : (pubInst,view)=>
        @hideContentDisplay view

    appManager.registerListener
      KDEventTypes  : "ApplicationShowedAView"
      listener      : @
      callback      : =>
        @hideAllContentDisplays()

    @registerListener
      KDEventTypes  : "ContentDisplaysShouldBeHidden"
      listener      : @
      callback      : =>
        @hideAllContentDisplays()

  showContentDisplay:(view)->
    log "View: ", view.constructor.name
    ###
    if view.getData().getId?() is @lastShownViewDataId and
       view.constructor.name is @lastShownViewConstructorName
      new KDNotificationView
        title      : "Already in this!"
        type       : "mini"
      return
    ###
    contentPanel = @getSingleton "contentPanel"
    wrapper = new ContentDisplay
    @displays[view.id] = view
    wrapper.addSubView view
    contentPanel.addSubView wrapper

    # @lastShownViewDataId = view.getData().getId?()
    # @lastShownViewConstructorName = view.constructor.name

    @slideWrapperIn wrapper

  hideContentDisplay:(view)->
    @slideWrapperOut view<commit_msg> Revert last<commit_after>class ContentDisplayController extends KDController
  constructor:(options)->
    super options
    @displays = {}
    @attachListeners()

  attachListeners:->
    @registerListener
      KDEventTypes  : "ContentDisplayWantsToBeShown"
      listener      : @
      callback      : (pubInst,view)=>
        @showContentDisplay view

    @registerListener
      KDEventTypes  : "ContentDisplayWantsToBeHidden"
      listener      : @
      callback      : (pubInst,view)=>
        @hideContentDisplay view

    appManager.registerListener
      KDEventTypes  : "ApplicationShowedAView"
      listener      : @
      callback      : =>
        @hideAllContentDisplays()

    @registerListener
      KDEventTypes  : "ContentDisplaysShouldBeHidden"
      listener      : @
      callback      : =>
        @hideAllContentDisplays()

  showContentDisplay:(view)->
    contentPanel = @getSingleton "contentPanel"
    wrapper = new ContentDisplay
    @displays[view.id] = view
    wrapper.addSubView view
    contentPanel.addSubView wrapper
    @slideWrapperIn wrapper

  hideContentDisplay:(view)->
    @slideWrapperOut view
{'fraction_non_alphanumeric': 0.08435916002896451, 'fraction_numerical': 0.0, 'mean_word_length': 2.733783783783784, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '2369659', 'n_tokens_mistral': 779, 'n_tokens_neox': 752, 'n_words': 141}