<commit_before>
var sbManageService = {

	moduleID : "",

	treeColumnState : [],

	init : function()
	{
		if ( window.arguments )
		{
			if ( window.arguments[0] )
			{
				sbTreeHandler.TREE.ref = window.arguments[0].Value;
				document.title = sbDataSource.getProperty(window.arguments[0], "title");
				sbSearchService.treeRef = sbTreeHandler.TREE.ref;
			}
			if ( window.arguments[1] )
			{
				this.toggleRightPane(window.arguments[1]);
			}
		}
		document.getElementById("sbTreeColTitle").setAttribute("hideheader", "false");
		window.focus();
		document.getElementById("sbSearchTextbox").focus();
	},

	ensureContextIsTree : function()
	{
		return sbTreeHandler.TREE.treeBoxObject.focused;
	},

	toggleRightPane : function(aModuleElt)
	{
		if ( typeof(aModuleElt) == "string" ) aModuleElt = document.getElementById(aModuleElt);
		this.moduleID = this.moduleID == aModuleElt.id ? "" : aModuleElt.id;
		var willEnable = this.moduleID == "" ? false : true;
		var elts = document.getElementsByAttribute("group", "module");
		for ( var i = 0; i < elts.length; i++ )
		{
			elts[i].checked = elts[i].id == this.moduleID;
		}
		document.getElementById("sbPaneSplitter").hidden = !willEnable;
		document.getElementById("sbRightPaneBrowser").hidden = !willEnable;
		var colElts = document.getElementById("sbTreeCols").childNodes;
		for ( var i = 1; i < colElts.length; i++ )
		{
			colElts[i].removeAttribute("persist");
			if ( willEnable ) {
				this.treeColumnState[i] = colElts[i].hidden;
				colElts[i].hidden = true;
			} else {
				colElts[i].hidden = this.treeColumnState[i];
			}
		}
		if ( willEnable ) document.getElementById("sbRightPaneBrowser").loadURI(aModuleElt.getAttribute("moduleurl"));
	},

	getTreeSelection : function()
	{
		var arg1 = [], arg2 = [];
		var idxList = sbTreeHandler.getSelection(false, 2);
		idxList.forEach(function(aIdx)
		{
			arg1.push(sbTreeHandler.TREE.builderView.getResourceAtIndex(aIdx));
			arg2.push(sbTreeHandler.getParentResource(aIdx));
		});
		return [arg1, arg2];
	},

};


<commit_msg>Fix: column states are no more persist after switching on "Combind Wizard" or "Import/Export" and off in the "Manage" window.<commit_after>
var sbManageService = {

	moduleID : "",

	treeColumnState : { hidden: [], persist: [] },

	init : function()
	{
		if ( window.arguments )
		{
			if ( window.arguments[0] )
			{
				sbTreeHandler.TREE.ref = window.arguments[0].Value;
				document.title = sbDataSource.getProperty(window.arguments[0], "title");
				sbSearchService.treeRef = sbTreeHandler.TREE.ref;
			}
			if ( window.arguments[1] )
			{
				this.toggleRightPane(window.arguments[1]);
			}
		}
		document.getElementById("sbTreeColTitle").setAttribute("hideheader", "false");
		window.focus();
		document.getElementById("sbSearchTextbox").focus();
	},

	ensureContextIsTree : function()
	{
		return sbTreeHandler.TREE.treeBoxObject.focused;
	},

	toggleRightPane : function(aModuleElt)
	{
		if ( typeof(aModuleElt) == "string" ) aModuleElt = document.getElementById(aModuleElt);
		this.moduleID = this.moduleID == aModuleElt.id ? "" : aModuleElt.id;
		var willEnable = this.moduleID == "" ? false : true;
		var elts = document.getElementsByAttribute("group", "module");
		for ( var i = 0; i < elts.length; i++ )
		{
			elts[i].checked = elts[i].id == this.moduleID;
		}
		document.getElementById("sbPaneSplitter").hidden = !willEnable;
		document.getElementById("sbRightPaneBrowser").hidden = !willEnable;
		var colElts = document.getElementById("sbTreeCols").childNodes;
		for ( var i = 1; i < colElts.length; i++ )
		{
			if ( willEnable ) {
				this.treeColumnState.persist[i] = colElts[i].getAttribute("persist");
				colElts[i].removeAttribute("persist");
				this.treeColumnState.hidden[i] = colElts[i].hidden;
				colElts[i].hidden = true;
			} else {
				colElts[i].hidden = this.treeColumnState.hidden[i];
				colElts[i].setAttribute("persist", this.treeColumnState.persist[i]);
			}
		}
		if ( willEnable ) document.getElementById("sbRightPaneBrowser").loadURI(aModuleElt.getAttribute("moduleurl"));
	},

	getTreeSelection : function()
	{
		var arg1 = [], arg2 = [];
		var idxList = sbTreeHandler.getSelection(false, 2);
		idxList.forEach(function(aIdx)
		{
			arg1.push(sbTreeHandler.TREE.builderView.getResourceAtIndex(aIdx));
			arg2.push(sbTreeHandler.getParentResource(aIdx));
		});
		return [arg1, arg2];
	},

};



{'fraction_non_alphanumeric': 0.15497142857142857, 'fraction_numerical': 0.0064, 'mean_word_length': 4.317132442284326, 'pattern_counts': {'":': 0, '<': 7, '<?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': '503488', 'n_tokens_mistral': 1647, 'n_tokens_neox': 1479, 'n_words': 227}