Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function startApp(path: string, manager: ServiceManager.IManager) {
console.log('starting app');
// Initialize the command registry with the key bindings.
let commands = new CommandRegistry();
// Setup the keydown listener for the document.
document.addEventListener('keydown', event => {
commands.processKeydownEvent(event);
});
let rendermime = new RenderMimeRegistry({ initialFactories });
let editorFactory = editorServices.factoryService.newInlineEditor;
let contentFactory = new ConsolePanel.ContentFactory({ editorFactory });
let consolePanel = new ConsolePanel({
rendermime,
manager,
path,
contentFactory,
mimeTypeService: editorServices.mimeTypeService
});
consolePanel.title.label = TITLE;
let palette = new CommandPalette({ commands });
let panel = new SplitPanel();
panel.id = 'main';
panel.orientation = 'horizontal';
panel.spacing = 0;
SplitPanel.setStretch(palette, 0);
// Initialize the command registry with the key bindings.
let commands = new CommandRegistry();
// Setup the keydown listener for the document.
document.addEventListener('keydown', event => {
commands.processKeydownEvent(event);
});
let rendermime = new RenderMime({
initialFactories: defaultRendererFactories
});
let editorFactory = editorServices.factoryService.newInlineEditor.bind(
editorServices.factoryService);
let contentFactory = new ConsolePanel.ContentFactory({ editorFactory });
let consolePanel = new ConsolePanel({
rendermime,
manager,
path,
contentFactory,
mimeTypeService: editorServices.mimeTypeService
});
consolePanel.title.label = TITLE;
let palette = new CommandPalette({ commands });
let panel = new SplitPanel();
panel.id = 'main';
panel.orientation = 'horizontal';
panel.spacing = 0;
SplitPanel.setStretch(palette, 0);
function startApp(path: string, manager: ServiceManager.IManager) {
// Initialize the command registry with the key bindings.
let commands = new CommandRegistry();
// Setup the keydown listener for the document.
document.addEventListener('keydown', event => {
commands.processKeydownEvent(event);
});
let rendermime = new RenderMimeRegistry({ initialFactories });
let editorFactory = editorServices.factoryService.newInlineEditor;
let contentFactory = new ConsolePanel.ContentFactory({ editorFactory });
let consolePanel = new ConsolePanel({
rendermime,
manager,
path,
contentFactory,
mimeTypeService: editorServices.mimeTypeService
});
consolePanel.title.label = TITLE;
let palette = new CommandPalette({ commands });
let panel = new SplitPanel();
panel.id = 'main';
panel.orientation = 'horizontal';
panel.spacing = 0;
SplitPanel.setStretch(palette, 0);
function buildConsole(manager: ServiceManager.IManager) {
let commands = new CommandRegistry();
// Setup the keydown listener for the document.
document.addEventListener('keydown', event => {
commands.processKeydownEvent(event);
});
let editorFactory = editorServices.factoryService.newInlineEditor;
let contentFactory = new ConsolePanel.ContentFactory({ editorFactory });
// let consoleWidget = new CodeConsole({
// contentFactory,
// rendermime,
// mimeTypeService: editorServices.mimeTypeService,
// session:
// })
let consolePanel = new ConsolePanel({
rendermime,
manager,
contentFactory,
mimeTypeService: editorServices.mimeTypeService
});
let panel = new SplitPanel();
panel.id = 'console-panel';
panel.orientation = 'horizontal';
it('should create a new code console factory', () => {
const factory = new ConsolePanel.ContentFactory({ editorFactory });
expect(factory).to.be.an.instanceof(ConsolePanel.ContentFactory);
});
});
it('should create a new code console factory', () => {
const factory = new ConsolePanel.ContentFactory({ editorFactory });
expect(factory).to.be.an.instanceof(ConsolePanel.ContentFactory);
});
});
export function createConsolePanelFactory(): ConsolePanel.IContentFactory {
return new ConsolePanel.ContentFactory({ editorFactory });
}