use of com.google.gwt.core.client.JsArrayInteger in project gwtphonegap by dankurka.
the class NotificationMobileImpl method vibrateWithPattern.
@Override
public void vibrateWithPattern(int[] pattern) {
JsArrayInteger jsPattern = JsArrayUtils.readOnlyJsArray(pattern);
vibrateWithPattern0(jsPattern);
}
use of com.google.gwt.core.client.JsArrayInteger in project gwtphonegap by dankurka.
the class NotificationMobileImpl method vibrateWithPattern.
@Override
@Deprecated
public void vibrateWithPattern(int[] pattern, int repeat) {
JsArrayInteger jsPattern = JsArrayUtils.readOnlyJsArray(pattern);
vibrateWithPattern0(jsPattern, repeat);
}
use of com.google.gwt.core.client.JsArrayInteger in project che by eclipse.
the class TerminalPresenter method setTerminalSize.
@Override
public void setTerminalSize(int x, int y) {
if (!connected) {
return;
}
if (width == x && height == y) {
return;
}
terminal.resize(x, y);
width = x;
height = y;
Jso jso = Jso.create();
JsArrayInteger arr = Jso.createArray().cast();
arr.set(0, x);
arr.set(1, y);
jso.addField("type", "resize");
jso.addField("data", arr);
socket.send(jso.serialize());
}
use of com.google.gwt.core.client.JsArrayInteger in project rstudio by rstudio.
the class CompletionRequester method getCompletions.
public void getCompletions(final String token, final List<String> assocData, final List<Integer> dataType, final List<Integer> numCommas, final String functionCallString, final String chainDataName, final JsArrayString chainAdditionalArgs, final JsArrayString chainExcludeArgs, final boolean chainExcludeArgsFromObject, final String filePath, final String documentId, final boolean implicit, final ServerRequestCallback<CompletionResult> callback) {
boolean isHelp = dataType.size() > 0 && dataType.get(0) == AutocompletionContext.TYPE_HELP;
if (usingCache(token, isHelp, callback))
return;
doGetCompletions(token, assocData, dataType, numCommas, functionCallString, chainDataName, chainAdditionalArgs, chainExcludeArgs, chainExcludeArgsFromObject, filePath, documentId, new ServerRequestCallback<Completions>() {
@Override
public void onError(ServerError error) {
callback.onError(error);
}
@Override
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), response.getHelpHandler()));
// 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), response.getHelpHandler()));
// to properly ascertain this.
if (isTopLevelCompletionRequest())
addSnippetCompletions(token, newComp);
// Remove duplicates
newComp = resolveDuplicates(newComp);
CompletionResult result = new CompletionResult(response.getToken(), newComp, response.getGuessedFunctionName(), response.getSuggestOnAccept(), response.getOverrideInsertParens());
if (response.isCacheable()) {
cachedCompletions_.put("", result);
}
callback.onResponseReceived(result);
}
});
}
use of com.google.gwt.core.client.JsArrayInteger in project rstudio by rstudio.
the class FindResult method getJavaArray.
private ArrayList<Integer> getJavaArray(String property) {
JsArrayInteger array = getArray(property);
ArrayList<Integer> ints = new ArrayList<Integer>();
for (int i = 0; i < array.length(); i++) ints.add(array.get(i));
return ints;
}
Aggregations