<commit_before>"use babel";

import DataResultView from './data-result-view';
import HeaderView from './header-view';
import utils from '../utils';

import {TextEditor, Emitter} from 'atom';

export default class DataAtomView {
  constructor() {
    this.emitter = new Emitter();
    this.createView();
    this.querySection.style.display = 'none';
    this.isShowing = false;
    this.resizeHandle.addEventListener('mousedown', e => this.resizeStarted(e));
  }

  createView() {
    this.element = document.createElement('section');
    this.element.className = 'data-atom data-atom-panel tool-panel panel panel-bottom padding';

    this.resizeHandle = document.createElement('div');
    this.resizeHandle.classList.add('resize-handle');
    this.element.appendChild(this.resizeHandle);

    this.headerView = new HeaderView(true);
    this.element.appendChild(this.headerView.element);

    this.querySection = document.createElement('section');
    this.querySection.classList.add('query-section');
    this.element.appendChild(this.querySection);

    var title = document.createElement('span');
    title.classList.add('heading-title');
    title.innerText = 'Query:';
    this.querySection.appendChild(title);

    this.queryEditor = document.createElement('atom-text-editor');
    this.queryEditor.classList.add('query-input');
    this.queryEditor.style.height = '40px';
    this.queryEditor.style.maxHeight = '40px';
    // this.queryEditor.getModel().setGrammar('sql');
    this.querySection.appendChild(this.queryEditor);
<commit_msg>Fix deprecation warning from setting editor height<commit_after>"use babel";

import DataResultView from './data-result-view';
import HeaderView from './header-view';
import utils from '../utils';

import {TextEditor, Emitter} from 'atom';

export default class DataAtomView {
  constructor() {
    this.emitter = new Emitter();
    this.createView();
    this.querySection.style.display = 'none';
    this.isShowing = false;
    this.resizeHandle.addEventListener('mousedown', e => this.resizeStarted(e));
  }

  createView() {
    this.element = document.createElement('section');
    this.element.className = 'data-atom data-atom-panel tool-panel panel panel-bottom padding';

    this.resizeHandle = document.createElement('div');
    this.resizeHandle.classList.add('resize-handle');
    this.element.appendChild(this.resizeHandle);

    this.headerView = new HeaderView(true);
    this.element.appendChild(this.headerView.element);

    this.querySection = document.createElement('section');
    this.querySection.classList.add('query-section');
    this.element.appendChild(this.querySection);

    var title = document.createElement('span');
    title.classList.add('heading-title');
    title.innerText = 'Query:';
    this.querySection.appendChild(title);

    var textEditor = atom.workspace.buildTextEditor();
    textEditor.autoHeight = false;
    this.queryEditor = textEditor.getElement();
    this.queryEditor.classList.add('query-input');
    this.queryEditor.style.height = '40px';
    this.queryEditor.style.maxHeight = '40px';
    this.querySection.appendChild(this.queryEditor);

{'fraction_non_alphanumeric': 0.14081373172282263, 'fraction_numerical': 0.0025429116338207248, 'mean_word_length': 4.370307167235495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3279820', 'n_tokens_mistral': 903, 'n_tokens_neox': 887, 'n_words': 156}