微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

org.eclipse.xtext.linking.ILinker的实例源码

项目:xtext-core    文件FragmentsEagerLinkingInjectorProvider.java   
@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();
}
项目:xtext-extras    文件Xtext2EcoreTransformerTest.java   
@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/",URI.createURI("classpath:/"));
  rs.getURIConverter().getURIMap().put(URI.createPlatformPluginURI("org.eclipse.xtext.common.types/",URI.createURI("classpath:/"));
  rs.getURIConverter().getURIMap().put(URI.createPlatformPluginURI("org.eclipse.emf.ecore/",URI.createURI("classpath:/"));
  rs.getURIConverter().getURIMap().put(URI.createPlatformResourceURI("org.eclipse.xtext.xbase/",URI.createURI("classpath:/"));
  rs.getURIConverter().getURIMap().put(URI.createPlatformResourceURI("org.eclipse.emf.ecore/",URI.createURI("classpath:/"));
  rs.getURIConverter().getURIMap().put(URI.createPlatformResourceURI("org.eclipse.xtext.common.types/",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;
}
项目:xtext-core    文件Xtext2EcoreTransformerTest.java   
@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,null);
  return resource;
}
项目:OCCI-Studio    文件OCCIRuntimeModule.java   
@Override
public Class<? extends ILinker> bindILinker() {
  return OCCILinker.class;
}
项目:xtext-extras    文件DefaultXbaseRuntimeModule.java   
@Override
public Class<? extends ILinker> bindILinker() {
    return XbaseLazyLinker.class;
}
项目:xtext-core    文件XtextResource.java   
public ILinker getLinker() {
    return linker;
}
项目:xtext-core    文件XtextResource.java   
public void setLinker(ILinker linker) {
    this.linker = linker;
}
项目:xtext-core    文件XtextRuntimeModule.java   
@Override
public Class<? extends ILinker> bindILinker() {
    return org.eclipse.xtext.xtext.XtextLinker.class;
}
项目:xtext-core    文件XtextTerminalsTestLanguageRuntimeModule.java   
@Override
public Class<? extends ILinker> bindILinker() {
    return XtextLinker.class;
}
项目:xtext-core    文件SequencerTestLanguageRuntimeModule.java   
@Override
public Class<? extends ILinker> bindILinker() {
    return NullSettingLazyLinker.class;
}
项目:statecharts    文件SGenTestRuntimeModule.java   
@Override
public Class<? extends ILinker> bindILinker() {
    return Linker.class;
}
项目:statecharts    文件STextRuntimeModule.java   
@Override
public Class<? extends ILinker> bindILinker() {
    return SCTLinker.class;
}
项目:cs2as    文件CS2ASDSLRuntimeModule.java   
@Override
public Class<? extends ILinker> bindILinker() {
    return CS2ASLinker.class;
}
项目:cs2as    文件ASBHLangruntimeModule.java   
@Override
public Class<? extends ILinker> bindILinker() {
  return CS2ASLinker.class;
}
项目:n4js    文件N4JSRuntimeModule.java   
/**
 * 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;
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。