]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blob - extensions/SyntaxHighlight_GeSHi/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspectorTool.js
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / extensions / SyntaxHighlight_GeSHi / modules / ve-syntaxhighlight / ve.ui.MWSyntaxHighlightInspectorTool.js
1 /*!
2  * VisualEditor UserInterface MWSyntaxHighlightInspectorTool class.
3  *
4  * @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
5  * @license The MIT License (MIT); see LICENSE.txt
6  */
7
8 /**
9  * MediaWiki UserInterface syntax highlight tool.
10  *
11  * @class
12  * @extends ve.ui.FragmentInspectorTool
13  * @constructor
14  * @param {OO.ui.ToolGroup} toolGroup
15  * @param {Object} [config] Configuration options
16  */
17 ve.ui.MWSyntaxHighlightInspectorTool = function VeUiMWSyntaxHighlightInspectorTool() {
18         ve.ui.MWSyntaxHighlightInspectorTool.super.apply( this, arguments );
19 };
20 OO.inheritClass( ve.ui.MWSyntaxHighlightInspectorTool, ve.ui.FragmentInspectorTool );
21 ve.ui.MWSyntaxHighlightInspectorTool.static.name = 'syntaxhighlightInspector';
22 ve.ui.MWSyntaxHighlightInspectorTool.static.group = 'object';
23 ve.ui.MWSyntaxHighlightInspectorTool.static.icon = 'alienextension';
24 ve.ui.MWSyntaxHighlightInspectorTool.static.title = OO.ui.deferMsg(
25         'syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-title' );
26 ve.ui.MWSyntaxHighlightInspectorTool.static.modelClasses = [ ve.dm.MWInlineSyntaxHighlightNode ];
27 ve.ui.MWSyntaxHighlightInspectorTool.static.commandName = 'syntaxhighlightInspector';
28 ve.ui.MWSyntaxHighlightInspectorTool.static.autoAddToCatchall = false;
29 ve.ui.toolFactory.register( ve.ui.MWSyntaxHighlightInspectorTool );
30
31 ve.ui.commandRegistry.register(
32         new ve.ui.Command(
33                 'syntaxhighlightInspector', 'window', 'open',
34                 { args: [ 'syntaxhighlightInspector' ], supportedSelections: [ 'linear' ] }
35         )
36 );