use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug440951Test method test_01.
@Test
public void test_01() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("class C {");
_builder.newLine();
_builder.append("\t");
_builder.append("def void m() throws AsEr<|> {");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalAtCursor("AssertionError");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug440951Test method test_02.
@Test
public void test_02() throws Exception {
ContentAssistProcessorTestBuilder _withDirtyState = this.newBuilder().withDirtyState();
StringConcatenation _builder = new StringConcatenation();
_builder.append("class C {");
_builder.newLine();
_builder.append("\t");
_builder.append("def void m() throws MDT<|> {");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("class MyDirtyThrowable extends Throwable {}");
_builder.newLine();
_withDirtyState.append(_builder.toString()).assertProposalAtCursor("MyDirtyThrowable");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug440951Test 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("def void m() throws RetentPoli<|> {");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalAtCursor("java.lang.annotation.RetentionPolicy");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug443025Test method test_02.
@Test
public void test_02() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("import java.util.List");
_builder.newLine();
_builder.append("import <|>");
_builder.newLine();
_builder.newLine();
_builder.append("class C {}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalAtCursor("java.util.ArrayList");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug448017Test method test_02a.
@Test
public void test_02a() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("class MyBean {");
_builder.newLine();
_builder.append("\t");
_builder.append("String myField2");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("def String getMyField2() {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("return myField");
_builder.newLine();
_builder.append("\t");
_builder.append("}\t");
_builder.newLine();
_builder.append("\t");
_builder.append("def void m() {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("this.<|>");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalDisplayedAtCursor("myField2 : String - MyBean");
}
Aggregations