/*******************************************************************************
 * 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;

import com.google.gwt.core.client.JavaScriptObject;

public class CMSetSelectionOptions extends JavaScriptObject {

    protected CMSetSelectionOptions() {
    }

    /*
     * Should we scroll to the selection head ? Default to true
     */

    public final native boolean getScroll() /*-{
        return this.scroll;
    }-*/;

    public final native void setScroll(boolean newValue) /*-{
        this.scroll = newValue;
    }-*/;

    /*
     * Detemines whether the selection history event may be merged with the previous one
     */


    public final native boolean getOrigin() /*-{
        return this.origin;
    }-*/;

    public final native void setOrigin(String newValue) /*-{
        this.origin = newValue;
    }-*/;

    /*
     * Adjustement direction when the range is atomic (the cursor can't go inside). 1 or -1. By default, depends on the relative position of
     * the old selection
     */

    public final native boolean getBias() /*-{
        return this.bias;
    }-*/;

    public final native void setBias(int newValue) /*-{
        this.bias = newValue;
    }-*/;

    public static final native CMSetSelectionOptions create() /*-{
        return {};
    }-*/;

    public static final native CMSetSelectionOptions createNoScroll() /*-{
        return {"scroll": false};
    }-*/;
}

@@ -618,16 +618,69 @@
 bject;%0A%0A
+/**%0A * Option objects for set selection methods.%0A */%0A
 public c
@@ -734,16 +734,63 @@
 ject %7B%0A%0A
+    /** JSO mandated protected constructor. */%0A
     prot
@@ -916,91 +916,347 @@
     
-public final native boolean getScroll() /*-%7B%0A        return this.scroll;%0A    %7D-*/;%0A
+/**%0A     * Tells if we should scroll to the selection head.%0A     * @return false to not scroll%0A     */%0A    public final native boolean getScroll() /*-%7B%0A        return this.scroll;%0A    %7D-*/;%0A%0A    /**%0A     * Sets the flag that tells if we should scroll to the selection head.%3Cbr%3E%0A     * Defaults to true.%0A     * @param true to scroll%0A     */
 %0A   
@@ -1375,16 +1375,17 @@
   * Dete
+r
 mines wh
@@ -1467,96 +1467,581 @@
 */%0A%0A
-%0A    public final native boolean getOrigin() /*-%7B%0A        return this.origin;%0A    %7D-*/;%0A
+    /**%0A     * Determines whether the selection history event may be merged with the previous one.%0A     * @see https://codemirror.net/doc/manual.html#setSelection for the meaning of the values%0A     * @return true if the history event can be merged%0A     */%0A    public final native boolean getOrigin() /*-%7B%0A        return this.origin;%0A    %7D-*/;%0A%0A    /**%0A     * Decides if the selection history event may be merged with the previous one.%0A     * @see https://codemirror.net/doc/manual.html#setSelection for the meaning of the values%0A     * @param newValue the new value%0A     */
 %0A   
@@ -2319,24 +2319,141 @@
 on%0A     */%0A%0A
+    /**%0A     * Returns the adjustement when scrolling if the range is atomic.%0A     * @return the adjustement%0A     */%0A
     public f
@@ -2460,31 +2460,27 @@
 inal native 
-boolean
+int
  getBias() /
@@ -2528,197 +2528,632 @@
     
-public final native void setBias(int newValue) /*-%7B%0A        this.bias = newValue;%0A    %7D-*/;%0A%0A    public static final native CMSetSelectionOptions create() /*-%7B%0A        return %7B%7D;%0A    %7D-*/;%0A
+/**%0A     * Sets the adjustement when scrolling if the range is atomic.%3Cbr%3E%0A     * Valid values are 1 and -1 (resp. forward and backward)%0A     * @param newValue the new value%0A     */%0A    public final native void setBias(int newValue) /*-%7B%0A        this.bias = newValue;%0A    %7D-*/;%0A%0A    /**%0A     * Creates a new option objects with the default values : scroll.%0A     * @return a default option object%0A     */%0A    public static final native CMSetSelectionOptions create() /*-%7B%0A        return %7B%7D;%0A    %7D-*/;%0A%0A    /**%0A     * Creates a new option objects with the 'no scroll' option set.%0A     * @return a default option object%0A     */
 %0A   

Add missing javadoc