Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.disposables = new CompositeDisposable();
this.session = session;
// Load the Fit Addon
this.fitAddon = new FitAddon();
this.session.xterm.loadAddon(this.fitAddon);
this.disposables.add(this.fitAddon);
//
// Observe the Session to know when it is destroyed so that we can
// clean up our state (i.e. remove event observers).
//
this.session.onDidDestroy(this.destroy.bind(this));
// TODO: Documentation says this should be set for Atom... Research!
etch.setScheduler(atom.views);
etch.initialize(this);
this.observeResizeEvents();
}
async function activate(state) {
const pns = atom.packages.getAvailablePackageNames();
const packagesProvidingUIServices = ["atom-ide-ui", "linter", "nuclide"];
if (!packagesProvidingUIServices.some(p => pns.includes(p))) {
// tslint:disable-next-line:no-unsafe-any
await require("atom-package-deps").install("atom-typescript", true);
}
// tslint:disable-next-line:no-unsafe-any
require("etch").setScheduler(atom.views);
// tslint:disable-next-line:no-shadowed-variable
const { PluginManager } = require("./pluginManager");
pluginManager = new PluginManager(state);
}
exports.activate = activate;
/** @babel */
/** @jsx etch.dom */
import { CompositeDisposable } from 'atom';
import { platform } from 'os';
import { remote } from 'electron';
import etch from 'etch';
import Appc from '../appc';
import Project from '../project';
import Button from './button.jsx';
import Select from './select.jsx';
import Hud from './hud.jsx';
import Utils from '../utils';
etch.setScheduler(atom.views);
/**
* Toolbar
*/
export default class Toolbar {
/**
* Constructor
*/
constructor() {
this.targets = {};
this.targetOptions = [ { value: '', text: '', disabled: true } ];
this.state = {
buildCommand: (Project.isTitaniumApp) ? 'run' : 'build',
buildCommandName: (Project.isTitaniumApp) ? 'Run' : 'Build',
platform: (platform() === 'darwin') ? 'ios' : 'android',
static setScheduler(scheduler) {
etch.setScheduler(scheduler);
}
initialize(_state) {
etch.setScheduler(atom.views);
gitPlus = new GitPlusPackage();
}
};
/** @babel */
/** @jsx etch.dom */
import { CompositeDisposable } from 'atom';
import etch from 'etch';
import changeCase from 'change-case';
import path from 'path';
import { EDIT_URI } from './view-uri';
import manager from '../Manager';
import Project from '../models/Project';
const disposables = new CompositeDisposable();
etch.setScheduler(atom.views);
export default class EditView {
constructor(props, children) {
this.props = props;
this.children = children;
etch.initialize(this);
this.storeFocusedElement();
this.element.addEventListener('click', (event) => {
if (event.target === this.refs.save) {
this.saveProject();
}
});
disposables.add(atom.commands.add(this.element, {
static setScheduler (scheduler) {
etch.setScheduler(scheduler)
}
static setScheduler(scheduler: any) {
etch.setScheduler(scheduler)
}
static setScheduler (scheduler) {
etch.setScheduler(scheduler)
}