use of org.eclipse.xtext.tasks.TaskTags in project xtext-core by eclipse.
the class DefaultTaskTagProvider method getTaskTags.
@Override
public TaskTags getTaskTags(final Resource resouce) {
TaskTags _taskTags = new TaskTags();
final Procedure1<TaskTags> _function = (TaskTags it) -> {
it.setCaseSensitive(true);
List<TaskTag> _taskTags_1 = it.getTaskTags();
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);
TaskTag _taskTag_1 = 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_1, _function_2);
TaskTag _taskTag_2 = new TaskTag();
final Procedure1<TaskTag> _function_3 = (TaskTag it_1) -> {
it_1.setName("XXX");
it_1.setPriority(Priority.NORMAL);
};
TaskTag _doubleArrow_2 = ObjectExtensions.<TaskTag>operator_doubleArrow(_taskTag_2, _function_3);
Iterables.<TaskTag>addAll(_taskTags_1, Collections.<TaskTag>unmodifiableList(CollectionLiterals.<TaskTag>newArrayList(_doubleArrow, _doubleArrow_1, _doubleArrow_2)));
};
return ObjectExtensions.<TaskTags>operator_doubleArrow(_taskTags, _function);
}
use of org.eclipse.xtext.tasks.TaskTags in project statecharts by Yakindu.
the class STextTaskFinder method findTasks.
public List<Task> findTasks(StextResource resource) {
TaskTags taskTags = taskTagProvider.getTaskTags(resource);
List<Task> result = Lists.newArrayList();
TreeIterator<EObject> allContents = resource.getAllContents();
while (allContents.hasNext()) {
EObject eObject = (EObject) allContents.next();
if (eObject instanceof SpecificationElement) {
List<Task> parseTasks = parseTasks(eObject, SGraphPackage.Literals.SPECIFICATION_ELEMENT__SPECIFICATION, taskTags);
result.addAll(parseTasks);
}
if (eObject instanceof DocumentedElement) {
result.addAll(parseTasks(eObject, BasePackage.Literals.DOCUMENTED_ELEMENT__DOCUMENTATION, taskTags));
}
}
return result;
}
use of org.eclipse.xtext.tasks.TaskTags in project xtext-xtend by eclipse.
the class XtendTaskTagProvider method getTaskTags.
@Override
public TaskTags getTaskTags(final Resource resource) {
TaskTags _xblockexpression = null;
{
final IPreferenceValues prefs = this.preferenceValuesProvider.getPreferenceValues(resource);
PreferenceKey _preferenceKey = new PreferenceKey(JavaCore.COMPILER_TASK_TAGS, "TODO,FIXME,XXX");
final String namePref = prefs.getPreference(_preferenceKey);
PreferenceKey _preferenceKey_1 = new PreferenceKey(JavaCore.COMPILER_TASK_PRIORITIES, "NORMAL,HIGH,NORMAL");
final String prioritiesPref = prefs.getPreference(_preferenceKey_1);
PreferenceKey _preferenceKey_2 = new PreferenceKey(JavaCore.COMPILER_TASK_CASE_SENSITIVE, JavaCore.ENABLED);
final String caseSensitivePref = prefs.getPreference(_preferenceKey_2);
final List<TaskTag> tags = PreferenceTaskTagProvider.parseTags(namePref, prioritiesPref);
TaskTags _taskTags = new TaskTags();
final Procedure1<TaskTags> _function = (TaskTags it) -> {
List<TaskTag> _taskTags_1 = it.getTaskTags();
Iterables.<TaskTag>addAll(_taskTags_1, tags);
it.setCaseSensitive(caseSensitivePref.equals(JavaCore.ENABLED));
};
_xblockexpression = ObjectExtensions.<TaskTags>operator_doubleArrow(_taskTags, _function);
}
return _xblockexpression;
}
Aggregations