summaryrefslogtreecommitdiff
path: root/extensions/SyntaxHighlight_GeSHi/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspectorTool.js
blob: 1192976b7a214665a6ad93650be52ad39919b00e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*!
 * VisualEditor UserInterface MWSyntaxHighlightInspectorTool class.
 *
 * @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
 * @license The MIT License (MIT); see LICENSE.txt
 */

/*global ve, OO */

/**
 * MediaWiki UserInterface syntax highlight tool.
 *
 * @class
 * @extends ve.ui.InspectorTool
 * @constructor
 * @param {OO.ui.ToolGroup} toolGroup
 * @param {Object} [config] Configuration options
 */
ve.ui.MWSyntaxHighlightInspectorTool = function VeUiMWSyntaxHighlightInspectorTool( toolGroup, config ) {
	ve.ui.InspectorTool.call( this, toolGroup, config );
};
OO.inheritClass( ve.ui.MWSyntaxHighlightInspectorTool, ve.ui.InspectorTool );
ve.ui.MWSyntaxHighlightInspectorTool.static.name = 'syntaxhighlight';
ve.ui.MWSyntaxHighlightInspectorTool.static.group = 'object';
ve.ui.MWSyntaxHighlightInspectorTool.static.icon = 'alienextension';
ve.ui.MWSyntaxHighlightInspectorTool.static.title = OO.ui.deferMsg(
	'syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-title' );
ve.ui.MWSyntaxHighlightInspectorTool.static.modelClasses = [ ve.dm.MWBlockSyntaxHighlightNode, ve.dm.MWInlineSyntaxHighlightNode ];
ve.ui.MWSyntaxHighlightInspectorTool.static.commandName = 'syntaxhighlight';
ve.ui.toolFactory.register( ve.ui.MWSyntaxHighlightInspectorTool );

ve.ui.commandRegistry.register(
	new ve.ui.Command(
		'syntaxhighlight', 'window', 'open',
		{ args: [ 'syntaxhighlight' ], supportedSelections: [ 'linear' ] }
	)
);