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

Bug 351733

Summary: Ecore Proxy resolution fails due to index out of bounds in BundleURLConverter
Product: [Modeling] Acceleo Reporter: Matt Biehl <matt.biehl>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: laurent.goubet, mariot.chauvin
Version: 3.1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Matt Biehl CLA 2011-07-11 12:37:00 EDT
Build Identifier: 20110301-1815

There is a problem in 
org.eclipse.acceleo.common.internal.utils.workspace.BundleURLConverter, line 194:
access to segments[pathStart] is out of bounds (see the attached screenshot).

This fails silently, due to an empty catch (RuntimeException exception) in EcoreUtil.resolve().

This proxy resolution is performed for the argumentType of the main Template in AcceleoService.doGenerate(), and the line "if (argumentType.isInstance(model))" 

As a result the model transformation cannot be called programmatically. It fails silently.

It is possible to run the transformation as a pure Java Application (without Eclipse).

Screenshot, see Forum: http://www.eclipse.org/forums/index.php/m/695260/#msg_695260

Reproducible: Always

Steps to Reproduce:
1. starting an Acceleo Model Transformation using java code from another plugin
2. the transformation should use a non-standard metamodel 
3.
Comment 1 Laurent Goubet CLA 2011-07-18 05:38:27 EDT
Matt,

This has been detected and fixed ... exactly the day after we built your version :p. The line your highlighted has been changed to "if (pathStart < segments.length && ".cp".equals(segments[pathStart]))" on the 2nd of march.

Please update your version of Acceleo to the official 3.1 release.