org.eclipse.viatra.query.tooling.core.generator.fragments

## Class ExtensionBasedGenerationFragmentProvider

- java.lang.Object
- - org.eclipse.viatra.query.tooling.core.generator.fragments.ExtensionBasedGenerationFragmentProvider

- All Implemented Interfaces:
    IGenerationFragmentProvider

      public class ExtensionBasedGenerationFragmentProvider
      extends java.lang.Object
      implements IGenerationFragmentProvider

  A provider for `IGenerationFragment` classes - the fragment list is populated using the registered extensions for the extension point.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExtensionBasedGenerationFragmentProvider()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Iterable<IGenerationFragment>` | `getAllFragments()` Collects all `IGenerationFragment`.
    `org.eclipse.core.resources.IProject` | `getFragmentProject(org.eclipse.core.resources.IProject modelProject, IGenerationFragment fragment)` Returns the fragment project for the `IGenerationFragment` based on the modelProject.
    `java.lang.Iterable<IGenerationFragment>` | `getFragmentsForPattern(Pattern pattern)` Collects the generation fragments applicable for a selected pattern.
    `protected void` | `initializeFragments()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ExtensionBasedGenerationFragmentProvider

          public ExtensionBasedGenerationFragmentProvider()

  - ### Method Detail

    - #### initializeFragments

          protected void initializeFragments()

    - #### getFragmentsForPattern

          public java.lang.Iterable<IGenerationFragment> getFragmentsForPattern(Pattern pattern)

      Description copied from interface: `IGenerationFragmentProvider`
      Collects the generation fragments applicable for a selected pattern.
      Specified by:
        `getFragmentsForPattern` in interface `IGenerationFragmentProvider`
      Returns:
        a non-null collection of code generation fragments. May be empty.

    - #### getAllFragments

          public java.lang.Iterable<IGenerationFragment> getAllFragments()

      Description copied from interface: `IGenerationFragmentProvider`
      Collects all `IGenerationFragment`.
      Specified by:
        `getAllFragments` in interface `IGenerationFragmentProvider`
      Returns:
        a non-null collection of code generation fragments.

    - #### getFragmentProject

          public org.eclipse.core.resources.IProject getFragmentProject(org.eclipse.core.resources.IProject modelProject,
                                                                        IGenerationFragment fragment)

      Description copied from interface: `IGenerationFragmentProvider`
      Returns the fragment project for the `IGenerationFragment` based on the modelProject.
      Specified by:
        `getFragmentProject` in interface `IGenerationFragmentProvider`