Package com.google.eclipse.protobuf.protobuf

Examples of com.google.eclipse.protobuf.protobuf.Rpc


  //
  // service PersonService {
  //   rpc PersonRpc (Person) returns (Type);
  // }
  @Test public void should_return_label_for_rpc() {
    Rpc rpc = xtext.findFirst(Rpc.class);
    Object label = labels.labelFor(rpc);
    assertThat(label, instanceOf(StyledString.class));
    StyledString labelText = (StyledString) label;
    assertThat(labelText.getString(), equalTo("PersonRpc : Person > Type"));
  }
View Full Code Here


  //
  // service PersonService {
  //   rpc PersonRpc (Person) returns (Type);
  // }
  @Test public void should_return_label_for_rpc_with_unresolved_argument_type() {
    Rpc rpc = xtext.findFirst(Rpc.class);
    Object label = labels.labelFor(rpc);
    assertThat(label, instanceOf(StyledString.class));
    StyledString labelText = (StyledString) label;
    assertThat(labelText.getString(), equalTo("PersonRpc : <unresolved> > Type"));
  }
View Full Code Here

  @Override public void completeMessageLink_Target(EObject model, Assignment assignment, ContentAssistContext context,
      ICompletionProposalAcceptor acceptor) {
    Collection<IEObjectDescription> scope = emptySet();
    if (model instanceof Rpc) {
      Rpc rpc = (Rpc) model;
      scope = scopeProvider().potentialMessagesFor(rpc);
    }
    if (model instanceof Stream) {
      Stream stream = (Stream) model;
      scope = scopeProvider().potentialMessagesFor(stream);
View Full Code Here

  //
  // service CallServer {
  //   rpc QuickCall (Input) returns (Output);
  // }
  @Test public void should_return_name_of_Rpc() {
    Rpc rpc = xtext.find("QuickCall", Rpc.class);
    String name = resolver.nameOf(rpc);
    assertThat(name, equalTo("QuickCall"));
  }
View Full Code Here

  //
  // service PersonService {
  //   rpc PersonRpc (Person) returns (Type);
  // }
  @Test public void should_return_label_for_rpc_with_unresolved_return_type() {
    Rpc rpc = xtext.findFirst(Rpc.class);
    Object label = labels.labelFor(rpc);
    assertThat(label, instanceOf(StyledString.class));
    StyledString labelText = (StyledString) label;
    assertThat(labelText.getString(), equalTo("PersonRpc : Person > <unresolved>"));
  }
View Full Code Here

  //
  // service PersonService {
  //   rpc PersonRpc (Person) returns (Person);
  // }
  @Test public void should_return_image_for_rpc() {
    Rpc rpc = xtext.findFirst(Rpc.class);
    String image = images.imageFor(rpc);
    assertThat(image, equalTo("rpc.gif"));
    assertThat(image, existsInProject());
  }
View Full Code Here

    if (o instanceof MessageField) {
      MessageField field = (MessageField) o;
      return labelFor(field);
    }
    if (o instanceof Rpc) {
      Rpc rpc = (Rpc) o;
      return labelFor(rpc);
    }
    if (o instanceof Stream) {
      Stream stream = (Stream) o;
      return labelFor(stream);
View Full Code Here

TOP

Related Classes of com.google.eclipse.protobuf.protobuf.Rpc

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