@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; } }
@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; }
private boolean operator_add(final List<IXtextGeneratorFragment> list, final IXtextGeneratorFragment fragment) { boolean _xifexpression = false; if ((fragment != null)) { _xifexpression = list.add(fragment); } return _xifexpression; }
@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); } }
public void addFragment(final IXtextGeneratorFragment fragment) { if ((fragment == this)) { throw new IllegalArgumentException(); } this.fragments.add(fragment); }
@Override public void checkConfiguration(final Issues issues) { for (final IXtextGeneratorFragment fragment : this.fragments) { fragment.checkConfiguration(issues); } }
@Override public void initialize(final Injector injector) { for (final IXtextGeneratorFragment fragment : this.fragments) { fragment.initialize(injector); } }
@Pure protected List<IXtextGeneratorFragment> getFragments() { return this.fragments; }
@Pure public IXtextGeneratorFragment getFragment() { return this.fragment; }
public void setFragment(final IXtextGeneratorFragment fragment) { this.fragment = fragment; }
protected List<? extends IXtextGeneratorFragment> getImplicitFragments() { final ArrayList<ImplicitFragment> fragments = CollectionLiterals.<ImplicitFragment>newArrayList(); ImplicitFragment _implicitFragment = new ImplicitFragment(); fragments.add(_implicitFragment); return fragments; }
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); }
@Override public void generate() { fragmentInstances.forEach(IXtextGeneratorFragment::generate); }
@Override protected List<? extends IXtextGeneratorFragment> getImplicitFragments() { List<? extends IXtextGeneratorFragment> implicitFragments = super.getImplicitFragments(); implicitFragments.remove(getSerializer()); return implicitFragments; }