Search in sources :

Example 1 with DefaultTaskFinder

use of org.eclipse.xtext.tasks.DefaultTaskFinder in project xtext-core by eclipse.

the class DefaultTaskFinderTest method testSpecialEndTag.

@Test
public void testSpecialEndTag() {
    try {
        this.with(DefaultTaskFinderTest.NoJdtTestLanguageStandaloneSetupCustom.class);
        this.finder = this.<DefaultTaskFinder>get(DefaultTaskFinder.class);
        StringConcatenation _builder = new StringConcatenation();
        _builder.append("/* TODO Get rid of this ***/");
        _builder.newLine();
        _builder.append("Hello notATODO!");
        _builder.newLine();
        Task _task = new Task();
        final Procedure1<Task> _function = (Task it) -> {
            TaskTag _taskTag = new TaskTag();
            final Procedure1<TaskTag> _function_1 = (TaskTag it_1) -> {
                it_1.setName("TODO");
                it_1.setPriority(Priority.NORMAL);
            };
            TaskTag _doubleArrow = ObjectExtensions.<TaskTag>operator_doubleArrow(_taskTag, _function_1);
            it.setTag(_doubleArrow);
            it.setDescription(" Get rid of this ");
            it.setOffset(3);
            it.setLineNumber(1);
        };
        Task _doubleArrow = ObjectExtensions.<Task>operator_doubleArrow(_task, _function);
        this.assertContainsTasks(this.getResourceFromString(LineDelimiters.toUnix(_builder.toString())), Collections.<Task>unmodifiableList(CollectionLiterals.<Task>newArrayList(_doubleArrow)));
    } catch (Throwable _e) {
        throw Exceptions.sneakyThrow(_e);
    }
}
Also used : DefaultTaskFinder(org.eclipse.xtext.tasks.DefaultTaskFinder) Task(org.eclipse.xtext.tasks.Task) TaskTag(org.eclipse.xtext.tasks.TaskTag) Procedure1(org.eclipse.xtext.xbase.lib.Procedures.Procedure1) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) Test(org.junit.Test)

Aggregations

StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)1 DefaultTaskFinder (org.eclipse.xtext.tasks.DefaultTaskFinder)1 Task (org.eclipse.xtext.tasks.Task)1 TaskTag (org.eclipse.xtext.tasks.TaskTag)1 Procedure1 (org.eclipse.xtext.xbase.lib.Procedures.Procedure1)1 Test (org.junit.Test)1