use of jsinterop.annotations.JsIgnore in project deephaven-core by deephaven.
the class JsFigure method downsampleFailed.
@JsIgnore
public void downsampleFailed(String message, Set<JsSeries> series, double tableSize) {
CustomEventInit failInit = CustomEventInit.create();
failInit.setDetail(JsPropertyMap.of("series", series, "message", message, "size", tableSize));
fireEvent(EVENT_DOWNSAMPLEFAILED, failInit);
}
use of jsinterop.annotations.JsIgnore in project edumips64 by EduMIPS64.
the class Instruction method FromInstruction.
@JsIgnore()
public static Instruction FromInstruction(InstructionInterface i) {
if (i == null) {
return null;
}
Instruction instruction = new Instruction();
instruction.Name = i.getName();
instruction.Code = i.getFullName();
instruction.SerialNumber = i.getSerialNumber();
instruction.Comment = i.getComment();
instruction.BinaryRepresentation = i.getRepr().getBinString();
instruction.OpCode = instruction.BinaryRepresentation.substring(0, 6);
ParsedInstructionMetadata meta = i.getParsingMetadata();
if (meta != null) {
instruction.Address = meta.address;
instruction.Line = meta.sourceLine;
}
return instruction;
}
use of jsinterop.annotations.JsIgnore in project console by hal.
the class ResourceDescription method isDefaultValue.
@JsIgnore
public boolean isDefaultValue(String path, String name, Object value) {
Property property = findAttribute(path, name);
if (property != null) {
ModelNode attribute = property.getValue();
if (attribute.hasDefined(DEFAULT)) {
if (value == null) {
return true;
} else {
ModelType type = attribute.get(TYPE).asType();
if (type.equals(ModelType.INT)) {
type = ModelType.LONG;
}
Object defaultValue = attribute.get(DEFAULT).as(type);
return value.equals(defaultValue);
}
}
}
return false;
}
use of jsinterop.annotations.JsIgnore in project console by hal.
the class AddressTemplate method of.
/**
* Turns a resource address into an address template which is the opposite of {@link #resolve(StatementContext, String...)}.
* Use the {@link Unresolver} function to specify how the segments of the resource address are "unresolved". It is called
* for each segment of the specified resource address.
*/
@JsIgnore
public static AddressTemplate of(ResourceAddress address, Unresolver unresolver) {
int index = 0;
boolean first = true;
StringBuilder builder = new StringBuilder();
if (address.isDefined()) {
int size = address.size();
for (Iterator<Property> iterator = address.asPropertyList().iterator(); iterator.hasNext(); ) {
Property property = iterator.next();
String name = property.getName();
String value = property.getValue().asString();
if (value.contains("/")) {
value = ModelNodeHelper.encodeValue(value);
}
String segment = unresolver == null ? name + EQUALS + value : unresolver.unresolve(name, value, first, !iterator.hasNext(), index, size);
builder.append(segment);
if (iterator.hasNext()) {
builder.append("/");
}
first = false;
index++;
}
}
return of(builder.toString());
}
use of jsinterop.annotations.JsIgnore in project console by hal.
the class Dispatcher method upload.
@JsIgnore
public Single<ModelNode> upload(File file, Operation operation) {
Operation uploadOperation = runAs(operation);
ConstructorBlobPartsArrayUnionType blob = ConstructorBlobPartsArrayUnionType.of(uploadOperation.toBase64String());
BlobPropertyBag options = BlobPropertyBag.create();
options.setType("application/dmr-encoded");
FormData formData = new FormData();
if (navigator.userAgent.contains("Safari") && !navigator.userAgent.contains("Chrome")) {
// Safari does not support sending new files
// https://bugs.webkit.org/show_bug.cgi?id=165081
ConstructorBlobPartsArrayUnionType fileAsBlob = ConstructorBlobPartsArrayUnionType.of(file);
formData.append(file.name, new Blob(new ConstructorBlobPartsArrayUnionType[] { fileAsBlob }));
} else {
formData.append(file.name, AppendValueUnionType.of(file));
}
formData.append(OPERATION, new Blob(new ConstructorBlobPartsArrayUnionType[] { blob }, options));
return uploadFormData(formData, uploadOperation).map(payload -> payload.get(RESULT));
}
Aggregations