Java 类org.eclipse.xtext.resource.SynchronizedXtextResourceSet 实例源码

项目:xtext-extras    文件:SynchronizedXtextResourceSetProvider.java   
@Override
public SynchronizedXtextResourceSet get() {
    SynchronizedXtextResourceSet result = new SynchronizedXtextResourceSet();
    result.setClasspathURIContext(classLoader);
    typeProviderFactory.findOrCreateTypeProvider(result);
    return result;
}
项目:xtext-extras    文件:SynchronizedXtextResourceSetProvider.java   
@Override
public SynchronizedXtextResourceSet get() {
    SynchronizedXtextResourceSet result = new SynchronizedXtextResourceSet();
    result.setClasspathURIContext(classLoader);
    typeProviderFactory.findOrCreateTypeProvider(result);
    return result;
}
项目:dsl-devkit    文件:FormatLinkingService.java   
/**
 * {@inheritDoc}
 */
@Override
public List<EObject> getLinkedObjects(final EObject context, final EReference ref, final INode node) {
  ResourceSet resourceSet = context.eResource().getResourceSet();
  if (ref == FormatPackage.Literals.FORMAT_CONFIGURATION__TARGET_GRAMMAR) {
    List<EObject> usedGrammars = getUsedGrammar(resourceSet, NodeModelUtils.getTokenText(node));
    if (!usedGrammars.isEmpty()) {
      return usedGrammars;
    } else {
      return super.getLinkedObjects(context, ref, node);
    }
  } else if (ref == FormatPackage.Literals.FORMAT_CONFIGURATION__EXTENDED_FORMAT_CONFIGURATION) {
    List<EObject> extendedFormatConfigurations = getExtendedFormatConfiguration(resourceSet, node);
    if (!extendedFormatConfigurations.isEmpty()) {
      return extendedFormatConfigurations;
    } else {
      return super.getLinkedObjects(context, ref, node);
    }
  } else if ((ref == FormatPackage.Literals.INT_VALUE__REFERENCE || ref == FormatPackage.Literals.STRING_VALUE__REFERENCE)
      && !(resourceSet instanceof SynchronizedXtextResourceSet)) {
    List<EObject> res = super.getLinkedObjects(context, ref, node);
    if (res == null || res.isEmpty()) {
      return getConstant(resourceSet, node);
    } else {
      return res;
    }
  } else if (ref == FormatPackage.Literals.RULE__OVERRIDE) {
    return getExtendedFormatConfiguration(resourceSet, node);
  }

  return super.getLinkedObjects(context, ref, node);
}
项目:openhab-hdl    文件:ModelRepositoryImpl.java   
public ModelRepositoryImpl() {
    XtextResourceSet xtextResourceSet = new SynchronizedXtextResourceSet();
    xtextResourceSet.addLoadOption(XtextResource.OPTION_RESOLVE_ALL, Boolean.TRUE);
    this.resourceSet = xtextResourceSet;
    // don't use XMI as a default
    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().remove("*");
}
项目:n4js    文件:N4JSUiModule.java   
/**
 * De-configure the hard coded built in scheme from the runtime bundle.
 */
public Class<? extends XtextResourceSet> bindXtextResourceSet() {
    return SynchronizedXtextResourceSet.class;
}
项目:xtext-extras    文件:XbaseInjectorProvider.java   
public Class<? extends Provider<SynchronizedXtextResourceSet>> provideSynchronizedResourceSet() {
    return SynchronizedXtextResourceSetProvider.class;
}
项目:xtext-extras    文件:XbaseWithAnnotationsInjectorProvider.java   
public Class<? extends Provider<SynchronizedXtextResourceSet>> provideSynchronizedResourceSet() {
    return SynchronizedXtextResourceSetProvider.class;
}
项目:xtext-core    文件:DefaultRuntimeModule.java   
public Class<? extends XtextResourceSet> bindXtextResourceSet() {
    return SynchronizedXtextResourceSet.class;
}
项目:xtext-core    文件:SynchronizedXtextResourceSetTest.java   
@Override
protected XtextResourceSet createEmptyResourceSet() {
  return new SynchronizedXtextResourceSet();
}