<commit_before>/*
 * AppController.j
 * CPTabView2
 *
 * Created by You on August 27, 2010.
 * Copyright 2010, Your Company All rights reserved.
 */

@import <Foundation/CPObject.j>
@import <AppKit/CPTabView.j>


@implementation AppController : CPObject

- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
    var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
        contentView = [theWindow contentView];

    var tabView = [[CPTabView alloc] initWithFrame:CGRectMake(50,50,400,400)];
    [tabView setTabViewType:CPNoTabsBezelBorder];
    [tabView setTabViewType:CPTopTabsBezelBorder];

    var tabs = [
        "First Tab", "a label",
        "Second Tab", "another label",
        "Third Tab", "a third label",
        "Fourth Tab", "label 4",
        /*"5th Tab", "label 5",
        "6th Tab", "label 6",
        "7th Tab", "label 7",*/
        ];

    for (var i = 0; i < tabs.length; i += 2)
    {
        var view = [[CPView alloc] initWithFrame:CGRectMake(20, 20, 200, 200)];
        [view addSubview:[CPTextField labelWithTitle:tabs[i + 1]]];

        var item = [[CPTabViewItem alloc] initWithIdentifier:tabs[i]];
        [item setView:view];
        [item setLabel:tabs[i]];
        [tabView addTabViewItem:item];
    }

    [contentView addSubview:tabView];

    [tabView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];

    [theWindow orderFront:self];
}

@end<commit_msg>Extend tab view test with different tab view types.<commit_after>/*
 * AppController.j
 * CPTabView2
 *
 * Created by You on August 27, 2010.
 * Copyright 2010, Your Company All rights reserved.
 */

@import <Foundation/CPObject.j>
@import <AppKit/CPTabView.j>


@implementation AppController : CPObject
{
    CPTabView tabView1;
}

- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
    var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
        contentView = [theWindow contentView];

    tabView1 = [[CPTabView alloc] initWithFrame:CGRectMake(50,50,400,400)];
    [tabView1 setTabViewType:CPNoTabsBezelBorder];
    [tabView1 setTabViewType:CPTopTabsBezelBorder];

    var tabs = [
        "First Tab", "a label",
        "Second Tab", "another label",
        "Third Tab", "a third label",
        "Fourth Tab", "label 4",
        /*"5th Tab", "label 5",
        "6th Tab", "label 6",
        "7th Tab", "label 7",*/
        ];

    for (var i = 0; i < tabs.length; i += 2)
    {
        var view = [[CPView alloc] initWithFrame:CGRectMake(20, 20, 200, 200)];
        [view addSubview:[CPTextField labelWithTitle:tabs[i + 1]]];

        var item = [[CPTabViewItem alloc] initWithIdentifier:tabs[i]];
        [item setView:view];
        [item setLabel:tabs[i]];
        [tabView1 addTabViewItem:item];
    }

    [contentView addSubview:tabView1];

    [tabView1 setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];

    var toggleButton = [CPButton buttonWithTitle:@"Cycle Tab View Type"];
    [toggleButton setAction:@selector(switchTabType:)];
    [toggleButton setTarget:self];
    [toggleButton sizeToFit];
    [toggleButton setFrameOrigin:CGPointMake(CGRectGetWidth([contentView frame]) - CGRectGetWidth([toggleButton frame]) - 15, 15)];
    [toggleButton setAutoresizingMask:CPViewMinXMargin | CPViewMaxYMargin];
    [contentView addSubview:toggleButton];

    [theWindow orderFront:self];
}

- (@action)switchTabType:(id)sender
{
    [tabView1 setTabViewType:[tabView1 tabViewType] < CPNoTabsNoBorder ? [tabView1 tabViewType] + 1 : CPTopTabsBezelBorder];
}

@end
{'fraction_non_alphanumeric': 0.12510288065843622, 'fraction_numerical': 0.02661179698216735, 'mean_word_length': 3.778505897771953, 'pattern_counts': {'":': 0, '<': 10, '<?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': '7377002', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1142, 'n_words': 268}