Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 423707

Summary: Remove the remaining references to the legacy Acceleo 2.x language
Product: [Modeling] Sirius Reporter: Maxime Porhel <maxime.porhel>
Component: CoreAssignee: Pierre-Charles David <pierre-charles.david>
Status: CLOSED FIXED QA Contact: Maxime Porhel <maxime.porhel>
Severity: normal    
Priority: P3 CC: florian.barbin, julien.dupont, laurent.redor, pierre-charles.david
Version: 0.9Keywords: triaged
Target Milestone: 1.0.0M7   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Maxime Porhel CLA 2013-12-10 09:14:29 EST
Some references to the legacy Acceleo 2.x language can still be found in Sirius:
 . in viewpoint.ecore 
    . "(<)%eContents.nSize()%>" as default value of  EdgeStyleDescription.sizeComputationExpression and InterpolatedColor.colorValueComputationExpression
    . "The (<)%name%> element has..." as default value of ValidationRule.message
 . in sequence.ecore
    . "(<)%name%>" as default value of TMessageStyle.labelExpression
 . in org.eclipse.sirius.editor.tree.tools.internal.menu.TreeWizardMenuBuilder
 . other references should be removed too.
Comment 1 Florian Barbin CLA 2014-02-04 12:05:45 EST
We have explicit reference to old acceleo2 expression in our source code. Here some examples found by looking for the "<%" string in all sirius files:

* org.eclipse.sirius.business.internal.metamodel.operations.DDiagramSpecOperations.findDiagramElements(DDiagram, EObject, EClass)
* org.eclipse.sirius.diagram.sequence.template.TemplateToDiagramDescriptionTransformer

* org.eclipse.sirius.editor.tree.tools.internal.menu.TreeDescriptionBuilderFromEClass

* org.eclipse.sirius.plugin.properties (2 matches)
Comment 2 Pierre-Charles David CLA 2014-03-04 05:00:40 EST
A quick way to find remaining expressions:

% git grep -I "%>"

Using "%>" is more reliable than using "<%", as "<%" is HTML-quoted when found in XML/XMI files (e.g. .ecore).

As of now (commit 7fa6a557434a4183d7c9b290df6bf46fab1016e7), I still get 42 hits. Many can be rewritten using var: or feature:, the rest will be migrated to the equivalent Acceleo 3 expressions (even though ideally the core of Sirius should not assume the presence of Acceleo 3 as an query language alternative).
Comment 3 Pierre-Charles David CLA 2014-03-28 07:01:59 EDT
I can not find any remaining expressions using the old syntax, except in the release notes, but that is normal as they correspond to historical information.
Comment 4 Maxime Porhel CLA 2014-05-05 10:36:02 EDT
Verified on 1.0.0M7rc1 (1.0.0.20405030833).

I only found occurences in the release notes.
Comment 5 Pierre-Charles David CLA 2014-05-12 03:46:05 EDT
Available in Sirius 1.0.0M7 (see https://wiki.eclipse.org/Sirius/1.0.0M7 & http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tag/?id=v1.0.0M7).