Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "APP4MC/devinfo"

 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
 
== Setup of IDE ==
 
== Setup of IDE ==
  
APP4MC uses the Eclipse Installer provided by [https://projects.eclipse.org/projects/tools.oomph Ooomph] to install and setup the development environment. Getting started can be found [https://wiki.eclipse.org/Eclipse_Installer here].
+
APP4MC supports the Eclipse Installer provided by [https://projects.eclipse.org/projects/tools.oomph Ooomph] to install and setup the development environment. Getting started can be found [https://wiki.eclipse.org/Eclipse_Installer here].
Please follow the next steps:
+
Please follow these steps to install an Eclipse IDE for APP4MC development:
# Save the following file locally: http://git.eclipse.org/c/app4mc/org.eclipse.app4mc.git/plain/build/org.eclipse.app4mc.ide.setup/APP4MC-Development-IDE-new.setup
+
# Save the following setup files locally:
# Select '''Eclipse IDE for Java Developers''' with '''Mars''' as Product Version. Click Next.
+
#* APP4MC Tool Platform - http://git.eclipse.org/c/app4mc/org.eclipse.app4mc.git/plain/releng/org.eclipse.app4mc.ide.setup/APP4MC-Development-IDE-latest.setup?h=develop
# Click on the + sign at the top to add a new User Project.
+
#* APP4MC Model Migration - http://git.eclipse.org/c/app4mc/org.eclipse.app4mc.addon.migration.git/plain/releng/org.eclipse.app4mc.ide.setup/APP4MCModelMigrationDevelopmentEnvironment.setup?h=develop
# Select ''Browse File System...'' and refer to the downloaded .setup file.
+
# Download an Eclipse installer for your operating system from here if you do not already have one installed.
# A new entry named '''APP4MC Development IDE''' is created. Select and click Next.
+
# Start the installer
# Control the locations of the installation and click on Next to proceed to the installation.
+
# Select a product (e.g. '''Eclipse IDE for Java Developers''', '''Eclipse IDE for Eclipse Committers''' or '''Eclipse for RCP and RAP Developers''')
 +
# Select the '''Latest Release''', a Java VM and the installation folder
 +
# Switch to the '''Advanced Mode''' by opening the menu on the upper right corner
 +
[[File:oomph_advanced_mode.png|700px]]
 +
# Click '''Next''' to approve the product selection
 +
# In the Projects selection page click on the + sign to add a new User Project
 +
# Select ''Eclipse Projects'' in the combobox
 +
# Click ''Browse File System...'' and select the downloaded .setup file
 +
# Select the newly added '''APP4MC Development''' or '''APP4MC Model Migration''' entry
 +
[[File:oomph_app4mc.png|700px]]
 +
# Click ''Next''
 +
# You can keep the default settings or modify for example the installation folders (possibly you need to enable ''Show all variables'' at the bottom left to be able to modify the default settings)
 +
# Click ''Next''
 +
# Click ''Finish'' and wait until the installation is done
  
[[File:APP4MC Oomph select project.png|700px]]
+
After the Eclipse IDE opens and the setup tasks are done, you should see the imported projects in the Package Explorer. If you see a lot of errors in the projects, the target definition could not be resolved.
 +
In that case open the target definition file
 +
* org.eclipse.app4mc.target/org.eclipse.app4mc.target.target
 +
* org.eclipse.app4mc.converters.target/org.eclipse.app4mc.converters.target)
 +
wait until it is resolved and once it is successfully resolved click ''Set as Active Target Platform''.
 +
 
 +
Alternatively you can manually download an Eclipse IDE or use an existing installation. In that case you need to
 +
* install e(fx)clipse into your IDE (needed for various model visualizations), e.g. via the latest update site https://download.eclipse.org/efxclipse/updates-released/3.6.0/site/
 +
* install and configure a JavaFX SDK
 +
* manually clone the APP4MC repos and import the projects to your workspace
  
 
== Development Information ==
 
== Development Information ==
Line 18: Line 41:
  
 
=== Repository structure ===
 
=== Repository structure ===
The main code repository is http://git.eclipse.org/c/app4mc/org.eclipse.app4mc.git
+
The APP4MC Platform Tools repository is http://git.eclipse.org/c/app4mc/org.eclipse.app4mc.git
The structure is separated into the following folders:
+
The APP4MC Model Migration repository is http://git.eclipse.org/c/app4mc/org.eclipse.app4mc.addon.migration.git
  
;build/
+
The code is structured in the following folders:
:all build related projects like Maven Tycho parent project, product, and target definition
+
 
 +
;examples/
 +
:all Examples that can be manipulated or viewed using the AMALTHEA Tool Platform
 
;features/
 
;features/
 
:all Eclipse feature projects
 
:all Eclipse feature projects
 
;plugins/
 
;plugins/
 
:all Eclipse plug-in projects
 
:all Eclipse plug-in projects
 +
;releng/
 +
:all build related projects like product and target definition
 
;tests/
 
;tests/
 
:all Eclipse test plug-in and fragment projects
 
:all Eclipse test plug-in and fragment projects
;examples/
 
:all Examples that can be manipulated or viewed using the AMALTHEA Tool Platform
 
  
 
=== Building the product ===
 
=== Building the product ===
Building the product itself is done with the following two steps:
+
The APP4MC build is based on [http://blog.vogella.com/2019/11/25/pom-less-tycho-enhanced/ Maven Tycho pom-less builds in structured environments].
# Prepare environment: This is needed to copy the dependent Eclipse Mylyn libraries to the local computer. There are two scripts existing to be executed for different OS:
+
The parent pom.xml is located in the repository root folder. A local build can be triggered via '''mvn clean verify''' from the repository root in your local file system.
#* Linux '''build/org.eclipse.app4mc.build/setup_env.sh'''
+
After successful build the products for different platforms can be found under '''releng/org.eclipse.app4mc.platform.product/target/products'''
#* Windows '''build/org.eclipse.app4mc.build/setup_env.bat'''
+
# Perform the maven build at '''build/org.eclipse.app4mc.build''', for example with '''mvn clean verify'''
+
After successful build the products for the different platforms can be found under '''build/org.eclipse.app4mc.platform.product/target/products'''
+
  
 
=== Add new modules ===
 
=== Add new modules ===
By adding the plugins, features or tests, they must refer to the central parent pom file with the corresponding current version number (in the sample it is the 0.8.2):
+
As pom-less builds are used, it is not necessary to add a '''pom.xml''' for a new plugin, feature or test. Only if a custom build step is needed, a '''pom.xml''' needs to be created and linked to the parent pom file.
<pre>
+
As some modules are currently excluded from the build you need to check if there is a '''pom.tycho''' file located in the folder where the new project is created. If such a file exists you need to add the new project to the list of projects in that file in order to get it included to the build.
<parent>
+
<relativePath>../../build/org.eclipse.app4mc.build/pom.xml</relativePath>
+
<groupId>org.eclipse.app4mc.build</groupId>
+
<artifactId>parent</artifactId>
+
<version>0.8.2-SNAPSHOT</version>
+
</parent>
+
</pre>
+
In addition the new plugin must be added to the parent pom so it will be recognized:
+
<pre>
+
<?xml version="1.0" encoding="UTF-8"?>
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
  
<modelVersion>4.0.0</modelVersion>
+
=== UI Tests ===
  
<groupId>org.eclipse.app4mc.build</groupId>
+
<div style="color:red; text-align:center">
<artifactId>parent</artifactId>
+
'''The UI tests are currently deactivated.''' The following information is still valid but some tests are outdated.
<version>0.8.2-SNAPSHOT</version>
+
</div>
  
<packaging>pom</packaging>
+
The APP4MC/AMALTHEA platform uses the RCPTT for UI tests. General project site including documentation: https://www.eclipse.org/rcptt/.
 
+
Basic tutorial and introduction: http://eclipsesource.com/blogs/tutorials/rcp-testing-tool-rcptt-basic-tutorial/
<url>http://projects.eclipse.org/projects/technology.app4mc</url>
+
<name>APP4MC Tool Platform</name>
+
+
    <modules>
+
        <!-- Plugins -->
+
        ...
+
        <!-- add your plug-in here: -->
+
        <module>../../plugins/org.itea2.amalthea.your.plugin</module>
+
+
        <!-- Features -->
+
        ...
+
        <!-- add your feature here: -->
+
        <module>../../features/org.itea2.amalthea.your.feature</module>
+
 
+
        <!-- Tests -->
+
        ...
+
        <!-- add your test here: -->
+
        <module>../../tests/org.itea2.amalthea.tests.your.plugin</module>
+
+
        ...
+
    </modules>
+
    ...
+
</pre>
+
 
+
=== UI Tests ===
+
The APP4MC/AMALTHEA plattform uses the RCPTT for UI tests. General project site including documentation: https://www.eclipse.org/rcptt/.Basic tutorial and introduction: http://eclipsesource.com/blogs/tutorials/rcp-testing-tool-rcptt-basic-tutorial/
+
  
 
==== Existing Project ====
 
==== Existing Project ====
The general project indluding the UI tests is located in the repository in the following project, starting from the repository root folder:
+
The general project including the UI tests is located in the repository in the project [http://git.eclipse.org/c/app4mc/org.eclipse.app4mc.git/tree/tests/org.eclipse.app4mc.rcptt tests/org.eclipse.app4mc.rcptt]
'''tests/org.eclipse.app4mc.rcptt'''
+
  
 
This project includes the following folder structure:
 
This project includes the following folder structure:
Line 115: Line 98:
 
APP4MC uses Jenkins as a Continuous Integration build server, which is available under https://ci.eclipse.org/app4mc/.
 
APP4MC uses Jenkins as a Continuous Integration build server, which is available under https://ci.eclipse.org/app4mc/.
 
There following list gives an overview about the existing main jobs:
 
There following list gives an overview about the existing main jobs:
* [https://ci.eclipse.org/app4mc/job/build-and-publish-website/ build-and-publish-website]: Manual triggered job to build the APP4MC eclipse web sit based on Hugo.
+
* [https://ci.eclipse.org/app4mc/job/build-and-publish-website/ build-and-publish-website]: Manual triggered job to build the [https://www.eclipse.org/app4mc Eclipse APP4MC web site] (by open-source static site generator [https://gohugo.io Hugo]).
* [https://ci.eclipse.org/app4mc/job/build-master-release/ build-master-release]: Job to build and distribute release based on master branch. Release is copied only if proper tag is set. Must be started manually.
+
* [https://ci.eclipse.org/app4mc/job/build-master-release/ build-master-release]: Job to build and distribute a release based on the master branch. Release is copied only if proper tag is set. Must be started manually.
* [https://ci.eclipse.org/app4mc/job/build-src-branches-pipes/ build-src-branches-pipes]: Job to build all user related branches(**/feature/*, **/hotfix*, **/release*). Triggered by time every 15min, not by event. This job uses [https://jenkins.io/solutions/pipeline/ Jenkins pipeline], which is configured in the [http://git.eclipse.org/c/app4mc/org.eclipse.app4mc.git/tree/Jenkinsfile?h=develop Jenkinsfile] available in the root of the repository.
+
* [https://ci.eclipse.org/app4mc/job/build-src-branches-pipes/ build-src-branches-pipes]: Job to build all user related branches(**/feature/*, **/hotfix*, **/release*). Triggered by time every 15 min, not by event. This job uses [https://jenkins.io/solutions/pipeline/ Jenkins pipeline], which is configured in the [http://git.eclipse.org/c/app4mc/org.eclipse.app4mc.git/tree/Jenkinsfile?h=develop Jenkinsfile] available in the root of the repository.
* [https://ci.eclipse.org/app4mc/job/build-src-develop/ build-src-develop]: Job to build the develop branch. Triggered by time every 15min, not by event.
+
* [https://ci.eclipse.org/app4mc/job/build-src-develop/ build-src-develop]: Job to build the develop branch. Triggered by time every 15 min, not by event.
 
* [https://ci.eclipse.org/app4mc/job/build-src-develop-nightly/ build-src-develop-nightly]: Dedicated nightly job for develop branch.
 
* [https://ci.eclipse.org/app4mc/job/build-src-develop-nightly/ build-src-develop-nightly]: Dedicated nightly job for develop branch.
 
* [https://ci.eclipse.org/app4mc/job/build-src-gerrit/ build-src-gerrit]: Job to build patches for gerrit. Triggered by Gerrit events.
 
* [https://ci.eclipse.org/app4mc/job/build-src-gerrit/ build-src-gerrit]: Job to build patches for gerrit. Triggered by Gerrit events.

Latest revision as of 08:32, 22 February 2021

Setup of IDE

APP4MC supports the Eclipse Installer provided by Ooomph to install and setup the development environment. Getting started can be found here. Please follow these steps to install an Eclipse IDE for APP4MC development:

  1. Save the following setup files locally:
  2. Download an Eclipse installer for your operating system from here if you do not already have one installed.
  3. Start the installer
  4. Select a product (e.g. Eclipse IDE for Java Developers, Eclipse IDE for Eclipse Committers or Eclipse for RCP and RAP Developers)
  5. Select the Latest Release, a Java VM and the installation folder
  6. Switch to the Advanced Mode by opening the menu on the upper right corner

Oomph advanced mode.png

  1. Click Next to approve the product selection
  2. In the Projects selection page click on the + sign to add a new User Project
  3. Select Eclipse Projects in the combobox
  4. Click Browse File System... and select the downloaded .setup file
  5. Select the newly added APP4MC Development or APP4MC Model Migration entry

Oomph app4mc.png

  1. Click Next
  2. You can keep the default settings or modify for example the installation folders (possibly you need to enable Show all variables at the bottom left to be able to modify the default settings)
  3. Click Next
  4. Click Finish and wait until the installation is done

After the Eclipse IDE opens and the setup tasks are done, you should see the imported projects in the Package Explorer. If you see a lot of errors in the projects, the target definition could not be resolved. In that case open the target definition file

  • org.eclipse.app4mc.target/org.eclipse.app4mc.target.target
  • org.eclipse.app4mc.converters.target/org.eclipse.app4mc.converters.target)

wait until it is resolved and once it is successfully resolved click Set as Active Target Platform.

Alternatively you can manually download an Eclipse IDE or use an existing installation. In that case you need to

Development Information

Contains general technical information related to developers, who are interested to contribute to the APP4MC project or wants to use it as a basis for their own tooling.

An overview about the existing repositories and links to the Bug tracker can be found under https://projects.eclipse.org/projects/technology.app4mc/developer

Repository structure

The APP4MC Platform Tools repository is http://git.eclipse.org/c/app4mc/org.eclipse.app4mc.git The APP4MC Model Migration repository is http://git.eclipse.org/c/app4mc/org.eclipse.app4mc.addon.migration.git

The code is structured in the following folders:

examples/
all Examples that can be manipulated or viewed using the AMALTHEA Tool Platform
features/
all Eclipse feature projects
plugins/
all Eclipse plug-in projects
releng/
all build related projects like product and target definition
tests/
all Eclipse test plug-in and fragment projects

Building the product

The APP4MC build is based on Maven Tycho pom-less builds in structured environments. The parent pom.xml is located in the repository root folder. A local build can be triggered via mvn clean verify from the repository root in your local file system. After successful build the products for different platforms can be found under releng/org.eclipse.app4mc.platform.product/target/products

Add new modules

As pom-less builds are used, it is not necessary to add a pom.xml for a new plugin, feature or test. Only if a custom build step is needed, a pom.xml needs to be created and linked to the parent pom file. As some modules are currently excluded from the build you need to check if there is a pom.tycho file located in the folder where the new project is created. If such a file exists you need to add the new project to the list of projects in that file in order to get it included to the build.

UI Tests

The UI tests are currently deactivated. The following information is still valid but some tests are outdated.

The APP4MC/AMALTHEA platform uses the RCPTT for UI tests. General project site including documentation: https://www.eclipse.org/rcptt/. Basic tutorial and introduction: http://eclipsesource.com/blogs/tutorials/rcp-testing-tool-rcptt-basic-tutorial/

Existing Project

The general project including the UI tests is located in the repository in the project tests/org.eclipse.app4mc.rcptt

This project includes the following folder structure:

contexts
Includes several basic context definition to perform the tests. This includes the setup like the opened perspective or the content of the workbench, including projects if needed.
tests
The test definitions to run.
editor: Tests related to the basic AMALTHEA editor.
examples: Tests related to the provided samples.
wizard: Tests related to the model wizard.
verifications
Additional verifications for the test runs. Currently it includes several timing restrictions for the tests.

New test definitions should be included in the tests folder in a dedicated sub-folder! The pom.xml includes already a setup to run all the tests with maven.

The UI tests must run at the end of the build as it relies on the build target!

Build Infrastructure

APP4MC uses Jenkins as a Continuous Integration build server, which is available under https://ci.eclipse.org/app4mc/. There following list gives an overview about the existing main jobs:

Back to the top