Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(uri, title) {
Etch.initialize(this);
console.log("element", this.element);
this.uri = uri;
this.emitter = new Emitter;
atom.commands.add(this.element, {
'script-runner:copy': () => this.copyToClipboard(),
'script-runner:paste': () => this.pasteToTerminal(),
'script-runner:clear': () => this.clear(),
'script-runner:interrupt': event => this.kill('SIGINT'),
'script-runner:terminate': event => this.kill('SIGTERM'),
'script-runner:kill': event => this.kill('SIGKILL'),
});
if (title == null)
acceptProps ({viewModel}: CommitBoxComponentProps): Promise {
this.viewModel = viewModel
let updatePromise = Promise.resolve()
if (this.element) {
updatePromise = etch.update(this)
} else {
etch.initialize(this)
this.listener = new DOMListener(this.element)
}
if (this.subscriptions) this.subscriptions.dispose()
this.subscriptions = new CompositeDisposable()
this.subscriptions.add(this.listener.add('.git-CommitBox-button', 'click', () => this.commit()))
this.subscriptions.add(atom.commands.add(this.element, {
'git:commit': () => this.commit()
}))
this.subscriptions.add(atom.commands.add('atom-workspace', {
'git:focus-commit-message': () => this.focus(),
'git:focus-commit-button': () => this.focusCommitButton()
}))
constructor(props) {
this.props = props;
etch.initialize(this);
this.props.registerItemElement(this.props.mergeConflict, this.element);
}
constructor(onConnect) {
this.onConnectClicked = onConnect;
this.loadedConnections = [];
this.placeholderUrlPart = '://user:pass@localhost/db-name';
this.supportedDbs = DbFactory.getSupportedDatabases();
this.state = {
selectedProtocol: this.supportedDbs[0].prefix,
defaultPort: this.supportedDbs[0].port
};
etch.initialize(this);
this.registerListeners();
this.subscriptions = new CompositeDisposable();
this.subscriptions.add(
atom.commands.add(this.element, {
'core:close': () => { this.close(); },
'core:cancel': () => { this.close(); }
}));
DbFactory.loadConnections().then(connections => {
this.loadedConnections = connections;
etch.update(this);
});
}
constructor(opts) {
this.children = [];
this.autoScroll = opts.autoScroll;
etch.initialize(this);
}
constructor (props) {
this.props = props
if (this.props.authenticationProvider) {
this.props.authenticationProvider.onDidChange(() => { this.update() })
}
etch.initialize(this)
}
constructor({match, regex, replacePattern, isSelected, previewStyle, top}) {
this.match = match;
this.regex = regex;
this.replacePattern = replacePattern;
this.previewStyle = previewStyle;
this.isSelected = isSelected;
this.top = top;
etch.initialize(this);
}
this.debouncedDidChangeSelectedItem = debounce(this.didChangeSelectedItems, value);
}
});
this.mouseSelectionInProgress = false;
this.listElementsByItem = new WeakMap();
this.mouseSelection = {started: false, dragged: false};
this.selection = new CompositeListSelection({
listsByKey: {
unstaged: this.props.unstagedChanges,
conflicts: this.props.mergeConflicts || [],
staged: this.props.stagedChanges,
},
idForItem: item => item.filePath,
});
etch.initialize(this);
this.subscriptions = new CompositeDisposable();
this.subscriptions.add(this.props.commandRegistry.add(this.element, {
'core:move-up': () => this.selectPrevious(),
'core:move-down': () => this.selectNext(),
'core:move-left': () => this.diveIntoSelection(),
'core:select-up': () => this.selectPrevious(true),
'core:select-down': () => this.selectNext(true),
'core:select-all': () => this.selectAll(),
'core:move-to-top': () => this.selectFirst(),
'core:move-to-bottom': () => this.selectLast(),
'core:select-to-top': () => this.selectFirst(true),
'core:select-to-bottom': () => this.selectLast(true),
'core:confirm': () => this.confirmSelectedItems(),
'github:activate-next-list': () => this.activateNextList(),
'github:activate-previous-list': () => this.activatePreviousList(),
constructor(model, {findBuffer, replaceBuffer, findHistoryCycler, replaceHistoryCycler} = {}) {
this.model = model;
this.findBuffer = findBuffer;
this.replaceBuffer = replaceBuffer;
this.findHistoryCycler = findHistoryCycler;
this.replaceHistoryCycler = replaceHistoryCycler;
this.subscriptions = new CompositeDisposable();
etch.initialize(this)
this.findHistoryCycler.addEditorElement(this.findEditor.getElement());
this.replaceHistoryCycler.addEditorElement(this.replaceEditor.getElement());
this.handleEvents();
this.clearMessage();
this.updateOptionViews();
this.updateSyntaxHighlighting();
this.updateFindEnablement();
this.updateReplaceEnablement();
this.createWrapIcon();
}
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, {
'core:save': () => this.saveProject(),
'core:confirm': () => this.saveProject(),
}));
disposables.add(atom.commands.add('atom-workspace', {
'core:cancel': () => this.close(),