<commit_before>/*******************************************************************************
 * Copyright (c) 2014 Codenvy, S.A.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   Codenvy, S.A. - initial API and implementation
 *******************************************************************************/
package com.codenvy.ide.editor.codemirror.client.jso.event;

import com.codenvy.ide.editor.codemirror.client.jso.CMPositionOverlay;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArrayString;

/**
 * Argument of a (codemirror) native change event.
 * 
 * @author "<NAME>"
 */
public class CMBeforeChangeEventOverlay extends JavaScriptObject {

    protected CMBeforeChangeEventOverlay() {
    }

    public final native CMPositionOverlay getFrom() /*-{
        return this.from;
    }-*/;

    public final native CMPositionOverlay getTo() /*-{
        return this.to;
    }-*/;

    public final native JsArrayString getText() /*-{
        return this.text;
    }-*/;

    public final native void cancel() /*-{
        this.cancel();
    }-*/;


    public final native boolean hasUpdate() /*-{
        return (typeof this.update === "function");
    }-*/;

    public final native String update() /*-{
        return this.update();
    }-*/;

    public final native String update(CMPositionOverlay from) /*-{
        return this.update(from);
    }-*/;

    public final native String update(CMPositionOverlay from, CMPositionOverlay to) /*-{
        return this.update(from, to);
    }-*/;

    public final native String update(CMPositionOverlay from, CMPositionOverlay to, JsArrayString text) /*-{
        return this.update(from, to, text);
    }-*/;
}<commit_msg>Fix beforechange event (no removed) and add javadoc<commit_after>/*******************************************************************************
 * Copyright (c) 2014 Codenvy, S.A.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   <NAME>. - initial API and implementation
 *******************************************************************************/
package com.codenvy.ide.editor.codemirror.client.jso.event;

import com.codenvy.ide.editor.codemirror.client.jso.CMPositionOverlay;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArrayString;

/**
 * Argument of a (codemirror) native beforechange event.
 */
public class CMBeforeChangeEventOverlay extends JavaScriptObject {

    /** JSO mandated protected constructor. */
    protected CMBeforeChangeEventOverlay() {
    }

    /**
     * Return the from field of the event.
     * @return from
     */
    public final native CMPositionOverlay getFrom() /*-{
        return this.from;
    }-*/;

    /**
     * Return the to field of the event.
     * @return to
     */
    public final native CMPositionOverlay getTo() /*-{
        return this.to;
    }-*/;

    /**
     * Return the text field of the event i.e. the added text.
     * @return text
     */
    public final native JsArrayString getText() /*-{
        return this.text;
    }-*/;

    /** Cancels the change. */
    public final native void cancel() /*-{
        this.cancel();
    }-*/;

    /**
     * Tells if the change is updatable.
     * @return true iff the change is updatable
     */
    public final native boolean hasUpdate() /*-{
        return (typeof this.update === "function");
    }-*/;

    /** Sets the change as updated. */
    public final native void update() /*-{
        return this.update();
    }-*/;

    /** Sets the change as updated with a new 'from' value. */
    public final native void update(CMPositionOverlay from) /*-{
        this.update(from);
    }-*/;

    /** Sets the change as updated with a new 'from' and 'to' values. */
    public final native void update(CMPositionOverlay from, CMPositionOverlay to) /*-{
        this.update(from, to);
    }-*/;

    /** Sets the change as updated with a new 'from', 'to' and 'text' values. */
    public final native void update(CMPositionOverlay from, CMPositionOverlay to, JsArrayString text) /*-{
        this.update(from, to, text);
    }-*/;
}
{'fraction_non_alphanumeric': 0.18572054314498468, 'fraction_numerical': 0.003504161191414805, 'mean_word_length': 2.9851657940663174, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7492812', 'n_tokens_mistral': 1343, 'n_tokens_neox': 1244, 'n_words': 378}