1 How to create EAST-ADL meta-model implementation for a new EAST-ADL revision 1.1 Set up Eclipse Environment Skips this section if you already have a running Eclipse environment for the creation of a EAST-ADL meta-model implementation. If you already have a running Eclipse environment for EATOP development, you only need to install the EAAdapter plug-in (see instruction 6). 1. Download Eclipse Automotive Juno from here and unzip it. Eclipse requires that you have Java installed on your machine. 2. Install EGit via the Update Manager of Eclipse 3. Clone the EATOP Git repository (a) Window > Show View > Other. . . > Git Repositories. (b) Click on the ”Clone a Git Repository and add the clone to this view” button in the toolbar. (c) Use https://code.google.com/a/eclipselabs.org/p/eclipse-auto-iwg.eatop/ as repository URI. (d) Select a branch (”master” is the main branch). (e) Select a destination directory or use the default. 4. Import EATOP plug-in projects into your workspace (a) File > Import > Projects from Git. (b) Select ”Local” as repository source. (c) Select Git repository ”eclipse-auto-iwg.eatop”. (d) Select the ”Import existing projects” wizard. (e) Select all/needed plug-in projects. 5. Set ”Eclipse Automotive Target 4.2” as Target Platform. (a) Open file ”eclipselabs-automotive-4.2.target” in project ”org.eatop.targetdefs”. (b) Click on ”Set as Target Platform”. 6. Install EAAdapter plug-in via the Update Manager of Eclipse. • Variant 1: Use http://eclipse-auto-iwg.eclipselabs.org.codespot.com/git.eatop-conti/ EAAdapter/eaadapter.update-site/ as location for the software repository/site. • Variant 2: Clone the EAAdapter Git repository (see 1.2.1) and select the ”eaadapter.updatesite” project as local software repository/site. 1 1.2 Create EAST-ADL meta-model implementation 1. Create a new empty Java-Project in the folder ”../eclipse-auto-iwg.eatop/EATOP Trunk/eel/plugins”. See figure 1. 2. Create a new EAAdapter Model (File > New > Other. . . ). See figure 2 and 3. 3. Open the EAAdapter Model and enter the following required information: (a) Enter root package name e.g. ”eastadl21”. (b) Select release version e.g. ”2.1.10”. If the required version is not available in the combo box, see 1.2.1. (c) Select root directory of the GEASTADL plug-in which contains the ”geastadl.ecore”. 4. Press ”Create EAST-ADL meta-model implementation”. 5. Enter new Ecore file name in the file chooser e.g. ”eastadl2110”. Figure 1: Create new empty Java project 2 Figure 2: Create new EAAdapter Model (1) Figure 3: Create new EAAdapter Model (2) 3 1.2.1 How to add a (new) release version to the EAAdapter You have to modify one of the plug-ins of the EAAdapter, so you need a Eclipse environment for EAAdapter development. If you already have one then skip the following instructions: 1. (Optional)Clone the EAAdapter Git repository (a) Window > Show View > Other. . . > Git Repositories. (b) Click on the ”Clone a Git Repository and add the clone to this view” button in the toolbar. (c) Use https://code.google.com/a/eclipselabs.org/p/eclipse-auto-iwg.eatop-conti/ as repository URI. (d) Select a branch (”master” is the main branch). (e) Select a destination directory or use the default. 2. Import EAAdapter plug-in projects into your workspace (a) File > Import > Projects from Git. (b) Select ”Local” as repository source. (c) Select Git repository ”eclipse-auto-iwg.eatop”. (d) Select the ”Import existing projects” wizard. (e) Select all EAAdapter plug-in projects (prefix ”eaadapter”). In order to add a new release version to the combo box follow these steps: 1. Create a subdirectory ”eastadl-<major version>.<minor version>.<revision>” in the directory ”sourcerevisions/model” of the plug-in ”eaadapter.ea2ecore”. 2. Create a properties file named ”config.properties” in the created subdirectory. The content of the properties file is: • version.major : Major version number • version.minor : Minor version number • version.revision : Revision number • rootPackageContentTypeId: The content type id for the root package of the Genmodel. This identifier is required to register the models resource factory. For example: ”rootPackageContentTypeId=org.eatop.eel.eastadl21.eastadl21XMLFile” If you have installed the EAAdapter plug-in via the Update Manager, then you have to rebuild the update site and update/reinstall the plug-in in your target Eclipse: 1. Delete the following content of the plug-in ”eaadapter.update-site”: • Directory features • Directory plugins • artifacts.jar • content.jar 2. Replace the ”resolved” qualifier (the number after the last dot of the version declaration) with ”qualifier” in the ”site.xml”, e.g. • ”features/org.test.examples 1.0.0.201212050945.jar” to ”features/org.eatop.examples 1.0.0.qualifier.jar” • ”1.0.0.201212050945” to ”1.0.0.qualifier” 3. Open site.xml with the Site Manifest Editor and click on ”Build All”. 4. Update the EAAdapter plug-in in your EATOP Workspace via the Update Manager. 4 1.3 Integrate new meta-model implementation into EATOP 1. Add dependencies to the corresponding EAST-ADL release plug-ins for the new EAST-ADL meta-model implementation plug-ins. If the corresponding EAST-ADL release plug-ins does not exist, see 1.3.1. Be aware of the plug-in order, because the first available meta-model implementation will be used as default meta-model implementation for the EAST-ADL release to load and save a EAXML. For example: • Add a dependency for the plug-in ”org.eatop.eel.eastadl2110” to the plug-in ”org.eatop.eel.eastadl21”. See figure 4. • Add a dependency for the plug-in ”org.eatop.eel.eastadl2110.edit” to the plug-in ”org.eatop.eel.eastadl21.edit”. See figure 5. 2. Create a new feature project for the new meta-model implementation. Use the feature project ”org.eatop.core.metamodel2110-feature” as a template. 3. Add the new feature to the feature ”org.eatop.core.metamodels-feature”. 4. Add the new feature to the feature ”org.eatop.metamodels-feature”. 5. Create a new category in the site.xml and category.xml in the project ”org.eatop.updatesite”. 6. Add the feature for the new meta-model implementation to the new category. 7. Rebuild the update site, see 3. 8. Rebuild the eclipse product, see 2. 1.3.1 Create plug-ins for a new EAST-ADL release The two plug-ins ”org.eatop.eel.eastadl<major version><minor version>” and ”org.eatop.eel.eastadl<major version><minor version>.edit” contain optional references to all meta-model implementations of a EAST-ADL release. See figure 4 and 5. 1. Create a new ”org.eatop.eel.eastadl<major version><minor version>” plug-in. Use the plug-in ”org.eatop.eel.eastadl21” as a template 2. Create a new ”org.eatop.eel.eastadl<major version><minor version>.edit” plug-in. Use the plug-in ”org.eatop.eel.eastadl21.edit” as a template 3. Add the new plug-ins to the feature ”org.eatop.core.metamodels” 5 Figure 4: Dependencies of the plug-in ”org.eatop.eel.eastadl21” Figure 5: Dependencies of the plug-in ”org.eatop.eel.eastadl21.edit” 6 2 How to build the EATOP Eclipse Product (Demonstrator) You need a running Eclipse environment for EATOP development.In order to set up such an environment see 1.1. The feature ”org.eatop.demonstrator-feature” defines all plug-ins and features which will be included into the demonstrator/Eclipse product. So if you want to add new plug-ins or features to the demonstrator, add them to this feature or any included (sub-)feature. In order to build or export the EATOP Eclipse Product (Demonstrator) open the file ”eatop.product” in the project ”org.eatop.eel.examples.demonstrator”. Open the export wizard by clicking on the link ”Eclipse Product export wizard” in the section ”Exporting” of the overview page. Configure the EATOP Eclipse Product as you can see in the following figure 6: Figure 6: Eclipse Product export wizard If you get an error while exporting because of the missing requirement ”org.eclipse.sphinx.core.feature.group 0.0.0”, set the Target Platform from ”Eclipse Automotive Target 4.2” to ”Running Platform”. To be able to compile the EATOP plug-ins again, you have to install the following features manually: • Nebual Widgets (Version: 1.0.0, Update Site: http://download.eclipse.org/technology/ nebula/snapshot) 7 • Sphinx Runtime (Version: 0.7.0 , Update Site: http://download.eclipse.org/sphinx/updates/ interim) Afterwards the export should work without any error. 3 How to build the EATOP Update Site You need a running Eclipse environment for EATOP development.In order to set up such an environment see 1.1. There are two ways to build/rebuild the EATOP Update Site. First option is to use the ”category.xml” in the plug-in ”org.eatop.updatesite” and the function ”Export > Deployable Features” with a categorize repository. For further informations see http: //www.vogella.com/articles/EclipsePlugIn/article.html#deployplugin_p2updatesite. For the second option follow these steps: 1. Delete the following content of the plug-in ”org.eatop.updatesite”: • Directory features • Directory plugins • artifacts.jar • content.jar 2. Replace the ”resolved” qualifier (the number after the last dot of the version declaration) with ”qualifier” in the ”site.xml”, e.g. • ”features/org.test.examples 1.0.0.201212050945.jar” to ”features/org.eatop.examples 1.0.0.qualifier.jar” • ”1.0.0.201212050945” to ”1.0.0.qualifier” 3. Open site.xml with the Site Manifest Editor and click on ”Build All”. 8
© Copyright 2024