<commit_before>define( function( require, exports ) {
	'use strict';
	
	// Get module dependencies.
	var Dialogs = brackets.getModule( 'widgets/Dialogs' ),
		
		// Extension modules.
		Strings = require( 'modules/Strings' ),
		settingsDialogTemplate = require( 'text!../html/settings-dialog.html' ),
		
		// Variables.
		dialog,
		preferences;

	function setValues( values ) {
		$( '#git-settings-stripWhitespaceFromCommits' ).prop( 'checked', values.stripWhitespaceFromCommits );
	}

	function restorePlatformDefaults() {
		setValues( DefaultPreferences );
	}

	function init() {
		setValues( preferences.getAllValues() );
		assignActions();

		if (brackets.platform !== 'win' ) {
			$( '.windows_only' ).hide();
		}
	}

	exports.show = function( prefs ) {
		var compiledTemplate = Mustache.render( settingsDialogTemplate, {
			Strings: Strings
		} );

		dialog = Dialogs.showModalDialogUsingTemplate( compiledTemplate );
		preferences = prefs;

		init();

		dialog.done( function( buttonId ) {
			if ( buttonId === 'ok' ) {
				var $dialog = dialog.getElement();
				// features
				preferences.setValue( 'stripWhitespaceFromCommits', $( '#git-settings-stripWhitespaceFromCommits', $dialog).prop( 'checked' ));
			}
		});
	};
});<commit_msg>Working settings dialog.<commit_after>define( function( require, exports ) {
	'use strict';
	
	// Get module dependencies.
	var Dialogs = brackets.getModule( 'widgets/Dialogs' ),
		
		// Extension modules.
		Strings = require( 'modules/Strings' ),
		settingsDialogTemplate = require( 'text!../html/settings-dialog.html' ),
		
		// Variables.
		dialog,
		preferences;
	
	/**
	 * Set each value of the preferences in dialog.
	 */
	function setValues( values ) {
		$( '#autoprefixer-settings-visualCascade' ).prop( 'checked', values.visualCascade );
	}
	
	/**
	 * Initialize dialog values.
	 */
	function init() {
		setValues( preferences.getAllValues() );
	}
	
	/**
	 * Exposed method to show dialog.
	 */
	exports.show = function( prefs ) {
		// Compile dialog template.
		var compiledTemplate = Mustache.render( settingsDialogTemplate, {
			Strings: Strings
		} );
		
		// Save dialog to variable.
		dialog = Dialogs.showModalDialogUsingTemplate( compiledTemplate );
		preferences = prefs;
		
		// Initialize dialog values.
		init();
		
		// Open dialog.
		dialog.done( function( buttonId ) {
			// Save preferences if OK button was clicked.
			if ( buttonId === 'ok' ) {
				var $dialog = dialog.getElement();
				
				// Save each preference.
				preferences.setValue( 'visualCascade', $( '#autoprefixer-settings-visualCascade', $dialog ).prop( 'checked' ) );
			}
		});
	};
});
{'fraction_non_alphanumeric': 0.14487228364468166, 'fraction_numerical': 0.0, 'mean_word_length': 3.4625850340136055, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2727995', 'n_tokens_mistral': 908, 'n_tokens_neox': 775, 'n_words': 180}