Java 类org.eclipse.xtext.xtext.generator.IXtextGeneratorFragment 实例源码

项目:xtext-core    文件:CompositeGeneratorFragment2.java   
@Override
public void generate() {
  final CompositeGeneratorException composite = new CompositeGeneratorException();
  for (final IXtextGeneratorFragment fragment : this.fragments) {
    try {
      fragment.generate();
    } catch (final Throwable _t) {
      if (_t instanceof Exception) {
        final Exception e = (Exception)_t;
        composite.addException(e);
      } else {
        throw Exceptions.sneakyThrow(_t);
      }
    }
  }
  boolean _hasExceptions = composite.hasExceptions();
  if (_hasExceptions) {
    throw composite;
  }
}
项目:xtext-core    文件:StandardLanguage.java   
@Override
protected List<? extends IXtextGeneratorFragment> getImplicitFragments() {
  ArrayList<IXtextGeneratorFragment> _xblockexpression = null;
  {
    final ArrayList<IXtextGeneratorFragment> fragments = CollectionLiterals.<IXtextGeneratorFragment>newArrayList();
    List<? extends IXtextGeneratorFragment> _implicitFragments = super.getImplicitFragments();
    Iterables.<IXtextGeneratorFragment>addAll(fragments, _implicitFragments);
    this.operator_add(fragments, this.grammarAccess);
    this.operator_add(fragments, this.emfGenerator);
    this.operator_add(fragments, this.serializer);
    this.operator_add(fragments, this.resourceFactoryFragment);
    this.operator_add(fragments, this.parserGenerator);
    this.operator_add(fragments, this.validator);
    this.operator_add(fragments, this.scopeProvider);
    this.operator_add(fragments, this.qualifiedNamesProvider);
    this.operator_add(fragments, this.builder);
    this.operator_add(fragments, this.generator);
    this.operator_add(fragments, this.formatter);
    this.operator_add(fragments, this.labelProvider);
    this.operator_add(fragments, this.quickOutline);
    this.operator_add(fragments, this.outline);
    this.operator_add(fragments, this.quickFixProvider);
    this.operator_add(fragments, this.contentAssist);
    this.operator_add(fragments, this.junitSupport);
    this.operator_add(fragments, this.renameRefactoring);
    this.operator_add(fragments, this.commonTypesSupport);
    this.operator_add(fragments, this.xbaseSupport);
    this.operator_add(fragments, this.xtypeSupport);
    this.operator_add(fragments, this.codeTemplates);
    this.operator_add(fragments, this.compareEditor);
    this.operator_add(fragments, this.ideaParser);
    this.operator_add(fragments, this.ideaPlugin);
    this.operator_add(fragments, this.webSupport);
    this.operator_add(fragments, this.newProjectWizardForEclipse);
    _xblockexpression = fragments;
  }
  return _xblockexpression;
}
项目:xtext-core    文件:StandardLanguage.java   
private boolean operator_add(final List<IXtextGeneratorFragment> list, final IXtextGeneratorFragment fragment) {
  boolean _xifexpression = false;
  if ((fragment != null)) {
    _xifexpression = list.add(fragment);
  }
  return _xifexpression;
}
项目:CooperateModelingEnvironment    文件:CooperateCDOXtextFragment2.java   
@Override
public void initialize(Injector injector) {
    try {
        fragmentInstances.clear();
        for (Class<? extends IXtextGeneratorFragment> fragmentType : FRAGMENT_TYPES) {
            IXtextGeneratorFragment fragment = fragmentType.newInstance();
            injector.injectMembers(fragment);
            fragmentInstances.add(fragment);
        }
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
项目:xtext-core    文件:CompositeGeneratorFragment2.java   
public void addFragment(final IXtextGeneratorFragment fragment) {
  if ((fragment == this)) {
    throw new IllegalArgumentException();
  }
  this.fragments.add(fragment);
}
项目:xtext-core    文件:CompositeGeneratorFragment2.java   
@Override
public void checkConfiguration(final Issues issues) {
  for (final IXtextGeneratorFragment fragment : this.fragments) {
    fragment.checkConfiguration(issues);
  }
}
项目:xtext-core    文件:CompositeGeneratorFragment2.java   
@Override
public void initialize(final Injector injector) {
  for (final IXtextGeneratorFragment fragment : this.fragments) {
    fragment.initialize(injector);
  }
}
项目:xtext-core    文件:CompositeGeneratorFragment2.java   
@Pure
protected List<IXtextGeneratorFragment> getFragments() {
  return this.fragments;
}
项目:xtext-core    文件:ConditionalXtextGeneratorFragment.java   
@Pure
public IXtextGeneratorFragment getFragment() {
  return this.fragment;
}
项目:xtext-core    文件:ConditionalXtextGeneratorFragment.java   
public void setFragment(final IXtextGeneratorFragment fragment) {
  this.fragment = fragment;
}
项目:xtext-core    文件:XtextGeneratorLanguage.java   
protected List<? extends IXtextGeneratorFragment> getImplicitFragments() {
  final ArrayList<ImplicitFragment> fragments = CollectionLiterals.<ImplicitFragment>newArrayList();
  ImplicitFragment _implicitFragment = new ImplicitFragment();
  fragments.add(_implicitFragment);
  return fragments;
}
项目:CooperateModelingEnvironment    文件:CooperateCDOXtextFragment2.java   
private static Collection<Class<? extends IXtextGeneratorFragment>> getFragmentTypes() {
    return Arrays.asList(AddCDOXtextBindingsFragment2.class, CooperateResourceHandlingBindingsFragment2.class,
            AutomatedIssueResolutionFragment2.class, CooperateNamingBindingsFragment2.class,
            EMFCompareMatcherFragment2.class, CooperateEditorFragment.class, DerivedStateCalculationFragment2.class,
            ValueConverterFragment2.class, TemplateFragment2.class, OutlineFragment2.class);
}
项目:CooperateModelingEnvironment    文件:CooperateCDOXtextFragment2.java   
@Override
public void generate() {
    fragmentInstances.forEach(IXtextGeneratorFragment::generate);
}
项目:sadlos2    文件:SerializerDisablingStandardLanguage.java   
@Override
protected List<? extends IXtextGeneratorFragment> getImplicitFragments() {
    List<? extends IXtextGeneratorFragment> implicitFragments = super.getImplicitFragments();
    implicitFragments.remove(getSerializer());
    return implicitFragments;
}