-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.js
30 lines (24 loc) · 1.12 KB
/
main.js
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
define(function (require, exports, module) {
"use strict";
var AppInit = brackets.getModule("utils/AppInit"),
ExtensionUtils = brackets.getModule("utils/ExtensionUtils"),
Menus = brackets.getModule("command/Menus"),
Preferences = require("preferences"),
Handlers = require("handlers"),
EditorManager = brackets.getModule("editor/EditorManager");
var preferences = new Preferences();
var handlers = new Handlers(preferences);
ExtensionUtils.loadStyleSheet(module, "style.less");
var menu = Menus.addMenu("Linterhub", "repometric.linterhub-brackets.main-menu");
menu.addMenuItem("linterhub-menu.analyze");
menu.addMenuItem("linterhub-menu.manager");
menu.addMenuDivider();
menu.addMenuItem("linterhub-menu.version");
AppInit.appReady(function () {
handlers.initialize(preferences.get("cli_path"), preferences.get("run_mode")).then(function(){
handlers.refresh_providers().then(function(){
handlers.reporterHandlers.activateEditor(EditorManager.getActiveEditor());
});
});
});
});