Examples of ILeafNode


Examples of org.eclipse.xtext.nodemodel.ILeafNode

  @Before public void setUp() {
    nodes = new INodes();
  }

  @Test public void should_return_true_if_given_node_is_an_ILeafNode_and_is_hidden() {
    ILeafNode node = mock(ILeafNode.class);
    when(node.isHidden()).thenReturn(true);
    assertTrue(nodes.isHiddenLeafNode(node));
  }
View Full Code Here

Examples of org.eclipse.xtext.nodemodel.ILeafNode

    when(node.isHidden()).thenReturn(true);
    assertTrue(nodes.isHiddenLeafNode(node));
  }

  @Test public void should_return_false_if_given_node_is_an_ILeafNode_but_is_not_hidden() {
    ILeafNode node = mock(ILeafNode.class);
    when(node.isHidden()).thenReturn(false);
    assertFalse(nodes.isHiddenLeafNode(node));
  }
View Full Code Here

Examples of org.eclipse.xtext.nodemodel.ILeafNode

  // syntax = "proto2";
  //
  // // This is a test.
  // message Person {}
  @Test public void should_return_true_if_node_belongs_to_single_line_comment() {
    ILeafNode commentNode = xtext.findNode("// This is a test.");
    assertTrue(nodes.isComment(commentNode));
  }
View Full Code Here

Examples of org.eclipse.xtext.nodemodel.ILeafNode

  // syntax = "proto2";
  //
  // /* This is a test. */
  // message Person {}
  @Test public void should_return_true_if_node_belongs_to_multiple_line_comment() {
    ILeafNode commentNode = xtext.findNode("/* This is a test. */");
    assertTrue(nodes.isComment(commentNode));
  }
View Full Code Here

Examples of org.eclipse.xtext.nodemodel.ILeafNode

  // syntax = "proto2";
  //
  // // This is a test.
  // message Person {}
  @Test public void should_return_true_if_node_belongs_to_single_line_comment() {
    ILeafNode commentNode = xtext.findNode("// This is a test.");
    assertTrue(nodes.isCommentOrString(commentNode));
  }
View Full Code Here

Examples of org.eclipse.xtext.nodemodel.ILeafNode

  // syntax = "proto2";
  //
  // /* This is a test. */
  // message Person {}
  @Test public void should_return_true_if_node_belongs_to_multiple_line_comment() {
    ILeafNode commentNode = xtext.findNode("/* This is a test. */");
    assertTrue(nodes.isCommentOrString(commentNode));
  }
View Full Code Here

Examples of org.eclipse.xtext.nodemodel.ILeafNode

  //
  // message Person {
  //   optional string name = 1 [default = 'Alex'];
  // }
  @Test public void should_return_true_if_node_belongs_to_string() {
    ILeafNode node = xtext.findNode("'Alex'");
    assertTrue(nodes.isCommentOrString(node));
  }
View Full Code Here

Examples of org.eclipse.xtext.nodemodel.ILeafNode

  // syntax = "proto2";
  //
  // // This is a test.
  // message Person {}
  @Test public void should_return_true_if_node_belongs_to_single_line_comment() {
    ILeafNode commentNode = xtext.findNode("// This is a test.");
    assertTrue(nodes.isSingleLineComment(commentNode));
  }
View Full Code Here

Examples of org.eclipse.xtext.nodemodel.ILeafNode

  // syntax = "proto2";
  //
  // /* This is a test. */
  // message Person {}
  @Test public void should_return_true_if_node_belongs_to_multiple_line_comment() {
    ILeafNode commentNode = xtext.findNode("/* This is a test. */");
    assertTrue(nodes.isMultipleLineComment(commentNode));
  }
View Full Code Here

Examples of org.eclipse.xtext.nodemodel.ILeafNode

  //
  // message Person {
  //   optional string name = 1 [default = 'Alex'];
  // }
  @Test public void should_return_true_if_node_belongs_to_string() {
    ILeafNode node = xtext.findNode("'Alex'");
    assertTrue(nodes.isString(node));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.