Search in sources :

Example 61 with ContentAssistProcessorTestBuilder

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

the class Bug439019Test method testBug463053_06.

@Test
public void testBug463053_06() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("@A(<|>NAME)");
    _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");
}
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 62 with ContentAssistProcessorTestBuilder

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

the class Bug439019Test method testBug463053_05.

@Test
public void testBug463053_05() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class C {");
    _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");
}
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 63 with ContentAssistProcessorTestBuilder

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

the class Bug439019Test method testBug463053_04.

@Test
public void testBug463053_04() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("@A(value=<|>)");
    _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");
}
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 64 with ContentAssistProcessorTestBuilder

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

the class Bug439019Test method testBug463053_02.

@Test
public void testBug463053_02() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("@A(NAME, <|>)");
    _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");
}
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 65 with ContentAssistProcessorTestBuilder

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

the class Bug439019Test method testBug463053_07.

@Test
public void testBug463053_07() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("@A(NAME, <|>NAME)");
    _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");
}
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