<commit_before>kd      = require 'kd'
KDView  = kd.View
curryIn = require 'app/util/curryIn'

module.exports = class StackBaseEditorTabView extends KDView


  constructor: (options = {}, data) ->

    if data
      { stackTemplate } = data
    unless stackTemplate?.isMine()
      curryIn options, { cssClass: 'isntMine' }

    super options, data

    @on 'FocusToEditor', => @editorView?.setFocus yes<commit_msg>set isntMine class to stackbaseeditortabview and make editors read only<commit_after>kd      = require 'kd'
KDView  = kd.View
curryIn = require 'app/util/curryIn'

module.exports = class StackBaseEditorTabView extends KDView


  constructor: (options = {}, data) ->

    super options, data

    kd.singletons.groupsController.ready =>
      { groupsController } = kd.singletons
      if data
        { stackTemplate } = data
        isMine = stackTemplate?.isMine() or groupsController.canEditGroup()
        unless isMine
          @setClass 'isntMine'
          @editorView.aceView.ace.editor.once 'EditorReady', =>
            @editorView.aceView.ace.editor.setReadOnly yes

    @on 'FocusToEditor', => @editorView?.setFocus yes
{'fraction_non_alphanumeric': 0.10383944153577661, 'fraction_numerical': 0.0, 'mean_word_length': 3.1557971014492754, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5525366', 'n_tokens_mistral': 365, 'n_tokens_neox': 348, 'n_words': 83}