Search in sources :

Example 16 with Element

use of org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element in project xtext-core by eclipse.

the class Bug317840Test method testNodeModel_06.

@Test
public void testNodeModel_06() throws Exception {
    Element element = getFirstElement("element a.a");
    INode node = NodeModelUtils.getNode(element);
    assertEquals("element a.a", node.getText());
    assertEquals("[(element)[[( )(a)(.)(a)]]]", toDebugString(node));
}
Also used : INode(org.eclipse.xtext.nodemodel.INode) Element(org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element) Test(org.junit.Test)

Example 17 with Element

use of org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element in project xtext-core by eclipse.

the class Bug317840Test method testNodeModel_02.

@Test
public void testNodeModel_02() throws Exception {
    Element element = getFirstElement("element a b");
    INode node = NodeModelUtils.getNode(element);
    assertEquals("element a b", node.getText());
    assertEquals("[(element)[[( )(a)]][[( )(b)]]]", toDebugString(node));
}
Also used : INode(org.eclipse.xtext.nodemodel.INode) Element(org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element) Test(org.junit.Test)

Example 18 with Element

use of org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element in project xtext-core by eclipse.

the class Bug317840Test method testNodeModel_04.

@Test
public void testNodeModel_04() throws Exception {
    Element element = getFirstElement("element a b c d");
    INode node = NodeModelUtils.getNode(element);
    assertEquals("element a b c d", node.getText());
    assertEquals("[(element)[[( )(a)]][[( )(b)]][[( )(c)]][[( )(d)]]]", toDebugString(node));
}
Also used : INode(org.eclipse.xtext.nodemodel.INode) Element(org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element) Test(org.junit.Test)

Example 19 with Element

use of org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element in project xtext-core by eclipse.

the class Bug317840Test method testNodeModel_03.

@Test
public void testNodeModel_03() throws Exception {
    Element element = getFirstElement("element a b c");
    INode node = NodeModelUtils.getNode(element);
    assertEquals("element a b c", node.getText());
    assertEquals("[(element)[[( )(a)]][[( )(b)]][[( )(c)]]]", toDebugString(node));
}
Also used : INode(org.eclipse.xtext.nodemodel.INode) Element(org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element) Test(org.junit.Test)

Example 20 with Element

use of org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element in project xtext-core by eclipse.

the class Bug317840Test method testNodeModel_01.

@Test
public void testNodeModel_01() throws Exception {
    Element element = getFirstElement("element a");
    INode node = NodeModelUtils.getNode(element);
    assertEquals("element a", node.getText());
    assertEquals("[(element)[[( )(a)]]]", toDebugString(node));
}
Also used : INode(org.eclipse.xtext.nodemodel.INode) Element(org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element) Test(org.junit.Test)

Aggregations

Element (org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element)22 Test (org.junit.Test)20 INode (org.eclipse.xtext.nodemodel.INode)10 Model (org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Model)2 EPackage (org.eclipse.emf.ecore.EPackage)1 Action (org.eclipse.xtext.Action)1 Parameter (org.eclipse.xtext.Parameter)1 ParserRule (org.eclipse.xtext.ParserRule)1 Named (org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Named)1