Package com.google.gwt.core.client

Examples of com.google.gwt.core.client.JsArrayString


 
  public void index(String[] columns) {
    index(columns, false);
  }
  public void index(String[] columns, boolean unique) {
    JsArrayString jsArray = (JsArrayString) JavaScriptObject.createArray();
    for (int i = 0; i < columns.length; i++) {
      String col = columns[i];
      jsArray.set(i, col);
    }
    index(jsArray, false, getNativeObject());
  }
View Full Code Here


      public double getMillis() {
        return GwtStatisticsEvent.this.getMillis();
      }
      //@Override
      public Iterator<String> getExtraParameterNames() {
        final JsArrayString names = getExtraParameterNames0();
        return new Iterator<String>() {
          private int idx = 0;

          //@Override
          public boolean hasNext() {
            return idx < names.length();
          }

          //@Override
          public String next() {
            return names.get(idx++);
          }

          //@Override
          public void remove() {
            throw new RuntimeException("parameter names are read-only");
View Full Code Here

  }-*/;
 
  // fileMgr methods are not in phonegap doc yet.
 
  public static String[] getRootPaths() {
    JsArrayString jsArray = getRootPathsNative();
    String[] array = new String[jsArray.length()];
    for (int i = 0; i < jsArray.length(); i++) {
      array[i] = jsArray.get(i);
    }
    return array;
  }
View Full Code Here

  private static native JsArrayString getRootPathsNative() /*-{
    return $wnd.navigator.fileMgr.getRootPaths();
  }-*/;

  public static String[] getFileBasePaths() {
    JsArrayString jsArray = getFileBasePathsNative();
    String[] array = new String[jsArray.length()];
    for (int i = 0; i < jsArray.length(); i++) {
      array[i] = jsArray.get(i);
    }
    return array;
  }
View Full Code Here

    return test(regExp, test);
  }

  @Override
  public List<String> getMatches(String test) {
    JsArrayString matches = matches(regExp, test);
    if (matches != null && matches.length() > 0) {
      List<String> result = new ArrayList<String>(matches.length());
      for (int i = 0; i < matches.length(); ++i) {
        result.add(matches.get(i));
      }
      return result;
    }
    return new ArrayList<String>();
  }
View Full Code Here

    return result;
  }

  public static JsArrayString toJsArray(List<String> list)
  {
    JsArrayString js = JsArrayString.createArray().cast();
    for (int i = 0; i < list.size(); i++)
    {
      js.set(i, list.get(i));
    }
    return js;
  }
View Full Code Here

    return js;
  }

  public static JsArrayString toJsArray(String[] args)
  {
    JsArrayString js = JsArrayString.createArray().cast();
    for (int i = 0; i < args.length; i++)
    {
      js.set(i, args[i]);
    }
    return js;
  }
View Full Code Here

                                     boolean manual)
   {
      boolean ignoredUpdate = false;
      if (result.getUpdateVersion().length() > 0)
      {
         JsArrayString ignoredUpdates = ignoredUpdates_.getIgnoredUpdates();
         for (int i = 0; i < ignoredUpdates.length(); i++)
         {
            if (ignoredUpdates.get(i).equals(result.getUpdateVersion()))
            {
               ignoredUpdate = true;
            }
         }
      }
View Full Code Here

   private void fillCompletionResult(
         Completions response,
         boolean implicit,
         ServerRequestCallback<CompletionResult> callback)
   {
      JsArrayString comp = response.getCompletions();
      JsArrayString pkgs = response.getPackages();
      JsArrayBoolean quote = response.getQuote();
      JsArrayInteger type = response.getType();
      ArrayList<QualifiedName> newComp = new ArrayList<QualifiedName>();
      for (int i = 0; i < comp.length(); i++)
      {
         newComp.add(new QualifiedName(comp.get(i), pkgs.get(i), quote.get(i), type.get(i)));
      }

      CompletionResult result = new CompletionResult(
            response.getToken(),
            newComp,
View Full Code Here

         public void onResponseReceived(Completions response)
         {
            cachedLinePrefix_ = token;
            String token = response.getToken();

            JsArrayString comp = response.getCompletions();
            JsArrayString pkgs = response.getPackages();
            JsArrayBoolean quote = response.getQuote();
            JsArrayInteger type = response.getType();
            ArrayList<QualifiedName> newComp = new ArrayList<QualifiedName>();
           
            // Get function completions from the server
            for (int i = 0; i < comp.length(); i++)
               if (comp.get(i).endsWith(" = "))
                  newComp.add(new QualifiedName(comp.get(i), pkgs.get(i), quote.get(i), type.get(i)));
           
            // Try getting our own function argument completions
            if (!response.getExcludeOtherCompletions())
            {
               addFunctionArgumentCompletions(token, newComp);
               addScopedArgumentCompletions(token, newComp);
            }
           
            // Get variable completions from the current scope
            if (!response.getExcludeOtherCompletions())
            {
               addScopedCompletions(token, newComp, "variable");
               addScopedCompletions(token, newComp, "function");
            }
           
            // Get other server completions
            for (int i = 0; i < comp.length(); i++)
               if (!comp.get(i).endsWith(" = "))
                  newComp.add(new QualifiedName(comp.get(i), pkgs.get(i), quote.get(i), type.get(i)));
           
            CompletionResult result = new CompletionResult(
                  response.getToken(),
                  newComp,
                  response.getGuessedFunctionName(),
View Full Code Here

TOP

Related Classes of com.google.gwt.core.client.JsArrayString

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.