function ConsoleTab(parent, closeable, container, index)
{
	TabComponent.call(this, parent, closeable, container, index, Locale.console, Global.FILE_PATH + "icons/misc/console.png");

	var self = this;

	/**
	 * History of the last commands written into the console.
	 *
	 * Can be navigate to view previously used commands.
	 * 
	 * @attribute history
	 * @type {Array}
	 */
	this.history = [];

	/**
	 * History pointer for navigation of the history using the up arrow in the console input box.
	 * 
	 * @attribute historyPointer
	 * @type {number}
	 */
	this.historyPointer = -1;

	/**
	 * Stores a pointer to the original console functions.
	 *
	 * Used to enable and disable the virtual console.
	 *
	 * @attribute handlers
	 * @type {Object}
	 */
	this.handlers = 
	{
		log: window.console.log,
		info: window.console.info,
		warn: window.console.warn,
		error: window.console.error,
		clear: window.console.clear
	};

	/**
	 * Indicates if the virtual console is enable or disable.
	 *
	 * @attribute enable
	 * @type {boolean} 
	 */
	this.enabled = true;

	/**
	 * Search box to filter console content.
	 *
	 * @property search
	 * @type {SearchBox}
	 */
	this.search = new SearchBox(this.bar);
	this.search.setMode(Component.TOP_RIGHT);
	this.search.size.set(200, 25);
	this.search.position.set(1, 0);
	this.search.updateInterface();
	this.search.setOnChange(function()
	{
		self.filterByName(self.search.search.getText());
	});

	/**
	 * Console content division, where the messages are displayed.
	 *
	 * @attribute console
	 * @type {Component}
	 */
	this.content = document.createElement("div");
	this.content.style.position = "absolute";
	this.content.style.overflow = "auto";
	this.content.style.top = "0px";
	this.content.style.left = "0px";
	this.content.oncontextmenu = function(event)
	{
		var context = new ContextMenu(DocumentBody);
		context.size.set(150, 20);
		context.position.set(event.clientX, event.clientY);
		
		context.addOption(Locale.clear, function()
		{
			console.clear();
		});

		context.addOption(self.enabled ? Locale.disable : Locale.enable, function()
		{
			self.useConsole(!self.enabled);
		});

		context.updateInterface();
	};
	this.element.appendChild(this.content);

	/**
	 * Console input code division, where the user inserts JS code.
	 *
	 * @attribute input
	 * @type {DOM} 
	 */
	this.input = document.createElement("div");
	this.input.style.position = "absolute";
	this.input.style.overflow = "auto";
	this.input.style.bottom = "0px";
	this.input.style.left = "0px";
	this.element.appendChild(this.input);

	/**
	 * Command input division, shown as a codemirror code editor division for docs and hint access.
	 *
	 * @attribute code
	 * @type {CodeMirror}
	 */
	this.code = new CodeMirror(this.input, {
		dragDrop: false,
		firstLineNumber: 1,
		indentUnit: 0,
		indentWithTabs: false,
		keyMap: Editor.settings.code.keymap,
		lineNumbers: false,
		lineWrapping: false,
		matchBrackets: true,
		mode: "javascript",
		styleActiveLine: false,
		styleSelectedText: false,
		tabSize: Editor.settings.code.tabSize,
		theme: Editor.settings.code.theme,
		undoDepth: 0,
		value: "",
		viewportMargin: 1,
		wholeLineUpdateBefore: false,
		showMatchesOnScrollbar: false,
		lint: false,
		hintOptions:
		{
			hint: CodeMirror.hint.anyword,
			completeSingle: false
		}
	});

	/**
	 * Tern server used to provide code analysis.
	 *
	 * @attribute server
	 * @type {CodeMirror.TernServer}
	 */
	this.server = new CodeMirror.TernServer(
		{
			caseInsensitive: false,
			defs: Editor.ternDefinitions
		});

	this.code.on("keypress", function(cm, event)
	{
		var typed = String.fromCharCode(event.charCode);

		if (/[\w\.]/.exec(typed))
		{
			self.server.complete(cm);

			// If there is no tern sugestion suggest known words
			if (!cm.state.completionActive || !cm.state.completionActive.widget)
			{
				CodeMirror.commands.autocomplete(cm, null);
			}
		}
	});

	this.code.setOption("extraKeys",
		{
			"Enter": function()
			{
				self.runCommand(self.code.getValue());
				self.code.setValue("");
			},
			"Up": function()
			{
				if (self.history.length > 0 && self.historyPointer > 0)
				{
					self.setText(self.history[self.historyPointer--]);
				}
			}
		});

	this.input.oncontextmenu = function(event)
	{
		var context = new ContextMenu(DocumentBody);
		context.size.set(130, 20);
		context.position.set(event.clientX, event.clientY);
		
		context.addOption(Locale.copy, function()
		{
			var text = self.code.getSelection();
			if (text !== "")
			{
				Editor.clipboard.set(text, "text");
			}
		});
		context.addOption(Locale.cut, function()
		{
			var text = self.code.getSelection();
			if (text !== "")
			{
				Editor.clipboard.set(text, "text");
				self.code.replaceSelection("");
			}
		});
		context.addOption(Locale.paste, function()
		{
			self.code.replaceSelection(Editor.clipboard.get("text"));
		});
		
		context.updateInterface();
	};

	this.useConsole(this.enabled);
}
Console tab is used for the user to access the system console output (that can be also accessed from the dev tools console).

It is also possible to test some JS code directly on the console and navigate the project resources here.

@class ConsoleTab
@extends {TabComponent}