<commit_before>//
//  MainWindowController.swift
//  MDPSplitViewDemo
//
//  Created by <NAME> on 10/29/14.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//

import Cocoa

class MainWindowController: NSWindowController, NSSplitViewDelegate {
    @IBOutlet weak var splitView: MDPSplitView!
    
    let sourceList = SourceListController(nibName: "SourceList", bundle: nil)!
    let infoPane   = InfoPaneController(nibName: "InfoPane", bundle: nil)!
    
    var lastSourceWidth: CGFloat = 100
    var sourceWidthConstraint: NSLayoutConstraint?
    
    var lastInfoWidth: CGFloat = 100
    var infoWidthConstraint: NSLayoutConstraint?
    
    var duration: NSTimeInterval = 0.5
    
    var leftView: NSView {
        return self.splitView.subviews[0] as NSView
    }
    var rightView: NSView {
        return self.splitView.subviews[2] as NSView
    }

    override func awakeFromNib() {
        let views = [
            "sourceList": sourceList.view,
            "infoPane":   infoPane.view,
            "leftView":   leftView,
            "rightView":  rightView,
        ]
        
        leftView.addSubview(sourceList.view)
        leftView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|[sourceList]-(0@250)-|", options: nil, metrics: nil, views: views))
        leftView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|[sourceList]|", options: nil, metrics: nil, views: views))
        
        sourceWidthConstraint = NSLayoutConstraint(item: sourceList.view, attribute: .Trailing, relatedBy: .Equal, toItem: leftView, attribute: .Trailing, multiplier: 1, constant: 0)
        leftView.addConstraint(sourceWidthConstraint!)<commit_msg>Remove unneeded views from dictionary<commit_after>//
//  MainWindowController.swift
//  MDPSplitViewDemo
//
//  Created by <NAME> on 10/29/14.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//

import Cocoa

class MainWindowController: NSWindowController, NSSplitViewDelegate {
    @IBOutlet weak var splitView: MDPSplitView!
    
    let sourceList = SourceListController(nibName: "SourceList", bundle: nil)!
    let infoPane   = InfoPaneController(nibName: "InfoPane", bundle: nil)!
    
    var lastSourceWidth: CGFloat = 100
    var sourceWidthConstraint: NSLayoutConstraint?
    
    var lastInfoWidth: CGFloat = 100
    var infoWidthConstraint: NSLayoutConstraint?
    
    var duration: NSTimeInterval = 0.5
    
    var leftView: NSView {
        return self.splitView.subviews[0] as NSView
    }
    var rightView: NSView {
        return self.splitView.subviews[2] as NSView
    }

    override func awakeFromNib() {
        let views = [
            "sourceList": sourceList.view,
            "infoPane":   infoPane.view,
        ]
        
        leftView.addSubview(sourceList.view)
        leftView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|[sourceList]-(0@250)-|", options: nil, metrics: nil, views: views))
        leftView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|[sourceList]|", options: nil, metrics: nil, views: views))
        
        sourceWidthConstraint = NSLayoutConstraint(item: sourceList.view, attribute: .Trailing, relatedBy: .Equal, toItem: leftView, attribute: .Trailing, multiplier: 1, constant: 0)
        leftView.addConstraint(sourceWidthConstraint!)
{'fraction_non_alphanumeric': 0.10141014101410141, 'fraction_numerical': 0.015601560156015602, 'mean_word_length': 3.2743589743589743, 'pattern_counts': {'":': 6, '<': 7, '<?xml version=': 0, '>': 7, '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': '2355937', 'n_tokens_mistral': 1021, 'n_tokens_neox': 967, 'n_words': 227}