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

## Interface IGenerationFragment

-     public interface IGenerationFragment

  A code generation fragment is used by annotation processors for code generation.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cleanUp(Pattern pattern, org.eclipse.xtext.generator.IFileSystemAccess fsa)` Cleans up the previosly generated files for the selected pattern.
    `java.lang.Iterable<ExtensionData>` | `extensionContribution(Pattern pattern)` Returns a collection of extension contributions for the selected pattern.
    `void` | `generateFiles(Pattern pattern, org.eclipse.xtext.generator.IFileSystemAccess fsa)` Executes code generation for a selected pattern.
    `org.eclipse.core.runtime.IPath[]` | `getAdditionalBinIncludes()`
    `java.lang.String[]` | `getProjectDependencies()` Returns an array of bundle id's to add to the destination project as dependency.
    `java.lang.String` | `getProjectPostfix()` Returns the postfix used to define the destination project.
    `java.util.Collection<org.eclipse.xtext.xbase.lib.Pair<java.lang.String,java.lang.String>>` | `getRemovableExtensions()` Returns pairs of extension id prefix and point id.
    `java.lang.Iterable<org.eclipse.xtext.xbase.lib.Pair<java.lang.String,java.lang.String>>` | `removeExtension(Pattern pattern)` Returns a collections of extensions, that need to be removed from the plugin.xml.

- - ### Method Detail

    - #### getProjectPostfix

          java.lang.String getProjectPostfix()

      Returns the postfix used to define the destination project. The generated contents are put into the `model.project.name.postfix` project, or left in the `model.project.name` project if a null postfix is returned.
      Returns:
        A project postfix, or null

    - #### getProjectDependencies

          java.lang.String[] getProjectDependencies()

      Returns an array of bundle id's to add to the destination project as dependency. This array need not to contain the model project, as it is added automatically to new generated projects.
      Returns:
        A non-null (but possibly empty) array of dependencies to add.

    - #### generateFiles

          void generateFiles(Pattern pattern,
                             org.eclipse.xtext.generator.IFileSystemAccess fsa)

      Executes code generation for a selected pattern. All resulting files should be placed using the file system access component.
      Parameters:
        `pattern` -
        `fsa` -

    - #### cleanUp

          void cleanUp(Pattern pattern,
                       org.eclipse.xtext.generator.IFileSystemAccess fsa)

      Cleans up the previosly generated files for the selected pattern. Delete the files using the file system access component.
      Parameters:
        `pattern` -
        `fsa` -

    - #### extensionContribution

          java.lang.Iterable<ExtensionData> extensionContribution(Pattern pattern)

      Returns a collection of extension contributions for the selected pattern. The `ExtensionGenerator` parameter provides a builder API for Xtend-based generators to have a readable generator.
      Parameters:
        `pattern` -
      Returns:
        a collection of plugin extensions

    - #### removeExtension

          java.lang.Iterable<org.eclipse.xtext.xbase.lib.Pair<java.lang.String,java.lang.String>> removeExtension(Pattern pattern)

      Returns a collections of extensions, that need to be removed from the plugin.xml.
      Parameters:
        `pattern` -

    - #### getRemovableExtensions

          java.util.Collection<org.eclipse.xtext.xbase.lib.Pair<java.lang.String,java.lang.String>> getRemovableExtensions()

      Returns pairs of extension id prefix and point id. All extension with one of these ids and prefixes will be removed from the fragments project's plugin.xml. This method only invoked during Clean Build.

    - #### getAdditionalBinIncludes

          org.eclipse.core.runtime.IPath[] getAdditionalBinIncludes()