本文整理汇总了Java中org.eclipse.xtext.tasks.ITaskFinder类的典型用法代码示例。如果您正苦于以下问题:Java ITaskFinder类的具体用法?Java ITaskFinder怎么用?Java ITaskFinder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ITaskFinder类属于org.eclipse.xtext.tasks包,在下文中一共展示了ITaskFinder类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configure
import org.eclipse.xtext.tasks.ITaskFinder; //导入依赖的package包/类
@Override
public void configure(Binder binder) {
binder.bind(IResourceValidator.class).to(SCTResourceValidatorImpl.class);
binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("sct");
binder.bind(IEncodingProvider.class).to(IEncodingProvider.Runtime.class);
binder.bind(IQualifiedNameProvider.class).to(StextNameProvider.class);
binder.bind(org.eclipse.jface.viewers.ILabelProvider.class)
.annotatedWith(org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider.class)
.to(DefaultDescriptionLabelProvider.class);
binder.bind(IDefaultResourceDescriptionStrategy.class).to(SCTResourceDescriptionStrategy.class);
binder.bind(MarkerCreator.class).to(SCTMarkerCreator.class);
binder.bind(MarkerTypeProvider.class).to(SCTMarkerTypeProvider.class);
binder.bind(IDiagnosticConverter.class).to(SCTDiagnosticConverterImpl.class);
binder.bind(IURIEditorOpener.class).annotatedWith(LanguageSpecific.class).to(SCTFileEditorOpener.class);
binder.bind(IMarkerContributor.class).to(TaskMarkerContributor.class);
binder.bind(ITaskFinder.class).to(DomainSpecificTaskFinder.class);
binder.bind(TaskMarkerCreator.class).to(SCTTaskMarkerCreator.class);
binder.bind(TaskMarkerTypeProvider.class).to(SCTTaskMarkerTypeProvider.class);
}
示例2: findTasks
import org.eclipse.xtext.tasks.ITaskFinder; //导入依赖的package包/类
@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();
}
示例3: bindITaskFinder
import org.eclipse.xtext.tasks.ITaskFinder; //导入依赖的package包/类
public Class<? extends ITaskFinder> bindITaskFinder() {
return STextTaskFinder.class;
}