本文整理汇总了Java中org.eclipse.xtext.linking.ILinker类的典型用法代码示例。如果您正苦于以下问题:Java ILinker类的具体用法?Java ILinker怎么用?Java ILinker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ILinker类属于org.eclipse.xtext.linking包,在下文中一共展示了ILinker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: internalCreateInjector
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
@Override
protected Injector internalCreateInjector() {
return new FragmentTestLanguageStandaloneSetup() {
@Override
public Injector createInjector() {
return Guice.createInjector(new FragmentTestLanguageRuntimeModule() {
@Override
public Class<? extends XtextResource> bindXtextResource() {
return XtextResource.class;
}
@Override
public Class<? extends ILinker> bindILinker() {
return Linker.class;
}
});
}
}.createInjectorAndDoEMFRegistration();
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:19,代码来源:FragmentsEagerLinkingInjectorProvider.java
示例2: doGetResource
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
@Override
public XtextResource doGetResource(final InputStream in, final URI uri) throws Exception {
XtextResourceSet rs = this.<XtextResourceSet>get(XtextResourceSet.class);
rs.getURIConverter().getURIMap().put(URI.createPlatformPluginURI("org.eclipse.xtext/", false), URI.createURI("classpath:/"));
rs.getURIConverter().getURIMap().put(URI.createPlatformPluginURI("org.eclipse.xtext.xbase/", false), URI.createURI("classpath:/"));
rs.getURIConverter().getURIMap().put(URI.createPlatformPluginURI("org.eclipse.xtext.common.types/", false), URI.createURI("classpath:/"));
rs.getURIConverter().getURIMap().put(URI.createPlatformPluginURI("org.eclipse.emf.ecore/", false), URI.createURI("classpath:/"));
rs.getURIConverter().getURIMap().put(URI.createPlatformResourceURI("org.eclipse.xtext.xbase/", false), URI.createURI("classpath:/"));
rs.getURIConverter().getURIMap().put(URI.createPlatformResourceURI("org.eclipse.emf.ecore/", false), URI.createURI("classpath:/"));
rs.getURIConverter().getURIMap().put(URI.createPlatformResourceURI("org.eclipse.xtext.common.types/", false), URI.createURI("classpath:/"));
rs.setClasspathURIContext(this.getClass());
Resource _createResource = this.getResourceFactory().createResource(uri);
final XtextResource resource = ((XtextResource) _createResource);
rs.getResources().add(resource);
XtextLinker linker = new XtextLinker() {
@Override
protected Xtext2EcoreTransformer createTransformer(final Grammar grammar, final IDiagnosticConsumer consumer) {
Xtext2EcoreTransformer result = super.createTransformer(grammar, consumer);
ErrorAcceptor _errorAcceptor = result.getErrorAcceptor();
Xtext2EcoreTransformerTest.MyErrorAcceptor _myErrorAcceptor = new Xtext2EcoreTransformerTest.MyErrorAcceptor(_errorAcceptor, Xtext2EcoreTransformerTest.this.errorAcceptorMock);
result.setErrorAcceptor(_myErrorAcceptor);
return result;
}
};
ILinker _linker = resource.getLinker();
linker.setScopeProvider(((XtextLinker) _linker).getScopeProvider());
ILinker _linker_1 = resource.getLinker();
linker.setLinkingService(((Linker) _linker_1).getLinkingService());
ILinker _linker_2 = resource.getLinker();
linker.setLinkingHelper(((Linker) _linker_2).getLinkingHelper());
XtextLinker.PackageRemover _packageRemover = new XtextLinker.PackageRemover();
linker.setPackageRemover(_packageRemover);
LinkingDiagnosticMessageProvider _linkingDiagnosticMessageProvider = new LinkingDiagnosticMessageProvider();
linker.setDiagnosticMessageProvider(_linkingDiagnosticMessageProvider);
OnChangeEvictingCache _onChangeEvictingCache = new OnChangeEvictingCache();
linker.setCache(_onChangeEvictingCache);
resource.setLinker(linker);
resource.load(in, null);
return resource;
}
开发者ID:eclipse,项目名称:xtext-extras,代码行数:41,代码来源:Xtext2EcoreTransformerTest.java
示例3: doGetResource
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
@Override
public XtextResource doGetResource(final InputStream in, final URI uri) throws Exception {
XtextResourceSet rs = this.<XtextResourceSet>get(XtextResourceSet.class);
rs.setClasspathURIContext(this.getClass());
Resource _createResource = this.getResourceFactory().createResource(uri);
final XtextResource resource = ((XtextResource) _createResource);
rs.getResources().add(resource);
XtextLinker linker = new XtextLinker() {
@Override
protected Xtext2EcoreTransformer createTransformer(final Grammar grammar, final IDiagnosticConsumer consumer) {
Xtext2EcoreTransformer result = super.createTransformer(grammar, consumer);
ErrorAcceptor _errorAcceptor = result.getErrorAcceptor();
Xtext2EcoreTransformerTest.MyErrorAcceptor _myErrorAcceptor = new Xtext2EcoreTransformerTest.MyErrorAcceptor(_errorAcceptor, Xtext2EcoreTransformerTest.this.errorAcceptorMock);
result.setErrorAcceptor(_myErrorAcceptor);
return result;
}
};
ILinker _linker = resource.getLinker();
linker.setScopeProvider(((XtextLinker) _linker).getScopeProvider());
ILinker _linker_1 = resource.getLinker();
linker.setLinkingService(((Linker) _linker_1).getLinkingService());
ILinker _linker_2 = resource.getLinker();
linker.setLinkingHelper(((Linker) _linker_2).getLinkingHelper());
XtextLinker.PackageRemover _packageRemover = new XtextLinker.PackageRemover();
linker.setPackageRemover(_packageRemover);
LinkingDiagnosticMessageProvider _linkingDiagnosticMessageProvider = new LinkingDiagnosticMessageProvider();
linker.setDiagnosticMessageProvider(_linkingDiagnosticMessageProvider);
OnChangeEvictingCache _onChangeEvictingCache = new OnChangeEvictingCache();
linker.setCache(_onChangeEvictingCache);
resource.setLinker(linker);
resource.load(in, null);
return resource;
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:34,代码来源:Xtext2EcoreTransformerTest.java
示例4: bindILinker
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
@Override
public Class<? extends ILinker> bindILinker() {
return OCCILinker.class;
}
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:5,代码来源:OCCIRuntimeModule.java
示例5: bindILinker
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
@Override
public Class<? extends ILinker> bindILinker() {
return XbaseLazyLinker.class;
}
开发者ID:eclipse,项目名称:xtext-extras,代码行数:5,代码来源:DefaultXbaseRuntimeModule.java
示例6: getLinker
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
public ILinker getLinker() {
return linker;
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:4,代码来源:XtextResource.java
示例7: setLinker
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
public void setLinker(ILinker linker) {
this.linker = linker;
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:4,代码来源:XtextResource.java
示例8: bindILinker
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
@Override
public Class<? extends ILinker> bindILinker() {
return org.eclipse.xtext.xtext.XtextLinker.class;
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:5,代码来源:XtextRuntimeModule.java
示例9: bindILinker
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
@Override
public Class<? extends ILinker> bindILinker() {
return XtextLinker.class;
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:5,代码来源:XtextTerminalsTestLanguageRuntimeModule.java
示例10: bindILinker
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
@Override
public Class<? extends ILinker> bindILinker() {
return NullSettingLazyLinker.class;
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:5,代码来源:SequencerTestLanguageRuntimeModule.java
示例11: bindILinker
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
@Override
public Class<? extends ILinker> bindILinker() {
return Linker.class;
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:5,代码来源:SGenTestRuntimeModule.java
示例12: bindILinker
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
@Override
public Class<? extends ILinker> bindILinker() {
return SCTLinker.class;
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:5,代码来源:STextRuntimeModule.java
示例13: bindILinker
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
@Override
public Class<? extends ILinker> bindILinker() {
return CS2ASLinker.class;
}
开发者ID:adolfosbh,项目名称:cs2as,代码行数:5,代码来源:CS2ASDSLRuntimeModule.java
示例14: bindILinker
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
@Override
public Class<? extends ILinker> bindILinker() {
return CS2ASLinker.class;
}
开发者ID:adolfosbh,项目名称:cs2as,代码行数:5,代码来源:ASBHLangRuntimeModule.java
示例15: bindILinker
import org.eclipse.xtext.linking.ILinker; //导入依赖的package包/类
/**
* Customized linker, that produces a linked AST with customized encoded URIs. It also triggers the validation of
* the so produced linked AST.
*
* @return Class<{@link N4JSLinker}>
*/
@Override
public Class<? extends ILinker> bindILinker() {
return N4JSLinker.class;
}
开发者ID:eclipse,项目名称:n4js,代码行数:11,代码来源:N4JSRuntimeModule.java
注:本文中的org.eclipse.xtext.linking.ILinker类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论