SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Table of Contents

The Dialog

The dialog itself has two pages, the second one is availabe when generating a condition or transformation.

First Page

The first dialog page for generating templates contains the following components:

  1. A choice for the type of text to be generated:
    • Facts: This simply copies the selected PEFs.
    • Condition: This generates a condition from the selected PEFs. This means, that all IDs occuring in the selected PEFs will be replaced with Prolog variables. All occurences of one ID will be replaced with the same variable. Attributes that occur in the PEFs are kept.
    • Transformation: This generates a transformation from the selected PEFs. IDs occuring in the selected PEFs are replaced in the same way as described in condition, attributes are also kept. Additionaly the PEFs are wrapped into add/1. The ID of each PEF to be added will be bound in call of the new_id/1 predicate.
  2. Two options that control semantic details and formating of the generated code:
    • Match context: If checked, additional conditions will be created to ensure that only the selected code is matched. Otherwise, any code with the same structure is matched. This is the default, since it is what you will want in most cases.
    • Do not indent: If checked, all lines of code will start at the same position. Otherwise, lines representing elements nested inside the elements above will be indented.
  3. A help field explaining the above choices and options.
  4. A preview of the code generated according to the settings above.
  5. A Next button that will proceed to the Second Page.
  6. A Finish button which will close the dialog and copy the generated JTransformer code to the clipboard.

Second Page

The second dialog page for generating templates contains the following components:

  1. a table for variable replacements,
  2. a preview of the text to generate and
  3. a Finish button which will close the dialog and copy the generated text to the clipboard.

The second page of the dialog allows replacing the automatically generates variable names. The table allows defining a mapping for the generated variable names.

research/jtransformer/tutorial/using_source_template_wizard.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019