use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug437678Test method test_05.
@Flaky
@Test
public void test_05() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("class A {");
_builder.newLine();
_builder.append("\t");
_builder.append("def methodA() {}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("class B {");
_builder.newLine();
_builder.append("\t");
_builder.append("def methodB() {}");
_builder.newLine();
_builder.append("\t");
_builder.append("def void myInstance(Object o) {}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("class C {");
_builder.newLine();
_builder.append("\t");
_builder.append("static extension B b");
_builder.newLine();
_builder.append("\t");
_builder.append("static String string");
_builder.newLine();
_builder.append("\t");
_builder.append("def static void main(A a) {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("a.method|");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertTextAtCursorPosition("ethod|", "methodA", "main", "myInstance");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug437678Test method test_02.
@Test
public void test_02() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("class A {");
_builder.newLine();
_builder.append("\t");
_builder.append("def methodA() {}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("class B {");
_builder.newLine();
_builder.append("\t");
_builder.append("def methodB() {}");
_builder.newLine();
_builder.append("\t");
_builder.append("def void myInstance(Object o) {}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("class C {");
_builder.newLine();
_builder.append("\t");
_builder.append("extension B b");
_builder.newLine();
_builder.append("\t");
_builder.append("static String string");
_builder.newLine();
_builder.append("\t");
_builder.append("def static void main(A it) {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("method|");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertTextAtCursorPosition("ethod|", "methodA", "main");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug439019Test method test_03.
@Test
public void test_03() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("class C {");
_builder.newLine();
_builder.append("\t");
_builder.append("@A(#[NA<|>])");
_builder.newLine();
_builder.append("\t");
_builder.append("String s3");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("annotation A {");
_builder.newLine();
_builder.append("\t");
_builder.append("E[] value");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("enum E {");
_builder.newLine();
_builder.append("\t");
_builder.append("NAME");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalAtCursor("NAME");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug439019Test method testBug463053_01.
@Test
public void testBug463053_01() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("class C {");
_builder.newLine();
_builder.append("\t");
_builder.append("@A(<|>)");
_builder.newLine();
_builder.append("\t");
_builder.append("String s1");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("annotation A {");
_builder.newLine();
_builder.append("\t");
_builder.append("E[] value");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("enum E {");
_builder.newLine();
_builder.append("\t");
_builder.append("NAME");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalAtCursor("NAME");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug439019Test method test_04.
@Test
public void test_04() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("class C {");
_builder.newLine();
_builder.append("\t");
_builder.append("@A(value=NA<|>)");
_builder.newLine();
_builder.append("\t");
_builder.append("String s4");
_builder.newLine();
_builder.append("\t");
_builder.append("@A(value=#[NAME])");
_builder.newLine();
_builder.append("\t");
_builder.append("String s5");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("annotation A {");
_builder.newLine();
_builder.append("\t");
_builder.append("E[] value");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("enum E {");
_builder.newLine();
_builder.append("\t");
_builder.append("NAME");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalAtCursor("NAME");
}
Aggregations