atom-nuclide
Version:
A unified developer experience for web and mobile development, built as a suite of features on top of Atom to provide hackability and the support of an active community.
52 lines (43 loc) • 1.36 kB
JavaScript
Object.defineProperty(exports, '__esModule', {
value: true
});
/*
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/
exports.setOutputService = setOutputService;
exports.getOutputService = getOutputService;
exports.setNotificationService = setNotificationService;
exports.getNotificationService = getNotificationService;
exports.registerOutputWindowLogging = registerOutputWindowLogging;
var _outputServiceApi = null;
var _raiseNativeNotification = null;
function setOutputService(api) {
_outputServiceApi = api;
}
function getOutputService() {
return _outputServiceApi;
}
function setNotificationService(raiseNativeNotification) {
_raiseNativeNotification = raiseNativeNotification;
}
function getNotificationService() {
return _raiseNativeNotification;
}
// TODO: refactor this function to work with other providers(like hhvm).
function registerOutputWindowLogging(userOutputStream) {
var api = getOutputService();
var outputDisposable = null;
if (api != null) {
outputDisposable = api.registerOutputProvider({
id: 'lldb debugger',
messages: userOutputStream.map(function (message) {
return JSON.parse(message);
})
});
}
return outputDisposable;
}