use of org.eclipse.xtext.tasks.TaskTag in project xtext-core by eclipse.
the class DefaultTaskParserTest method testCaseInSensitive.
@Test
public void testCaseInSensitive() {
this.definitions.setCaseSensitive(false);
StringConcatenation _builder = new StringConcatenation();
_builder.append("/*");
_builder.newLine();
_builder.append(" ");
_builder.append("* FixMe case insensitve match");
_builder.newLine();
_builder.append(" ");
_builder.append("*/");
_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("FIXME");
it_1.setPriority(Priority.HIGH);
};
TaskTag _doubleArrow = ObjectExtensions.<TaskTag>operator_doubleArrow(_taskTag, _function_1);
it.setTag(_doubleArrow);
it.setDescription(" case insensitve match");
it.setLineNumber(2);
it.setOffset(6);
};
Task _doubleArrow = ObjectExtensions.<Task>operator_doubleArrow(_task, _function);
this.assertContainsTasks(_builder, Collections.<Task>unmodifiableList(CollectionLiterals.<Task>newArrayList(_doubleArrow)));
}
use of org.eclipse.xtext.tasks.TaskTag in project xtext-xtend by eclipse.
the class XtendTaskFinderTest method test.
@Test
public void test() {
try {
StringConcatenation _builder = new StringConcatenation();
_builder.append("package foo");
_builder.newLine();
_builder.newLine();
_builder.append("class Foo {");
_builder.newLine();
_builder.append("\t");
_builder.append("def foo() {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\'\'\'", "\t\t");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("�", "\t\t");
_builder.append("�", "\t\t");
_builder.append("�", "\t\t");
_builder.append(" TODO this is a todo");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("TODO this is not a todo");
_builder.newLine();
_builder.append("\t\t");
_builder.append("�", "\t\t");
_builder.append("�", "\t\t");
_builder.append("�", "\t\t");
_builder.append(" FIXME this is a fixme");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("\'\'\'", "\t\t");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
final String contents = Strings.toUnixLineSeparator(_builder.toString());
final XtendFile file = this.file(contents);
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(" this is a todo");
it.setOffset(50);
it.setLineNumber(6);
};
Task _doubleArrow = ObjectExtensions.<Task>operator_doubleArrow(_task, _function);
Task _task_1 = new Task();
final Procedure1<Task> _function_1 = (Task it) -> {
TaskTag _taskTag = new TaskTag();
final Procedure1<TaskTag> _function_2 = (TaskTag it_1) -> {
it_1.setName("FIXME");
it_1.setPriority(Priority.HIGH);
};
TaskTag _doubleArrow_1 = ObjectExtensions.<TaskTag>operator_doubleArrow(_taskTag, _function_2);
it.setTag(_doubleArrow_1);
it.setDescription(" this is a fixme");
it.setOffset(102);
it.setLineNumber(8);
};
Task _doubleArrow_1 = ObjectExtensions.<Task>operator_doubleArrow(_task_1, _function_1);
this.assertContainsTasks(file.eResource(), Collections.<Task>unmodifiableList(CollectionLiterals.<Task>newArrayList(_doubleArrow, _doubleArrow_1)));
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
use of org.eclipse.xtext.tasks.TaskTag in project xtext-eclipse by eclipse.
the class TaskTagInputDialog method getResult.
public TaskTag getResult() {
TaskTag task = new TaskTag();
task.setName(nameField.getText().trim());
switch(priorityField.getSelectionIndex()) {
case 0:
task.setPriority(Priority.HIGH);
break;
case 1:
task.setPriority(Priority.NORMAL);
break;
default:
task.setPriority(Priority.LOW);
break;
}
return task;
}
Aggregations