geeksville / arduleader

An android ground controller (and other things) for Mavlink/Arduplane
Other
143 stars 92 forks source link

webapi.proto generates Java or Scala code? #175

Closed GildedHonour closed 9 years ago

GildedHonour commented 9 years ago

Why is in this code being used Scala syntax (Envelope is being used as a Scala class-object):

override def stopMission(keep: Boolean) {
    send(Envelope(stopMission = Some(StopMissionMsg(keep = keep))))
  }

whereas the code, generated by webapi.proto is the Java code? How do I make it generate the Scala code instead?

public static final class Envelope extends
      com.google.protobuf.GeneratedMessage
      implements EnvelopeOrBuilder {
    // Use Envelope.newBuilder() to construct.
    private Envelope(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private Envelope(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

//........

Because of this, my project doesn't compile.