use of org.eclipse.xtext.tasks.ITaskFinder in project statecharts by Yakindu.
the class DomainSpecificTaskFinder method findTasks.
@Override
public List<Task> findTasks(Resource resource) {
if (resource instanceof AbstractSCTResource) {
IDomain domain = DomainRegistry.getDomain((EObject) EcoreUtil2.getObjectByType(resource.getContents(), SGraphPackage.Literals.STATECHART));
ITaskFinder taskFinder = domain.getInjector(IDomain.FEATURE_RESOURCE).getInstance(ITaskFinder.class);
if (taskFinder != null)
return taskFinder.findTasks(resource);
}
return Collections.emptyList();
}
Aggregations