1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-26 20:54:22 +01:00

Calling arduino builder with GPRC API [experimental]

This commit is contained in:
Cristian Maglie 2017-09-25 15:46:15 +02:00 committed by Martino Facchin
parent 116cad067e
commit 7de9a3e483
25 changed files with 3098 additions and 1 deletions

View File

@ -26,6 +26,7 @@ package processing.app;
import cc.arduino.Compiler;
import cc.arduino.CompilerProgressListener;
import cc.arduino.UploaderUtils;
import cc.arduino.builder.ArduinoBuilder;
import cc.arduino.packages.Uploader;
import processing.app.debug.RunnerException;
import processing.app.forms.PasswordAuthorizationDialog;
@ -58,10 +59,18 @@ import static processing.app.I18n.tr;
public class SketchController {
private final Editor editor;
private final Sketch sketch;
private final ArduinoBuilder builder;
public SketchController(Editor _editor, Sketch _sketch) {
ArduinoBuilder _builder = null;
try {
_builder = new ArduinoBuilder();
} catch (IOException e) {
e.printStackTrace();
}
editor = _editor;
sketch = _sketch;
builder = _builder;
}
private boolean renamingCode;
@ -706,7 +715,8 @@ public class SketchController {
}
try {
return new Compiler(pathToSketch, sketch).codeComplete(editor.status.getCompilerProgressListeners(), requestedFile, line, col);
return builder.codeComplete(BaseNoGui.getTargetBoard(), pathToSketch, requestedFile, line, col);
//return new Compiler(pathToSketch, sketch).codeComplete(editor.status.getCompilerProgressListeners(), requestedFile, line, col);
} finally {
// Make sure we clean up any temporary sketch copy
if (deleteTemp)

View File

@ -26,5 +26,20 @@
<classpathentry kind="lib" path="lib/commons-lang3-3.8.1.jar"/>
<classpathentry kind="lib" path="lib/jssc-2.8.0-arduino4.jar"/>
<classpathentry kind="lib" path="lib/commons-io-2.6.jar"/>
<classpathentry kind="lib" path="lib/grpc-netty-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/grpc-protobuf-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/grpc-stub-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/grpc-core-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/guava-19.0.jar"/>
<classpathentry kind="lib" path="lib/grpc-context-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/protobuf-java-3.4.0.jar"/>
<classpathentry kind="lib" path="lib/grpc-services-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/grpc-grpclb-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/grpc-auth-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/grpc-okhttp-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/grpc-protobuf-nano-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/netty-all-4.1.15.Final.jar"/>
<classpathentry kind="lib" path="lib/instrumentation-api-0.4.3.jar"/>
<classpathentry kind="lib" path="lib/grpc-protobuf-lite-1.6.1.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,86 @@
package cc.arduino.builder;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import cc.arduino.Compiler;
import cc.arduino.builder.BuilderGrpc.BuilderBlockingStub;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import processing.app.BaseNoGui;
import processing.app.debug.MessageSiphon;
import processing.app.debug.TargetBoard;
import processing.app.helpers.ProcessUtils;
public class ArduinoBuilder {
private ManagedChannel channel;
private BuilderBlockingStub blockingStub;
// private BuilderStub asyncStub;
private Process builder;
private MessageSiphon builderOut, builderErr;
// private Exception exception = null;
public ArduinoBuilder() throws IOException {
channel = ManagedChannelBuilder.forAddress("127.0.0.1", 12345).usePlaintext(true).build();
blockingStub = BuilderGrpc.newBlockingStub(channel);
// asyncStub = BuilderGrpc.newStub(channel);
List<String> cmd = new ArrayList<>();
cmd.add(BaseNoGui.getContentFile("arduino-builder").getAbsolutePath());
cmd.add("-daemon");
builder = ProcessUtils.exec(cmd.toArray(new String[0]));
builderOut = new MessageSiphon(builder.getInputStream(), (msg) -> {
System.out.println(msg);
// try {
// xxx.write(msg.getBytes());
// } catch (Exception e) {
// exception = new RunnerException(e);
// }
});
builderErr = new MessageSiphon(builder.getErrorStream(), (msg) -> {
System.err.println(msg);
// try {
// xxx.write(msg.getBytes());
// } catch (Exception e) {
// exception = new RunnerException(e);
// }
});
}
public int close() throws InterruptedException {
builder.destroy();
builderOut.join();
builderErr.join();
return builder.waitFor();
}
public String codeComplete(TargetBoard board, File pathToSketch, File requestedFile, int line, int col) {
BuildParams.Builder request = BuildParams.newBuilder();
File builtInLibs = BaseNoGui.getContentFile("libraries");
if (builtInLibs.isDirectory()) {
request.setBuiltInLibrariesFolders(builtInLibs.getAbsolutePath());
}
request.setCodeCompleteAt(requestedFile.getAbsolutePath() + ":" + line + ":" + col);
request.setFQBN(Compiler.getBoardFQBN(board));
request.setCustomBuildProperties("build.warn_data_percentage=75");
String hardwareFolders = BaseNoGui.getAllHardwareFolders().stream().map(x -> x.getAbsolutePath()).collect(Collectors.joining(","));
request.setHardwareFolders(hardwareFolders);
request.setOtherLibrariesFolders(BaseNoGui.getSketchbookLibrariesFolder().folder.getAbsolutePath());
request.setArduinoAPIVersion("10805");
request.setSketchLocation(pathToSketch.getAbsolutePath());
String toolsFolders = BaseNoGui.getAllToolsFolders().stream().map(x->x.getAbsolutePath()).collect(Collectors.joining(","));
request.setToolsFolders(toolsFolders);
//request.setVerbose(true);
//request.setWarningsLevel("all");
//request.setBuildCachePath("/tmp/arduino_cache_761418/");
Response resp = blockingStub.autocomplete(request.build());
return resp.getLine();
}
}

View File

@ -0,0 +1,1950 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: builder.proto
package cc.arduino.builder;
/**
* Protobuf type {@code proto.BuildParams}
*/
public final class BuildParams extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.BuildParams)
BuildParamsOrBuilder {
// Use BuildParams.newBuilder() to construct.
private BuildParams(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private BuildParams() {
hardwareFolders_ = "";
toolsFolders_ = "";
builtInLibrariesFolders_ = "";
otherLibrariesFolders_ = "";
sketchLocation_ = "";
fQBN_ = "";
arduinoAPIVersion_ = "";
customBuildProperties_ = "";
buildCachePath_ = "";
buildPath_ = "";
warningsLevel_ = "";
codeCompleteAt_ = "";
verbose_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private BuildParams(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
hardwareFolders_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
toolsFolders_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
builtInLibrariesFolders_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
otherLibrariesFolders_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
sketchLocation_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
fQBN_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
arduinoAPIVersion_ = s;
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
customBuildProperties_ = s;
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
buildCachePath_ = s;
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
buildPath_ = s;
break;
}
case 90: {
java.lang.String s = input.readStringRequireUtf8();
warningsLevel_ = s;
break;
}
case 98: {
java.lang.String s = input.readStringRequireUtf8();
codeCompleteAt_ = s;
break;
}
case 104: {
verbose_ = input.readBool();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return cc.arduino.builder.BuilderProto.internal_static_proto_BuildParams_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return cc.arduino.builder.BuilderProto.internal_static_proto_BuildParams_fieldAccessorTable
.ensureFieldAccessorsInitialized(
cc.arduino.builder.BuildParams.class, cc.arduino.builder.BuildParams.Builder.class);
}
public static final int HARDWAREFOLDERS_FIELD_NUMBER = 1;
private volatile java.lang.Object hardwareFolders_;
/**
* <code>optional string hardwareFolders = 1;</code>
*/
public java.lang.String getHardwareFolders() {
java.lang.Object ref = hardwareFolders_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
hardwareFolders_ = s;
return s;
}
}
/**
* <code>optional string hardwareFolders = 1;</code>
*/
public com.google.protobuf.ByteString
getHardwareFoldersBytes() {
java.lang.Object ref = hardwareFolders_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
hardwareFolders_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TOOLSFOLDERS_FIELD_NUMBER = 2;
private volatile java.lang.Object toolsFolders_;
/**
* <code>optional string toolsFolders = 2;</code>
*/
public java.lang.String getToolsFolders() {
java.lang.Object ref = toolsFolders_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
toolsFolders_ = s;
return s;
}
}
/**
* <code>optional string toolsFolders = 2;</code>
*/
public com.google.protobuf.ByteString
getToolsFoldersBytes() {
java.lang.Object ref = toolsFolders_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
toolsFolders_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BUILTINLIBRARIESFOLDERS_FIELD_NUMBER = 3;
private volatile java.lang.Object builtInLibrariesFolders_;
/**
* <code>optional string builtInLibrariesFolders = 3;</code>
*/
public java.lang.String getBuiltInLibrariesFolders() {
java.lang.Object ref = builtInLibrariesFolders_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
builtInLibrariesFolders_ = s;
return s;
}
}
/**
* <code>optional string builtInLibrariesFolders = 3;</code>
*/
public com.google.protobuf.ByteString
getBuiltInLibrariesFoldersBytes() {
java.lang.Object ref = builtInLibrariesFolders_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
builtInLibrariesFolders_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OTHERLIBRARIESFOLDERS_FIELD_NUMBER = 4;
private volatile java.lang.Object otherLibrariesFolders_;
/**
* <code>optional string otherLibrariesFolders = 4;</code>
*/
public java.lang.String getOtherLibrariesFolders() {
java.lang.Object ref = otherLibrariesFolders_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
otherLibrariesFolders_ = s;
return s;
}
}
/**
* <code>optional string otherLibrariesFolders = 4;</code>
*/
public com.google.protobuf.ByteString
getOtherLibrariesFoldersBytes() {
java.lang.Object ref = otherLibrariesFolders_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
otherLibrariesFolders_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SKETCHLOCATION_FIELD_NUMBER = 5;
private volatile java.lang.Object sketchLocation_;
/**
* <code>optional string sketchLocation = 5;</code>
*/
public java.lang.String getSketchLocation() {
java.lang.Object ref = sketchLocation_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sketchLocation_ = s;
return s;
}
}
/**
* <code>optional string sketchLocation = 5;</code>
*/
public com.google.protobuf.ByteString
getSketchLocationBytes() {
java.lang.Object ref = sketchLocation_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sketchLocation_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FQBN_FIELD_NUMBER = 6;
private volatile java.lang.Object fQBN_;
/**
* <code>optional string fQBN = 6;</code>
*/
public java.lang.String getFQBN() {
java.lang.Object ref = fQBN_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
fQBN_ = s;
return s;
}
}
/**
* <code>optional string fQBN = 6;</code>
*/
public com.google.protobuf.ByteString
getFQBNBytes() {
java.lang.Object ref = fQBN_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
fQBN_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ARDUINOAPIVERSION_FIELD_NUMBER = 7;
private volatile java.lang.Object arduinoAPIVersion_;
/**
* <code>optional string arduinoAPIVersion = 7;</code>
*/
public java.lang.String getArduinoAPIVersion() {
java.lang.Object ref = arduinoAPIVersion_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
arduinoAPIVersion_ = s;
return s;
}
}
/**
* <code>optional string arduinoAPIVersion = 7;</code>
*/
public com.google.protobuf.ByteString
getArduinoAPIVersionBytes() {
java.lang.Object ref = arduinoAPIVersion_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
arduinoAPIVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CUSTOMBUILDPROPERTIES_FIELD_NUMBER = 8;
private volatile java.lang.Object customBuildProperties_;
/**
* <code>optional string customBuildProperties = 8;</code>
*/
public java.lang.String getCustomBuildProperties() {
java.lang.Object ref = customBuildProperties_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
customBuildProperties_ = s;
return s;
}
}
/**
* <code>optional string customBuildProperties = 8;</code>
*/
public com.google.protobuf.ByteString
getCustomBuildPropertiesBytes() {
java.lang.Object ref = customBuildProperties_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customBuildProperties_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BUILDCACHEPATH_FIELD_NUMBER = 9;
private volatile java.lang.Object buildCachePath_;
/**
* <code>optional string buildCachePath = 9;</code>
*/
public java.lang.String getBuildCachePath() {
java.lang.Object ref = buildCachePath_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
buildCachePath_ = s;
return s;
}
}
/**
* <code>optional string buildCachePath = 9;</code>
*/
public com.google.protobuf.ByteString
getBuildCachePathBytes() {
java.lang.Object ref = buildCachePath_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
buildCachePath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BUILDPATH_FIELD_NUMBER = 10;
private volatile java.lang.Object buildPath_;
/**
* <code>optional string buildPath = 10;</code>
*/
public java.lang.String getBuildPath() {
java.lang.Object ref = buildPath_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
buildPath_ = s;
return s;
}
}
/**
* <code>optional string buildPath = 10;</code>
*/
public com.google.protobuf.ByteString
getBuildPathBytes() {
java.lang.Object ref = buildPath_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
buildPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int WARNINGSLEVEL_FIELD_NUMBER = 11;
private volatile java.lang.Object warningsLevel_;
/**
* <code>optional string warningsLevel = 11;</code>
*/
public java.lang.String getWarningsLevel() {
java.lang.Object ref = warningsLevel_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
warningsLevel_ = s;
return s;
}
}
/**
* <code>optional string warningsLevel = 11;</code>
*/
public com.google.protobuf.ByteString
getWarningsLevelBytes() {
java.lang.Object ref = warningsLevel_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
warningsLevel_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CODECOMPLETEAT_FIELD_NUMBER = 12;
private volatile java.lang.Object codeCompleteAt_;
/**
* <code>optional string codeCompleteAt = 12;</code>
*/
public java.lang.String getCodeCompleteAt() {
java.lang.Object ref = codeCompleteAt_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
codeCompleteAt_ = s;
return s;
}
}
/**
* <code>optional string codeCompleteAt = 12;</code>
*/
public com.google.protobuf.ByteString
getCodeCompleteAtBytes() {
java.lang.Object ref = codeCompleteAt_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
codeCompleteAt_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VERBOSE_FIELD_NUMBER = 13;
private boolean verbose_;
/**
* <code>optional bool verbose = 13;</code>
*/
public boolean getVerbose() {
return verbose_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getHardwareFoldersBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hardwareFolders_);
}
if (!getToolsFoldersBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, toolsFolders_);
}
if (!getBuiltInLibrariesFoldersBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, builtInLibrariesFolders_);
}
if (!getOtherLibrariesFoldersBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, otherLibrariesFolders_);
}
if (!getSketchLocationBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, sketchLocation_);
}
if (!getFQBNBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, fQBN_);
}
if (!getArduinoAPIVersionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, arduinoAPIVersion_);
}
if (!getCustomBuildPropertiesBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, customBuildProperties_);
}
if (!getBuildCachePathBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, buildCachePath_);
}
if (!getBuildPathBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, buildPath_);
}
if (!getWarningsLevelBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, warningsLevel_);
}
if (!getCodeCompleteAtBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, codeCompleteAt_);
}
if (verbose_ != false) {
output.writeBool(13, verbose_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getHardwareFoldersBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hardwareFolders_);
}
if (!getToolsFoldersBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, toolsFolders_);
}
if (!getBuiltInLibrariesFoldersBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, builtInLibrariesFolders_);
}
if (!getOtherLibrariesFoldersBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, otherLibrariesFolders_);
}
if (!getSketchLocationBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, sketchLocation_);
}
if (!getFQBNBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, fQBN_);
}
if (!getArduinoAPIVersionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, arduinoAPIVersion_);
}
if (!getCustomBuildPropertiesBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, customBuildProperties_);
}
if (!getBuildCachePathBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, buildCachePath_);
}
if (!getBuildPathBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, buildPath_);
}
if (!getWarningsLevelBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, warningsLevel_);
}
if (!getCodeCompleteAtBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, codeCompleteAt_);
}
if (verbose_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(13, verbose_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof cc.arduino.builder.BuildParams)) {
return super.equals(obj);
}
cc.arduino.builder.BuildParams other = (cc.arduino.builder.BuildParams) obj;
boolean result = true;
result = result && getHardwareFolders()
.equals(other.getHardwareFolders());
result = result && getToolsFolders()
.equals(other.getToolsFolders());
result = result && getBuiltInLibrariesFolders()
.equals(other.getBuiltInLibrariesFolders());
result = result && getOtherLibrariesFolders()
.equals(other.getOtherLibrariesFolders());
result = result && getSketchLocation()
.equals(other.getSketchLocation());
result = result && getFQBN()
.equals(other.getFQBN());
result = result && getArduinoAPIVersion()
.equals(other.getArduinoAPIVersion());
result = result && getCustomBuildProperties()
.equals(other.getCustomBuildProperties());
result = result && getBuildCachePath()
.equals(other.getBuildCachePath());
result = result && getBuildPath()
.equals(other.getBuildPath());
result = result && getWarningsLevel()
.equals(other.getWarningsLevel());
result = result && getCodeCompleteAt()
.equals(other.getCodeCompleteAt());
result = result && (getVerbose()
== other.getVerbose());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + HARDWAREFOLDERS_FIELD_NUMBER;
hash = (53 * hash) + getHardwareFolders().hashCode();
hash = (37 * hash) + TOOLSFOLDERS_FIELD_NUMBER;
hash = (53 * hash) + getToolsFolders().hashCode();
hash = (37 * hash) + BUILTINLIBRARIESFOLDERS_FIELD_NUMBER;
hash = (53 * hash) + getBuiltInLibrariesFolders().hashCode();
hash = (37 * hash) + OTHERLIBRARIESFOLDERS_FIELD_NUMBER;
hash = (53 * hash) + getOtherLibrariesFolders().hashCode();
hash = (37 * hash) + SKETCHLOCATION_FIELD_NUMBER;
hash = (53 * hash) + getSketchLocation().hashCode();
hash = (37 * hash) + FQBN_FIELD_NUMBER;
hash = (53 * hash) + getFQBN().hashCode();
hash = (37 * hash) + ARDUINOAPIVERSION_FIELD_NUMBER;
hash = (53 * hash) + getArduinoAPIVersion().hashCode();
hash = (37 * hash) + CUSTOMBUILDPROPERTIES_FIELD_NUMBER;
hash = (53 * hash) + getCustomBuildProperties().hashCode();
hash = (37 * hash) + BUILDCACHEPATH_FIELD_NUMBER;
hash = (53 * hash) + getBuildCachePath().hashCode();
hash = (37 * hash) + BUILDPATH_FIELD_NUMBER;
hash = (53 * hash) + getBuildPath().hashCode();
hash = (37 * hash) + WARNINGSLEVEL_FIELD_NUMBER;
hash = (53 * hash) + getWarningsLevel().hashCode();
hash = (37 * hash) + CODECOMPLETEAT_FIELD_NUMBER;
hash = (53 * hash) + getCodeCompleteAt().hashCode();
hash = (37 * hash) + VERBOSE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getVerbose());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static cc.arduino.builder.BuildParams parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static cc.arduino.builder.BuildParams parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static cc.arduino.builder.BuildParams parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static cc.arduino.builder.BuildParams parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static cc.arduino.builder.BuildParams parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static cc.arduino.builder.BuildParams parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static cc.arduino.builder.BuildParams parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static cc.arduino.builder.BuildParams parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static cc.arduino.builder.BuildParams parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static cc.arduino.builder.BuildParams parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(cc.arduino.builder.BuildParams prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code proto.BuildParams}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:proto.BuildParams)
cc.arduino.builder.BuildParamsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return cc.arduino.builder.BuilderProto.internal_static_proto_BuildParams_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return cc.arduino.builder.BuilderProto.internal_static_proto_BuildParams_fieldAccessorTable
.ensureFieldAccessorsInitialized(
cc.arduino.builder.BuildParams.class, cc.arduino.builder.BuildParams.Builder.class);
}
// Construct using cc.arduino.builder.BuildParams.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
hardwareFolders_ = "";
toolsFolders_ = "";
builtInLibrariesFolders_ = "";
otherLibrariesFolders_ = "";
sketchLocation_ = "";
fQBN_ = "";
arduinoAPIVersion_ = "";
customBuildProperties_ = "";
buildCachePath_ = "";
buildPath_ = "";
warningsLevel_ = "";
codeCompleteAt_ = "";
verbose_ = false;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return cc.arduino.builder.BuilderProto.internal_static_proto_BuildParams_descriptor;
}
public cc.arduino.builder.BuildParams getDefaultInstanceForType() {
return cc.arduino.builder.BuildParams.getDefaultInstance();
}
public cc.arduino.builder.BuildParams build() {
cc.arduino.builder.BuildParams result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public cc.arduino.builder.BuildParams buildPartial() {
cc.arduino.builder.BuildParams result = new cc.arduino.builder.BuildParams(this);
result.hardwareFolders_ = hardwareFolders_;
result.toolsFolders_ = toolsFolders_;
result.builtInLibrariesFolders_ = builtInLibrariesFolders_;
result.otherLibrariesFolders_ = otherLibrariesFolders_;
result.sketchLocation_ = sketchLocation_;
result.fQBN_ = fQBN_;
result.arduinoAPIVersion_ = arduinoAPIVersion_;
result.customBuildProperties_ = customBuildProperties_;
result.buildCachePath_ = buildCachePath_;
result.buildPath_ = buildPath_;
result.warningsLevel_ = warningsLevel_;
result.codeCompleteAt_ = codeCompleteAt_;
result.verbose_ = verbose_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof cc.arduino.builder.BuildParams) {
return mergeFrom((cc.arduino.builder.BuildParams)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(cc.arduino.builder.BuildParams other) {
if (other == cc.arduino.builder.BuildParams.getDefaultInstance()) return this;
if (!other.getHardwareFolders().isEmpty()) {
hardwareFolders_ = other.hardwareFolders_;
onChanged();
}
if (!other.getToolsFolders().isEmpty()) {
toolsFolders_ = other.toolsFolders_;
onChanged();
}
if (!other.getBuiltInLibrariesFolders().isEmpty()) {
builtInLibrariesFolders_ = other.builtInLibrariesFolders_;
onChanged();
}
if (!other.getOtherLibrariesFolders().isEmpty()) {
otherLibrariesFolders_ = other.otherLibrariesFolders_;
onChanged();
}
if (!other.getSketchLocation().isEmpty()) {
sketchLocation_ = other.sketchLocation_;
onChanged();
}
if (!other.getFQBN().isEmpty()) {
fQBN_ = other.fQBN_;
onChanged();
}
if (!other.getArduinoAPIVersion().isEmpty()) {
arduinoAPIVersion_ = other.arduinoAPIVersion_;
onChanged();
}
if (!other.getCustomBuildProperties().isEmpty()) {
customBuildProperties_ = other.customBuildProperties_;
onChanged();
}
if (!other.getBuildCachePath().isEmpty()) {
buildCachePath_ = other.buildCachePath_;
onChanged();
}
if (!other.getBuildPath().isEmpty()) {
buildPath_ = other.buildPath_;
onChanged();
}
if (!other.getWarningsLevel().isEmpty()) {
warningsLevel_ = other.warningsLevel_;
onChanged();
}
if (!other.getCodeCompleteAt().isEmpty()) {
codeCompleteAt_ = other.codeCompleteAt_;
onChanged();
}
if (other.getVerbose() != false) {
setVerbose(other.getVerbose());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
cc.arduino.builder.BuildParams parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (cc.arduino.builder.BuildParams) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object hardwareFolders_ = "";
/**
* <code>optional string hardwareFolders = 1;</code>
*/
public java.lang.String getHardwareFolders() {
java.lang.Object ref = hardwareFolders_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
hardwareFolders_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string hardwareFolders = 1;</code>
*/
public com.google.protobuf.ByteString
getHardwareFoldersBytes() {
java.lang.Object ref = hardwareFolders_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
hardwareFolders_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string hardwareFolders = 1;</code>
*/
public Builder setHardwareFolders(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
hardwareFolders_ = value;
onChanged();
return this;
}
/**
* <code>optional string hardwareFolders = 1;</code>
*/
public Builder clearHardwareFolders() {
hardwareFolders_ = getDefaultInstance().getHardwareFolders();
onChanged();
return this;
}
/**
* <code>optional string hardwareFolders = 1;</code>
*/
public Builder setHardwareFoldersBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
hardwareFolders_ = value;
onChanged();
return this;
}
private java.lang.Object toolsFolders_ = "";
/**
* <code>optional string toolsFolders = 2;</code>
*/
public java.lang.String getToolsFolders() {
java.lang.Object ref = toolsFolders_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
toolsFolders_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string toolsFolders = 2;</code>
*/
public com.google.protobuf.ByteString
getToolsFoldersBytes() {
java.lang.Object ref = toolsFolders_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
toolsFolders_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string toolsFolders = 2;</code>
*/
public Builder setToolsFolders(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
toolsFolders_ = value;
onChanged();
return this;
}
/**
* <code>optional string toolsFolders = 2;</code>
*/
public Builder clearToolsFolders() {
toolsFolders_ = getDefaultInstance().getToolsFolders();
onChanged();
return this;
}
/**
* <code>optional string toolsFolders = 2;</code>
*/
public Builder setToolsFoldersBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
toolsFolders_ = value;
onChanged();
return this;
}
private java.lang.Object builtInLibrariesFolders_ = "";
/**
* <code>optional string builtInLibrariesFolders = 3;</code>
*/
public java.lang.String getBuiltInLibrariesFolders() {
java.lang.Object ref = builtInLibrariesFolders_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
builtInLibrariesFolders_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string builtInLibrariesFolders = 3;</code>
*/
public com.google.protobuf.ByteString
getBuiltInLibrariesFoldersBytes() {
java.lang.Object ref = builtInLibrariesFolders_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
builtInLibrariesFolders_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string builtInLibrariesFolders = 3;</code>
*/
public Builder setBuiltInLibrariesFolders(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
builtInLibrariesFolders_ = value;
onChanged();
return this;
}
/**
* <code>optional string builtInLibrariesFolders = 3;</code>
*/
public Builder clearBuiltInLibrariesFolders() {
builtInLibrariesFolders_ = getDefaultInstance().getBuiltInLibrariesFolders();
onChanged();
return this;
}
/**
* <code>optional string builtInLibrariesFolders = 3;</code>
*/
public Builder setBuiltInLibrariesFoldersBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
builtInLibrariesFolders_ = value;
onChanged();
return this;
}
private java.lang.Object otherLibrariesFolders_ = "";
/**
* <code>optional string otherLibrariesFolders = 4;</code>
*/
public java.lang.String getOtherLibrariesFolders() {
java.lang.Object ref = otherLibrariesFolders_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
otherLibrariesFolders_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string otherLibrariesFolders = 4;</code>
*/
public com.google.protobuf.ByteString
getOtherLibrariesFoldersBytes() {
java.lang.Object ref = otherLibrariesFolders_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
otherLibrariesFolders_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string otherLibrariesFolders = 4;</code>
*/
public Builder setOtherLibrariesFolders(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
otherLibrariesFolders_ = value;
onChanged();
return this;
}
/**
* <code>optional string otherLibrariesFolders = 4;</code>
*/
public Builder clearOtherLibrariesFolders() {
otherLibrariesFolders_ = getDefaultInstance().getOtherLibrariesFolders();
onChanged();
return this;
}
/**
* <code>optional string otherLibrariesFolders = 4;</code>
*/
public Builder setOtherLibrariesFoldersBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
otherLibrariesFolders_ = value;
onChanged();
return this;
}
private java.lang.Object sketchLocation_ = "";
/**
* <code>optional string sketchLocation = 5;</code>
*/
public java.lang.String getSketchLocation() {
java.lang.Object ref = sketchLocation_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sketchLocation_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string sketchLocation = 5;</code>
*/
public com.google.protobuf.ByteString
getSketchLocationBytes() {
java.lang.Object ref = sketchLocation_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sketchLocation_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string sketchLocation = 5;</code>
*/
public Builder setSketchLocation(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sketchLocation_ = value;
onChanged();
return this;
}
/**
* <code>optional string sketchLocation = 5;</code>
*/
public Builder clearSketchLocation() {
sketchLocation_ = getDefaultInstance().getSketchLocation();
onChanged();
return this;
}
/**
* <code>optional string sketchLocation = 5;</code>
*/
public Builder setSketchLocationBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sketchLocation_ = value;
onChanged();
return this;
}
private java.lang.Object fQBN_ = "";
/**
* <code>optional string fQBN = 6;</code>
*/
public java.lang.String getFQBN() {
java.lang.Object ref = fQBN_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
fQBN_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string fQBN = 6;</code>
*/
public com.google.protobuf.ByteString
getFQBNBytes() {
java.lang.Object ref = fQBN_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
fQBN_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string fQBN = 6;</code>
*/
public Builder setFQBN(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
fQBN_ = value;
onChanged();
return this;
}
/**
* <code>optional string fQBN = 6;</code>
*/
public Builder clearFQBN() {
fQBN_ = getDefaultInstance().getFQBN();
onChanged();
return this;
}
/**
* <code>optional string fQBN = 6;</code>
*/
public Builder setFQBNBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
fQBN_ = value;
onChanged();
return this;
}
private java.lang.Object arduinoAPIVersion_ = "";
/**
* <code>optional string arduinoAPIVersion = 7;</code>
*/
public java.lang.String getArduinoAPIVersion() {
java.lang.Object ref = arduinoAPIVersion_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
arduinoAPIVersion_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string arduinoAPIVersion = 7;</code>
*/
public com.google.protobuf.ByteString
getArduinoAPIVersionBytes() {
java.lang.Object ref = arduinoAPIVersion_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
arduinoAPIVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string arduinoAPIVersion = 7;</code>
*/
public Builder setArduinoAPIVersion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
arduinoAPIVersion_ = value;
onChanged();
return this;
}
/**
* <code>optional string arduinoAPIVersion = 7;</code>
*/
public Builder clearArduinoAPIVersion() {
arduinoAPIVersion_ = getDefaultInstance().getArduinoAPIVersion();
onChanged();
return this;
}
/**
* <code>optional string arduinoAPIVersion = 7;</code>
*/
public Builder setArduinoAPIVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
arduinoAPIVersion_ = value;
onChanged();
return this;
}
private java.lang.Object customBuildProperties_ = "";
/**
* <code>optional string customBuildProperties = 8;</code>
*/
public java.lang.String getCustomBuildProperties() {
java.lang.Object ref = customBuildProperties_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
customBuildProperties_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string customBuildProperties = 8;</code>
*/
public com.google.protobuf.ByteString
getCustomBuildPropertiesBytes() {
java.lang.Object ref = customBuildProperties_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customBuildProperties_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string customBuildProperties = 8;</code>
*/
public Builder setCustomBuildProperties(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
customBuildProperties_ = value;
onChanged();
return this;
}
/**
* <code>optional string customBuildProperties = 8;</code>
*/
public Builder clearCustomBuildProperties() {
customBuildProperties_ = getDefaultInstance().getCustomBuildProperties();
onChanged();
return this;
}
/**
* <code>optional string customBuildProperties = 8;</code>
*/
public Builder setCustomBuildPropertiesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
customBuildProperties_ = value;
onChanged();
return this;
}
private java.lang.Object buildCachePath_ = "";
/**
* <code>optional string buildCachePath = 9;</code>
*/
public java.lang.String getBuildCachePath() {
java.lang.Object ref = buildCachePath_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
buildCachePath_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string buildCachePath = 9;</code>
*/
public com.google.protobuf.ByteString
getBuildCachePathBytes() {
java.lang.Object ref = buildCachePath_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
buildCachePath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string buildCachePath = 9;</code>
*/
public Builder setBuildCachePath(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
buildCachePath_ = value;
onChanged();
return this;
}
/**
* <code>optional string buildCachePath = 9;</code>
*/
public Builder clearBuildCachePath() {
buildCachePath_ = getDefaultInstance().getBuildCachePath();
onChanged();
return this;
}
/**
* <code>optional string buildCachePath = 9;</code>
*/
public Builder setBuildCachePathBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
buildCachePath_ = value;
onChanged();
return this;
}
private java.lang.Object buildPath_ = "";
/**
* <code>optional string buildPath = 10;</code>
*/
public java.lang.String getBuildPath() {
java.lang.Object ref = buildPath_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
buildPath_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string buildPath = 10;</code>
*/
public com.google.protobuf.ByteString
getBuildPathBytes() {
java.lang.Object ref = buildPath_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
buildPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string buildPath = 10;</code>
*/
public Builder setBuildPath(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
buildPath_ = value;
onChanged();
return this;
}
/**
* <code>optional string buildPath = 10;</code>
*/
public Builder clearBuildPath() {
buildPath_ = getDefaultInstance().getBuildPath();
onChanged();
return this;
}
/**
* <code>optional string buildPath = 10;</code>
*/
public Builder setBuildPathBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
buildPath_ = value;
onChanged();
return this;
}
private java.lang.Object warningsLevel_ = "";
/**
* <code>optional string warningsLevel = 11;</code>
*/
public java.lang.String getWarningsLevel() {
java.lang.Object ref = warningsLevel_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
warningsLevel_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string warningsLevel = 11;</code>
*/
public com.google.protobuf.ByteString
getWarningsLevelBytes() {
java.lang.Object ref = warningsLevel_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
warningsLevel_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string warningsLevel = 11;</code>
*/
public Builder setWarningsLevel(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
warningsLevel_ = value;
onChanged();
return this;
}
/**
* <code>optional string warningsLevel = 11;</code>
*/
public Builder clearWarningsLevel() {
warningsLevel_ = getDefaultInstance().getWarningsLevel();
onChanged();
return this;
}
/**
* <code>optional string warningsLevel = 11;</code>
*/
public Builder setWarningsLevelBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
warningsLevel_ = value;
onChanged();
return this;
}
private java.lang.Object codeCompleteAt_ = "";
/**
* <code>optional string codeCompleteAt = 12;</code>
*/
public java.lang.String getCodeCompleteAt() {
java.lang.Object ref = codeCompleteAt_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
codeCompleteAt_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string codeCompleteAt = 12;</code>
*/
public com.google.protobuf.ByteString
getCodeCompleteAtBytes() {
java.lang.Object ref = codeCompleteAt_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
codeCompleteAt_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string codeCompleteAt = 12;</code>
*/
public Builder setCodeCompleteAt(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
codeCompleteAt_ = value;
onChanged();
return this;
}
/**
* <code>optional string codeCompleteAt = 12;</code>
*/
public Builder clearCodeCompleteAt() {
codeCompleteAt_ = getDefaultInstance().getCodeCompleteAt();
onChanged();
return this;
}
/**
* <code>optional string codeCompleteAt = 12;</code>
*/
public Builder setCodeCompleteAtBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
codeCompleteAt_ = value;
onChanged();
return this;
}
private boolean verbose_ ;
/**
* <code>optional bool verbose = 13;</code>
*/
public boolean getVerbose() {
return verbose_;
}
/**
* <code>optional bool verbose = 13;</code>
*/
public Builder setVerbose(boolean value) {
verbose_ = value;
onChanged();
return this;
}
/**
* <code>optional bool verbose = 13;</code>
*/
public Builder clearVerbose() {
verbose_ = false;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:proto.BuildParams)
}
// @@protoc_insertion_point(class_scope:proto.BuildParams)
private static final cc.arduino.builder.BuildParams DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new cc.arduino.builder.BuildParams();
}
public static cc.arduino.builder.BuildParams getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<BuildParams>
PARSER = new com.google.protobuf.AbstractParser<BuildParams>() {
public BuildParams parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BuildParams(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<BuildParams> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<BuildParams> getParserForType() {
return PARSER;
}
public cc.arduino.builder.BuildParams getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,134 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: builder.proto
package cc.arduino.builder;
public interface BuildParamsOrBuilder extends
// @@protoc_insertion_point(interface_extends:proto.BuildParams)
com.google.protobuf.MessageOrBuilder {
/**
* <code>optional string hardwareFolders = 1;</code>
*/
java.lang.String getHardwareFolders();
/**
* <code>optional string hardwareFolders = 1;</code>
*/
com.google.protobuf.ByteString
getHardwareFoldersBytes();
/**
* <code>optional string toolsFolders = 2;</code>
*/
java.lang.String getToolsFolders();
/**
* <code>optional string toolsFolders = 2;</code>
*/
com.google.protobuf.ByteString
getToolsFoldersBytes();
/**
* <code>optional string builtInLibrariesFolders = 3;</code>
*/
java.lang.String getBuiltInLibrariesFolders();
/**
* <code>optional string builtInLibrariesFolders = 3;</code>
*/
com.google.protobuf.ByteString
getBuiltInLibrariesFoldersBytes();
/**
* <code>optional string otherLibrariesFolders = 4;</code>
*/
java.lang.String getOtherLibrariesFolders();
/**
* <code>optional string otherLibrariesFolders = 4;</code>
*/
com.google.protobuf.ByteString
getOtherLibrariesFoldersBytes();
/**
* <code>optional string sketchLocation = 5;</code>
*/
java.lang.String getSketchLocation();
/**
* <code>optional string sketchLocation = 5;</code>
*/
com.google.protobuf.ByteString
getSketchLocationBytes();
/**
* <code>optional string fQBN = 6;</code>
*/
java.lang.String getFQBN();
/**
* <code>optional string fQBN = 6;</code>
*/
com.google.protobuf.ByteString
getFQBNBytes();
/**
* <code>optional string arduinoAPIVersion = 7;</code>
*/
java.lang.String getArduinoAPIVersion();
/**
* <code>optional string arduinoAPIVersion = 7;</code>
*/
com.google.protobuf.ByteString
getArduinoAPIVersionBytes();
/**
* <code>optional string customBuildProperties = 8;</code>
*/
java.lang.String getCustomBuildProperties();
/**
* <code>optional string customBuildProperties = 8;</code>
*/
com.google.protobuf.ByteString
getCustomBuildPropertiesBytes();
/**
* <code>optional string buildCachePath = 9;</code>
*/
java.lang.String getBuildCachePath();
/**
* <code>optional string buildCachePath = 9;</code>
*/
com.google.protobuf.ByteString
getBuildCachePathBytes();
/**
* <code>optional string buildPath = 10;</code>
*/
java.lang.String getBuildPath();
/**
* <code>optional string buildPath = 10;</code>
*/
com.google.protobuf.ByteString
getBuildPathBytes();
/**
* <code>optional string warningsLevel = 11;</code>
*/
java.lang.String getWarningsLevel();
/**
* <code>optional string warningsLevel = 11;</code>
*/
com.google.protobuf.ByteString
getWarningsLevelBytes();
/**
* <code>optional string codeCompleteAt = 12;</code>
*/
java.lang.String getCodeCompleteAt();
/**
* <code>optional string codeCompleteAt = 12;</code>
*/
com.google.protobuf.ByteString
getCodeCompleteAtBytes();
/**
* <code>optional bool verbose = 13;</code>
*/
boolean getVerbose();
}

View File

@ -0,0 +1,311 @@
package cc.arduino.builder;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
* <pre>
* Interface exported by the server.
* </pre>
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.6.1)",
comments = "Source: builder.proto")
public final class BuilderGrpc {
private BuilderGrpc() {}
public static final String SERVICE_NAME = "proto.Builder";
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor<cc.arduino.builder.BuildParams,
cc.arduino.builder.Response> METHOD_BUILD =
io.grpc.MethodDescriptor.<cc.arduino.builder.BuildParams, cc.arduino.builder.Response>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(
"proto.Builder", "Build"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
cc.arduino.builder.BuildParams.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
cc.arduino.builder.Response.getDefaultInstance()))
.build();
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor<cc.arduino.builder.BuildParams,
cc.arduino.builder.Response> METHOD_AUTOCOMPLETE =
io.grpc.MethodDescriptor.<cc.arduino.builder.BuildParams, cc.arduino.builder.Response>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"proto.Builder", "Autocomplete"))
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
cc.arduino.builder.BuildParams.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
cc.arduino.builder.Response.getDefaultInstance()))
.build();
/**
* Creates a new async stub that supports all call types for the service
*/
public static BuilderStub newStub(io.grpc.Channel channel) {
return new BuilderStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static BuilderBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new BuilderBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static BuilderFutureStub newFutureStub(
io.grpc.Channel channel) {
return new BuilderFutureStub(channel);
}
/**
* <pre>
* Interface exported by the server.
* </pre>
*/
public static abstract class BuilderImplBase implements io.grpc.BindableService {
/**
* <pre>
* A server-to-client streaming RPC.
* Obtains the Features available within the given Rectangle. Results are
* streamed rather than returned at once (e.g. in a response message with a
* repeated field), as the rectangle may cover a large area and contain a
* huge number of features.
* </pre>
*/
public void build(cc.arduino.builder.BuildParams request,
io.grpc.stub.StreamObserver<cc.arduino.builder.Response> responseObserver) {
asyncUnimplementedUnaryCall(METHOD_BUILD, responseObserver);
}
/**
*/
public void autocomplete(cc.arduino.builder.BuildParams request,
io.grpc.stub.StreamObserver<cc.arduino.builder.Response> responseObserver) {
asyncUnimplementedUnaryCall(METHOD_AUTOCOMPLETE, responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
METHOD_BUILD,
asyncServerStreamingCall(
new MethodHandlers<
cc.arduino.builder.BuildParams,
cc.arduino.builder.Response>(
this, METHODID_BUILD)))
.addMethod(
METHOD_AUTOCOMPLETE,
asyncUnaryCall(
new MethodHandlers<
cc.arduino.builder.BuildParams,
cc.arduino.builder.Response>(
this, METHODID_AUTOCOMPLETE)))
.build();
}
}
/**
* <pre>
* Interface exported by the server.
* </pre>
*/
public static final class BuilderStub extends io.grpc.stub.AbstractStub<BuilderStub> {
private BuilderStub(io.grpc.Channel channel) {
super(channel);
}
private BuilderStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected BuilderStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new BuilderStub(channel, callOptions);
}
/**
* <pre>
* A server-to-client streaming RPC.
* Obtains the Features available within the given Rectangle. Results are
* streamed rather than returned at once (e.g. in a response message with a
* repeated field), as the rectangle may cover a large area and contain a
* huge number of features.
* </pre>
*/
public void build(cc.arduino.builder.BuildParams request,
io.grpc.stub.StreamObserver<cc.arduino.builder.Response> responseObserver) {
asyncServerStreamingCall(
getChannel().newCall(METHOD_BUILD, getCallOptions()), request, responseObserver);
}
/**
*/
public void autocomplete(cc.arduino.builder.BuildParams request,
io.grpc.stub.StreamObserver<cc.arduino.builder.Response> responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_AUTOCOMPLETE, getCallOptions()), request, responseObserver);
}
}
/**
* <pre>
* Interface exported by the server.
* </pre>
*/
public static final class BuilderBlockingStub extends io.grpc.stub.AbstractStub<BuilderBlockingStub> {
private BuilderBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private BuilderBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected BuilderBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new BuilderBlockingStub(channel, callOptions);
}
/**
* <pre>
* A server-to-client streaming RPC.
* Obtains the Features available within the given Rectangle. Results are
* streamed rather than returned at once (e.g. in a response message with a
* repeated field), as the rectangle may cover a large area and contain a
* huge number of features.
* </pre>
*/
public java.util.Iterator<cc.arduino.builder.Response> build(
cc.arduino.builder.BuildParams request) {
return blockingServerStreamingCall(
getChannel(), METHOD_BUILD, getCallOptions(), request);
}
/**
*/
public cc.arduino.builder.Response autocomplete(cc.arduino.builder.BuildParams request) {
return blockingUnaryCall(
getChannel(), METHOD_AUTOCOMPLETE, getCallOptions(), request);
}
}
/**
* <pre>
* Interface exported by the server.
* </pre>
*/
public static final class BuilderFutureStub extends io.grpc.stub.AbstractStub<BuilderFutureStub> {
private BuilderFutureStub(io.grpc.Channel channel) {
super(channel);
}
private BuilderFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected BuilderFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new BuilderFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<cc.arduino.builder.Response> autocomplete(
cc.arduino.builder.BuildParams request) {
return futureUnaryCall(
getChannel().newCall(METHOD_AUTOCOMPLETE, getCallOptions()), request);
}
}
private static final int METHODID_BUILD = 0;
private static final int METHODID_AUTOCOMPLETE = 1;
private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
private final BuilderImplBase serviceImpl;
private final int methodId;
MethodHandlers(BuilderImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
case METHODID_BUILD:
serviceImpl.build((cc.arduino.builder.BuildParams) request,
(io.grpc.stub.StreamObserver<cc.arduino.builder.Response>) responseObserver);
break;
case METHODID_AUTOCOMPLETE:
serviceImpl.autocomplete((cc.arduino.builder.BuildParams) request,
(io.grpc.stub.StreamObserver<cc.arduino.builder.Response>) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
public io.grpc.stub.StreamObserver<Req> invoke(
io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
private static final class BuilderDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return cc.arduino.builder.BuilderProto.getDescriptor();
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (BuilderGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new BuilderDescriptorSupplier())
.addMethod(METHOD_BUILD)
.addMethod(METHOD_AUTOCOMPLETE)
.build();
}
}
}
return result;
}
}

View File

@ -0,0 +1,78 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: builder.proto
package cc.arduino.builder;
public final class BuilderProto {
private BuilderProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_proto_BuildParams_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_proto_BuildParams_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_proto_Response_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_proto_Response_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\rbuilder.proto\022\005proto\"\307\002\n\013BuildParams\022\027" +
"\n\017hardwareFolders\030\001 \001(\t\022\024\n\014toolsFolders\030" +
"\002 \001(\t\022\037\n\027builtInLibrariesFolders\030\003 \001(\t\022\035" +
"\n\025otherLibrariesFolders\030\004 \001(\t\022\026\n\016sketchL" +
"ocation\030\005 \001(\t\022\014\n\004fQBN\030\006 \001(\t\022\031\n\021arduinoAP" +
"IVersion\030\007 \001(\t\022\035\n\025customBuildProperties\030" +
"\010 \001(\t\022\026\n\016buildCachePath\030\t \001(\t\022\021\n\tbuildPa" +
"th\030\n \001(\t\022\025\n\rwarningsLevel\030\013 \001(\t\022\026\n\016codeC" +
"ompleteAt\030\014 \001(\t\022\017\n\007verbose\030\r \001(\010\"\030\n\010Resp" +
"onse\022\014\n\004line\030\001 \001(\t2r\n\007Builder\0220\n\005Build\022\022",
".proto.BuildParams\032\017.proto.Response\"\0000\001\022" +
"5\n\014Autocomplete\022\022.proto.BuildParams\032\017.pr" +
"oto.Response\"\000B$\n\022cc.arduino.builderB\014Bu" +
"ilderProtoP\001b\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
internal_static_proto_BuildParams_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_proto_BuildParams_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_proto_BuildParams_descriptor,
new java.lang.String[] { "HardwareFolders", "ToolsFolders", "BuiltInLibrariesFolders", "OtherLibrariesFolders", "SketchLocation", "FQBN", "ArduinoAPIVersion", "CustomBuildProperties", "BuildCachePath", "BuildPath", "WarningsLevel", "CodeCompleteAt", "Verbose", });
internal_static_proto_Response_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_proto_Response_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_proto_Response_descriptor,
new java.lang.String[] { "Line", });
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,494 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: builder.proto
package cc.arduino.builder;
/**
* Protobuf type {@code proto.Response}
*/
public final class Response extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.Response)
ResponseOrBuilder {
// Use Response.newBuilder() to construct.
private Response(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private Response() {
line_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Response(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
line_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return cc.arduino.builder.BuilderProto.internal_static_proto_Response_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return cc.arduino.builder.BuilderProto.internal_static_proto_Response_fieldAccessorTable
.ensureFieldAccessorsInitialized(
cc.arduino.builder.Response.class, cc.arduino.builder.Response.Builder.class);
}
public static final int LINE_FIELD_NUMBER = 1;
private volatile java.lang.Object line_;
/**
* <code>optional string line = 1;</code>
*/
public java.lang.String getLine() {
java.lang.Object ref = line_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
line_ = s;
return s;
}
}
/**
* <code>optional string line = 1;</code>
*/
public com.google.protobuf.ByteString
getLineBytes() {
java.lang.Object ref = line_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
line_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getLineBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, line_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getLineBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, line_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof cc.arduino.builder.Response)) {
return super.equals(obj);
}
cc.arduino.builder.Response other = (cc.arduino.builder.Response) obj;
boolean result = true;
result = result && getLine()
.equals(other.getLine());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + LINE_FIELD_NUMBER;
hash = (53 * hash) + getLine().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static cc.arduino.builder.Response parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static cc.arduino.builder.Response parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static cc.arduino.builder.Response parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static cc.arduino.builder.Response parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static cc.arduino.builder.Response parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static cc.arduino.builder.Response parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static cc.arduino.builder.Response parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static cc.arduino.builder.Response parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static cc.arduino.builder.Response parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static cc.arduino.builder.Response parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(cc.arduino.builder.Response prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code proto.Response}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:proto.Response)
cc.arduino.builder.ResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return cc.arduino.builder.BuilderProto.internal_static_proto_Response_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return cc.arduino.builder.BuilderProto.internal_static_proto_Response_fieldAccessorTable
.ensureFieldAccessorsInitialized(
cc.arduino.builder.Response.class, cc.arduino.builder.Response.Builder.class);
}
// Construct using cc.arduino.builder.Response.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
line_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return cc.arduino.builder.BuilderProto.internal_static_proto_Response_descriptor;
}
public cc.arduino.builder.Response getDefaultInstanceForType() {
return cc.arduino.builder.Response.getDefaultInstance();
}
public cc.arduino.builder.Response build() {
cc.arduino.builder.Response result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public cc.arduino.builder.Response buildPartial() {
cc.arduino.builder.Response result = new cc.arduino.builder.Response(this);
result.line_ = line_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof cc.arduino.builder.Response) {
return mergeFrom((cc.arduino.builder.Response)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(cc.arduino.builder.Response other) {
if (other == cc.arduino.builder.Response.getDefaultInstance()) return this;
if (!other.getLine().isEmpty()) {
line_ = other.line_;
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
cc.arduino.builder.Response parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (cc.arduino.builder.Response) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object line_ = "";
/**
* <code>optional string line = 1;</code>
*/
public java.lang.String getLine() {
java.lang.Object ref = line_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
line_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string line = 1;</code>
*/
public com.google.protobuf.ByteString
getLineBytes() {
java.lang.Object ref = line_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
line_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string line = 1;</code>
*/
public Builder setLine(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
line_ = value;
onChanged();
return this;
}
/**
* <code>optional string line = 1;</code>
*/
public Builder clearLine() {
line_ = getDefaultInstance().getLine();
onChanged();
return this;
}
/**
* <code>optional string line = 1;</code>
*/
public Builder setLineBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
line_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:proto.Response)
}
// @@protoc_insertion_point(class_scope:proto.Response)
private static final cc.arduino.builder.Response DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new cc.arduino.builder.Response();
}
public static cc.arduino.builder.Response getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Response>
PARSER = new com.google.protobuf.AbstractParser<Response>() {
public Response parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Response(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<Response> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Response> getParserForType() {
return PARSER;
}
public cc.arduino.builder.Response getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,19 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: builder.proto
package cc.arduino.builder;
public interface ResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:proto.Response)
com.google.protobuf.MessageOrBuilder {
/**
* <code>optional string line = 1;</code>
*/
java.lang.String getLine();
/**
* <code>optional string line = 1;</code>
*/
com.google.protobuf.ByteString
getLineBytes();
}