//////////////////////////////////////////
* Copyright (c) 2015, 2016 Eclipse Foundation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*    Wayne Beaton (Eclipse Foundation)- initial API and implementation
*    Cedric Brun (Obeo) 
//////////////////////////////////////////

[[modeling]]
== Modeling

=== Code Generation

==== Builds

http://www.eclipse.org/acceleo[Acceleo] introduced a new mechanism to launch code generators as part of a Maven build which is way easier and more robust by integrating with Tycho.

image::images/acceleo-launcher.png[]

You will find several examples in https://github.com/cbrun/acceleo-launcher-examples/[this repository] ranging from launchging an UML to `C` code generation to exporting a Modeling project as a website.

=== Model Editors

==== Amalgam

The http://www.eclipse.org/modeling/amalgam[Amalgam] project brings a new view to navigate and explore models. Ecore models are supported right away and the view can be extended to support your domain specific models.

image::images/amalgam-explorer.png[]

==== EcoreTools

When using the Ecore graphical modeler references might now be displayed directly within the class shapes if it's target is not in the diagram.

image::images/ecoretools-refnodes.png[]


Inherited references will also be displayed if the super types are not in the diagram.

image::images/ecoretools-inheritedcontent.png[]

==== EMF Parsley

http://www.eclipse.org/emf-parsley[EMF Parsley] is a lightweight framework that allows 
easy and quick UI development based upon EMF. EMF Parsley is built on top of the EMF 
Edit framework and it implements features like Trees, Forms and Table builders with 
standard JFace databinding, providing a complete component-based toolset. EMF Parsley 
can be configured to use all kinds of EMF persistence implementations (XMI, Teneo, CDO).
 
Moreover a DSL allows to easily customize several behaviors in each component.

image::images/parsley-components.png[]

=== Model Comparison

==== Visual Comparison and Merge

The Neon release brings experimental support for comparing diagrams of http://www.eclipse.org/sirius[Sirius] based modelers.

image::images/compare-sirius-family.png[]

With a right-click on a model element or resource in the viewer, a new context menu now offers you to merge all _non-conflicting_ differences that are _contained_ in the selected model element or resource with one click.

With local models (both writable):

image::images/compare-local.png[]

With a read-only side (for example when comparing against a previous version in Git):

image::images/compare-readonly.png[]

Each button now has a specific tooltip for each case depending on the selected element. It will display the best information depending on the context: which object will be affected by the merge action, and which side will be modified (or not) by the action.

image::images/compare-context-tooltips.png[]

=== Custom Graphical Editors

==== Rich Property Views

With the new version of http://www.eclipse.org/sirius[Sirius] you can now define rich property views alongside the diagram definition without having to write a line of code.

This capability is introduced as an experimental feature for Eclipse Neon and will be extended in the next months based on the user community feedback.

image::images/sirius-properties.png[]

==== Image Rendering

Packs of SVG shapes can now be contributed through a plug-in to be reused in other modelers:

image::images/svg-stencils.png[]

image::images/svg-stencils-pick.gif[]

SVG rendering has been improved and is now pixel-perfect https://bugs.eclipse.org/bugs/show_bug.cgi?id=442268[whatever the zoom level].

Before:

image::images/svg-render-before.png[]

With Sirius 4.0:

image::images/svg-render-after.png[]

It is now possible to define dash edge styles for both the nodes and the containers (like it was already possible for edges).

image::images/sirius-border-styles.png[]

And the border node position relative to its parent can now be constrained on a specific side (NORTH, EAST, WEST or SOUTH).

image::images/bordernodeposition.png[]

==== More

The _Link with editor_ support has been improved and is now bidirectional.

image::images/bidi-link.gif[]

You now have the possibility to configure which elements to automatically select after a tool execution, using this it is possible to streamline the user experience 
by making sure that it is always possible to directly type right after the application of the tool. 

image::images/elements-to-select.png[]

The labels which are attached to an edge are now staying closer to it during a user modification.

image::images/edge-stability.gif[]

A new mechanism is introduced to externalize the messages in a `.odesign` model.

image::images/i18n.png[]
