Search in sources :

Example 46 with ContentAssistProcessorTestBuilder

use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.

the class Bug436564Test method test_05.

@Test
public void test_05() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("val o = new Object() {");
    _builder.newLine();
    _builder.append("  \t");
    _builder.append("String s");
    _builder.newLine();
    _builder.append("  \t");
    _builder.append("<|>");
    _builder.newLine();
    _builder.append("  \t");
    _builder.append("String s2");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("}");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("override toString() {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _newBuilder.append(_builder.toString()).assertProposalDisplayedAtCursor("toString() - Override method from Object");
}
Also used : ContentAssistProcessorTestBuilder(org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) AbstractXtendContentAssistBugTest(org.eclipse.xtend.ide.tests.contentassist.AbstractXtendContentAssistBugTest) Test(org.junit.Test)

Example 47 with ContentAssistProcessorTestBuilder

use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.

the class Bug436564Test 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("  ");
    _builder.append("val o = new Object() {");
    _builder.newLine();
    _builder.append("  \t");
    _builder.append("String s");
    _builder.newLine();
    _builder.append("  \t");
    _builder.append("toS<|>");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("}");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("override toString() {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _newBuilder.append(_builder.toString()).assertProposalDisplayedAtCursor("toString() - Override method from Object");
}
Also used : ContentAssistProcessorTestBuilder(org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) AbstractXtendContentAssistBugTest(org.eclipse.xtend.ide.tests.contentassist.AbstractXtendContentAssistBugTest) Test(org.junit.Test)

Example 48 with ContentAssistProcessorTestBuilder

use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.

the class Bug436564Test method test_20.

@Test
public void test_20() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("static class C2 {");
    _builder.newLine();
    _builder.append("  \t");
    _builder.append("def s() {}");
    _builder.newLine();
    _builder.append("  \t");
    _builder.append("toS<|>");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("}");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("override toString() {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _newBuilder.append(_builder.toString()).assertProposalDisplayedAtCursor("toString() - Override method from Object");
}
Also used : ContentAssistProcessorTestBuilder(org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) AbstractXtendContentAssistBugTest(org.eclipse.xtend.ide.tests.contentassist.AbstractXtendContentAssistBugTest) Test(org.junit.Test)

Example 49 with ContentAssistProcessorTestBuilder

use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.

the class Bug436564Test method test_24.

@Test
public void test_24() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("val o = new Object() {");
    _builder.newLine();
    _builder.append("  \t");
    _builder.append("val s = new Object () {");
    _builder.newLine();
    _builder.append("  \t\t");
    _builder.append("override toString() {}");
    _builder.newLine();
    _builder.append("  \t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("  \t");
    _builder.append("toS<|>");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("}");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("override toString() {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _newBuilder.append(_builder.toString()).assertProposalDisplayedAtCursor("toString() - Override method from Object");
}
Also used : ContentAssistProcessorTestBuilder(org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) AbstractXtendContentAssistBugTest(org.eclipse.xtend.ide.tests.contentassist.AbstractXtendContentAssistBugTest) Test(org.junit.Test)

Example 50 with ContentAssistProcessorTestBuilder

use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.

the class Bug436564Test method test_19.

@Test
public void test_19() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("static class C2 {");
    _builder.newLine();
    _builder.append("  \t");
    _builder.append("def s() {}");
    _builder.newLine();
    _builder.append("  \t");
    _builder.append("<|>");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("}");
    _builder.newLine();
    _builder.append("  ");
    _builder.append("override toString() {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _newBuilder.append(_builder.toString()).assertProposalDisplayedAtCursor("toString() - Override method from Object");
}
Also used : ContentAssistProcessorTestBuilder(org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) AbstractXtendContentAssistBugTest(org.eclipse.xtend.ide.tests.contentassist.AbstractXtendContentAssistBugTest) Test(org.junit.Test)

Aggregations

ContentAssistProcessorTestBuilder (org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder)185 Test (org.junit.Test)184 AbstractXtendContentAssistBugTest (org.eclipse.xtend.ide.tests.contentassist.AbstractXtendContentAssistBugTest)183 StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)182 Flaky (org.eclipse.xtext.testing.Flaky)13 ICompletionProposal (org.eclipse.jface.text.contentassist.ICompletionProposal)4 List (java.util.List)1