<commit_before>﻿// This file has been autogenerated from a class added in the UI designer.

using System;
using CoreGraphics;
using AppKit;
using System.Collections.Generic;

namespace MonoDevelop.Mac.Debug
{
	public class StatusWindow : NSWindow
	{
		NSStackView stackContainer;

		public StatusWindow (IntPtr handle) : base (handle)
		{

		}

		public StatusWindow (CGRect frame) : base (frame, NSWindowStyle.Titled, NSBackingStore.Buffered, false)
		{
			IsOpaque = false;
			ShowsToolbarButton = false;
			IgnoresMouseEvents = true;
			this.Title = "KeyViewLoop Debug Window";
			var containerView = new NSView {
				TranslatesAutoresizingMaskIntoConstraints = false
			};

			ContentView = containerView;

			stackContainer = new NSStackView {
				Orientation = NSUserInterfaceLayoutOrientation.Vertical,
				Alignment = NSLayoutAttribute.Leading,
				TranslatesAutoresizingMaskIntoConstraints = false
			};
			containerView.AddSubview (stackContainer);

			NSLayoutConstraint.Create (stackContainer, NSLayoutAttribute.Left, NSLayoutRelation.Equal, containerView, NSLayoutAttribute.Left, 1, 10);
			NSLayoutConstraint.Create (stackContainer, NSLayoutAttribute.Right, NSLayoutRelation.Equal, containerView, NSLayoutAttribute.Right, 1, 10);
			NSLayoutConstraint.Create (stackContainer, NSLayoutAttribute.Top, NSLayoutRelation.Equal, containerView, NSLayoutAttribute.Top, 1, 10);
			NSLayoutConstraint.Create (stackContainer, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, containerView, NSLayoutAttribute.Bottom, 1, 10);
		}

		public void GenerateStatusView (List<string> elements)
		{
			CleanViews ();
			NSTextField label = null;

			foreach (var item in elements) {
				label = GetLabel (item);
				stackContainer.AddView (label, NSStackViewGravity.Leading);
				var content = label.GetContentHuggingPriorityForOrientation (NSLayoutConstraintOrientation.Vertical);
				label.SetContentHuggingPriorityForOrientation (750, NSLayoutConstraintOrientation.Vertical);
			}

			if (label != null) {
				label.SetContentHuggingPriorityForOrientation (300, NSLayoutConstraintOrientation.Vertical);
			}
		}

		public void AlignWith (CGRect targetFrame)
		{
			var frame = Frame;
			frame.Location = new CGPoint (targetFrame.Right + 5, targetFrame.Bottom - frame.Height);
			SetFrame (frame, true);
		}

		void CleanViews ()
		{
			var views = stackContainer.Views;
			foreach (var item in views) {
				item.RemoveFromSuperview ();
			}
		}

		NSTextField GetLabel (string title)
		{
			return new NSTextField (new CGRect (10, 10, 200, 17)) {
				StringValue = title,
				Bezeled = false,
				DrawsBackground = false,
				Editable = false,
				Selectable = false
			};
		}
	}
}<commit_msg>Changes NSStackView to a NSTextView<commit_after>﻿// This file has been autogenerated from a class added in the UI designer.

using System;
using CoreGraphics;
using AppKit;
using System.Collections.Generic;

namespace MonoDevelop.Mac.Debug
{
	public class StatusWindow : NSWindow
	{
		NSTextView textView;

		public StatusWindow (IntPtr handle) : base (handle)
		{

		}

		public StatusWindow (CGRect frame) : base (frame, NSWindowStyle.Titled, NSBackingStore.Buffered, false)
		{
			IsOpaque = false;
			ShowsToolbarButton = false;
			IgnoresMouseEvents = true;
			this.Title = "KeyViewLoop Debug Window";

			var containerView = new NSScrollView (this.Frame) {
				BorderType = NSBorderType.NoBorder, 
				HasVerticalScroller = true,
				HasHorizontalScroller = false
			};

			textView = new NSTextView (Frame) {
				VerticallyResizable = true, 
			};
			containerView.DocumentView = textView;
			ContentView = containerView;
		}

		public void GenerateStatusView (List<string> elements)
		{
			textView.Value = string.Join (Environment.NewLine, elements);
		}

		public void AlignWith (CGRect targetFrame)
		{
			var frame = Frame;
			frame.Location = new CGPoint (targetFrame.Right + 5, targetFrame.Bottom - frame.Height);
			SetFrame (frame, true);
		}

	}
}
{'fraction_non_alphanumeric': 0.0872093023255814, 'fraction_numerical': 0.007330637007077857, 'mean_word_length': 4.241059602649007, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4024911', 'n_tokens_mistral': 1397, 'n_tokens_neox': 1154, 'n_words': 298}