<commit_before> class IDEView extends WorkspaceTabView

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

    super options, data

    @openFiles = []

    @on 'PlusHandleClicked',   @bound 'createPlusContextMenu'

    @bindTabViewListeners()

    @once 'viewAppended', => KD.utils.wait 300, => @createEditor()

  bindTabViewListeners: ->
    @tabView.on 'FileNeedsToBeOpened', @bound 'openFile'
    @tabView.on 'VMTerminalRequested', @bound 'openVMTerminal'

  getPlusMenuItems: ->
    return {
      'Editor'        : callback : => @createEditor()
      'Terminal'      : callback : => @createTerminal()
      'Browser'       : callback : => @createPreview()
      'Drawing Board' : callback : => @createDrawingBoard()
    }

  createPane_: (view, paneOptions, paneData) ->
    unless view or paneOptions
      return new Error 'Missing argument for createPane_ helper'

    unless view instanceof KDView
      return new Error 'View must be an instance of KDView'

    pane = new KDTabPaneView paneOptions, paneData
    pane.addSubView view
    @tabView.addPane pane

    pane.once 'KDObjectWillBeDestroyed', => @handlePaneRemoved pane

  createEditor: (file, content) ->
    file        = file    or FSHelper.createFileFromPath @getDummyFilePath()
    content     = content or ''
    editor      = new EditorPane { file, content, delegate: this }
    paneOptions =
      name      : file.name
      editor    : editor

    @createPane_ editor, paneOptions, file

  createTerminal: (vm) ->
    terminalPane = new TerminalPane { vm }
    @createPane_ terminalPane,    { name: 'Terminal' }

  createDrawingBoard: ->
    @createPane_ new DrawingPane, { name: 'Drawing'  }

  createPreview: ->
    @createPane_ new PreviewPane, { name: 'Browser'  }
<commit_msg>Pass url to createPreview method.<commit_after> class IDEView extends WorkspaceTabView

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

    super options, data

    @openFiles = []

    @on 'PlusHandleClicked',   @bound 'createPlusContextMenu'

    @bindTabViewListeners()

    @once 'viewAppended', => KD.utils.wait 300, => @createEditor()

  bindTabViewListeners: ->
    @tabView.on 'FileNeedsToBeOpened', @bound 'openFile'
    @tabView.on 'VMTerminalRequested', @bound 'openVMTerminal'

  getPlusMenuItems: ->
    return {
      'Editor'        : callback : => @createEditor()
      'Terminal'      : callback : => @createTerminal()
      'Browser'       : callback : => @createPreview()
      'Drawing Board' : callback : => @createDrawingBoard()
    }

  createPane_: (view, paneOptions, paneData) ->
    unless view or paneOptions
      return new Error 'Missing argument for createPane_ helper'

    unless view instanceof KDView
      return new Error 'View must be an instance of KDView'

    pane = new KDTabPaneView paneOptions, paneData
    pane.addSubView view
    @tabView.addPane pane

    pane.once 'KDObjectWillBeDestroyed', => @handlePaneRemoved pane

  createEditor: (file, content) ->
    file        = file    or FSHelper.createFileFromPath @getDummyFilePath()
    content     = content or ''
    editor      = new EditorPane { file, content, delegate: this }
    paneOptions =
      name      : file.name
      editor    : editor

    @createPane_ editor, paneOptions, file

  createTerminal: (vm) ->
    terminalPane = new TerminalPane { vm }
    @createPane_ terminalPane, { name: 'Terminal' }

  createDrawingBoard: ->
    @createPane_ new DrawingPane, { name: 'Drawing' }

  createPreview: (url) ->
    previewPane = new PreviewPane { url }
    @createPane_ previewPane, { name: 'Browser' }

{'fraction_non_alphanumeric': 0.10620960944085417, 'fraction_numerical': 0.0016858668165214948, 'mean_word_length': 3.0639269406392695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, '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': '7135851', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1041, 'n_words': 284}