SDA SE Wiki

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

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
research:jtransformer:tutorial:getting_started [2014/09/01 12:50]
fabian.noth created
research:jtransformer:tutorial:getting_started [2018/05/09 01:59] (current)
Line 1: Line 1:
 +====== Getting Started ======
  
 +This page gives an introduction into JTransformer and presents the first steps.
 +
 +===== Prerequisites =====
 +
 +First of all, you need to [[..:​installation|download and install]] JTransformer. After a successful installation including a restart of Eclipse, the Eclipse menu will contain a JTransformer entry.
 +
 +===== Open JT User Perspective =====
 +
 +As a first step after installing JTransformer we recommended to use the ''​JT User''​ perspective. You can open it from the menu //​JTransformer//​ -> //JT User Perspective//​. This perspective contains the most important view of JTransformer,​ the [[control_center|Control Center]], and also the //Package Explorer// and the //​Outline//​. The perspective should look like this.
 +
 +{{:​research:​jtransformer:​tutorial:​start_perspective_empty.png?​600px|}}
 +
 +===== Load Example Projects =====
 +
 +JTransformer offers several small examples, so called //Example Projects//. These projects can be loaded into your workspace by selecting //File// -> //New// -> //​Example...//​ -> //​JTransformer Example Projects//. You should then see the depicted dialog offering the example projects.
 +
 +{{:​research:​jtransformer:​tutorial_old:​newexampleproject.png|}}
 +
 +Select the following two projects:
 +  * **JTransformer Tutorial - Java Files** containing Java code and
 +  * **JTransformer Tutorial - Prolog Files** containing small example analyses and transformations.
 +
 +The analyses from the second project will find several results in the first project.
 +
 +===== Activate JTransformer =====
 +
 +After loading the example projects you need to [[working_with_jt#​activate_jtransformer_for_a_project|activate JTransformer]] for the //​JT_Tutorial//​ project. For this select the project in the package explorer, open the context menu and choose //​Configure//​ -> //Assign JTransformer Factbase//. A new dialog will be opened. For the purpose of this introduction you can use the default values in the dialog and click //OK//.
 +
 +{{:​research:​jtransformer:​tutorial:​work_assign_menu.png?​400px|}}
 +{{:​research:​jtransformer:​tutorial:​work_assign_dialog.png?​400px|}}
 +
 +The activation of JTransformer for the project will trigger the initial generation of the factbase. After the generation is finished the project icon will have a green JT overlay {{:​research:​jtransformer:​tutorial:​work_nature_icon.png|}}.
 +From then on JTransformer will automatically update the factbase each time any Java source code is modified in the project.
 +
 +===== Select Factbase in Control Center =====
 +
 +Once the initial generation of the factbase is finished select the newly created factbase named ''​JT_Tutorial''​ in the [[control_center|Control Center]]. After the selection of the factbase the Control Center will show an empty table below the factbase selector, the //analysis table//. It lists all available analyses of the selected factbase, i.e. all analyses loaded in the factbase.
 +
 +{{:​research:​jtransformer:​tutorial:​start_cc_analysis_table_empty.png|}}
 +
 +===== Load Example Analyses =====
 +
 +After selecting the factbase in the Control Center you can load the analyses and transformations from the ''​JT_Tutorial_Prolog''​ project. To do this you need to expand the project in the package explorer and select the file ''​load.pl''​ in the ''​pl''​ folder. Open the context menu and choose //Prolog Development Tools// -> //​(Re)consult//​. This will load the Prolog file into the selected factbase.
 +
 +{{:​research:​jtransformer:​tutorial:​start_load_analyses.png?​400px|}}
 +
 +After loading the file the Control Center should list the loaded analyses.
 +
 +{{:​research:​jtransformer:​tutorial:​start_cc_analysis_table.png|}}
 +
 +===== Run Analyses =====
 +
 +Go to the [[control_center|Control Center]] and enable the analyses you want to run. You can do this by using the checkbox shown for each analysis in the analysis table of the Control Center. By default new analyses are disabled.
 +
 +After enabling some analyses you can run them by using the green button in the top right corner of the Control Center. This will run all enabled analyses. You can also run analyses by using the [[control_center#​context_menu|context menu]] of the analysis table.
 +
 +{{:​research:​jtransformer:​tutorial:​start_cc_analysis_table_with_results.png|}}
 +
 +After running the enabled analyses the analysis table will show the number of results for each analysis.
 +
 +===== Inspect Analysis Results =====
 +
 +The right table of the Control Center shows the [[control_center#​analysis_results|analysis results]] for the analyses which are **selected** in the analysis table. From the analysis result table you can jump to source code corresponding to a result by double-clicking on a result. You can find further information about working with results in JTransformer [[viewing_results|here]].
 +
 +{{:​research:​jtransformer:​tutorial:​start_cc_both_tables.png|}}
research/jtransformer/tutorial/getting_started.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019